OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 // This file is auto-generated from | 5 // This file is auto-generated from |
6 // gpu/command_buffer/build_gles2_cmd_buffer.py | 6 // gpu/command_buffer/build_gles2_cmd_buffer.py |
7 // It's formatted by clang-format using chromium coding style: | 7 // It's formatted by clang-format using chromium coding style: |
8 // clang-format -i -style=chromium filename | 8 // clang-format -i -style=chromium filename |
9 // DO NOT EDIT! | 9 // DO NOT EDIT! |
10 | 10 |
(...skipping 3643 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3654 } | 3654 } |
3655 const GLfloat* value = | 3655 const GLfloat* value = |
3656 GetImmediateDataAs<const GLfloat*>(c, data_size, immediate_data_size); | 3656 GetImmediateDataAs<const GLfloat*>(c, data_size, immediate_data_size); |
3657 if (value == NULL) { | 3657 if (value == NULL) { |
3658 return error::kOutOfBounds; | 3658 return error::kOutOfBounds; |
3659 } | 3659 } |
3660 DoUniformMatrix4x3fv(location, count, transpose, value); | 3660 DoUniformMatrix4x3fv(location, count, transpose, value); |
3661 return error::kNoError; | 3661 return error::kNoError; |
3662 } | 3662 } |
3663 | 3663 |
| 3664 error::Error |
| 3665 GLES2DecoderImpl::HandleUniformMatrix4fvWithCustomMatrixCHROMIUMImmediate( |
| 3666 uint32_t immediate_data_size, |
| 3667 const void* cmd_data) { |
| 3668 const gles2::cmds::UniformMatrix4fvWithCustomMatrixCHROMIUMImmediate& c = |
| 3669 *static_cast<const gles2::cmds:: |
| 3670 UniformMatrix4fvWithCustomMatrixCHROMIUMImmediate*>( |
| 3671 cmd_data); |
| 3672 (void)c; |
| 3673 GLint location = static_cast<GLint>(c.location); |
| 3674 GLenum custom_matrix = static_cast<GLenum>(c.custom_matrix); |
| 3675 GLboolean transpose = static_cast<GLboolean>(c.transpose); |
| 3676 uint32_t data_size; |
| 3677 if (!ComputeDataSize(1, sizeof(GLfloat), 16, &data_size)) { |
| 3678 return error::kOutOfBounds; |
| 3679 } |
| 3680 if (data_size > immediate_data_size) { |
| 3681 return error::kOutOfBounds; |
| 3682 } |
| 3683 const GLfloat* default_value = |
| 3684 GetImmediateDataAs<const GLfloat*>(c, data_size, immediate_data_size); |
| 3685 if (!validators_->custom_matrix_parameter.IsValid(custom_matrix)) { |
| 3686 LOCAL_SET_GL_ERROR_INVALID_ENUM( |
| 3687 "glUniformMatrix4fvWithCustomMatrixCHROMIUM", custom_matrix, |
| 3688 "custom_matrix"); |
| 3689 return error::kNoError; |
| 3690 } |
| 3691 if (default_value == NULL) { |
| 3692 return error::kOutOfBounds; |
| 3693 } |
| 3694 DoUniformMatrix4fvWithCustomMatrixCHROMIUM(location, custom_matrix, transpose, |
| 3695 default_value); |
| 3696 return error::kNoError; |
| 3697 } |
| 3698 |
3664 error::Error GLES2DecoderImpl::HandleUseProgram(uint32_t immediate_data_size, | 3699 error::Error GLES2DecoderImpl::HandleUseProgram(uint32_t immediate_data_size, |
3665 const void* cmd_data) { | 3700 const void* cmd_data) { |
3666 const gles2::cmds::UseProgram& c = | 3701 const gles2::cmds::UseProgram& c = |
3667 *static_cast<const gles2::cmds::UseProgram*>(cmd_data); | 3702 *static_cast<const gles2::cmds::UseProgram*>(cmd_data); |
3668 (void)c; | 3703 (void)c; |
3669 GLuint program = c.program; | 3704 GLuint program = c.program; |
3670 DoUseProgram(program); | 3705 DoUseProgram(program); |
3671 return error::kNoError; | 3706 return error::kNoError; |
3672 } | 3707 } |
3673 | 3708 |
(...skipping 1442 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5116 state_.enable_flags.cached_sample_alpha_to_one_ext = enabled; | 5151 state_.enable_flags.cached_sample_alpha_to_one_ext = enabled; |
5117 return true; | 5152 return true; |
5118 } | 5153 } |
5119 return false; | 5154 return false; |
5120 default: | 5155 default: |
5121 NOTREACHED(); | 5156 NOTREACHED(); |
5122 return false; | 5157 return false; |
5123 } | 5158 } |
5124 } | 5159 } |
5125 #endif // GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_AUTOGEN_H_ | 5160 #endif // GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_AUTOGEN_H_ |
OLD | NEW |