| 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 3930 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3941 if (!unsafe_es3_apis_enabled()) | 3941 if (!unsafe_es3_apis_enabled()) |
| 3942 return error::kUnknownCommand; | 3942 return error::kUnknownCommand; |
| 3943 const gles2::cmds::VertexAttribI4i& c = | 3943 const gles2::cmds::VertexAttribI4i& c = |
| 3944 *static_cast<const gles2::cmds::VertexAttribI4i*>(cmd_data); | 3944 *static_cast<const gles2::cmds::VertexAttribI4i*>(cmd_data); |
| 3945 (void)c; | 3945 (void)c; |
| 3946 GLuint indx = static_cast<GLuint>(c.indx); | 3946 GLuint indx = static_cast<GLuint>(c.indx); |
| 3947 GLint x = static_cast<GLint>(c.x); | 3947 GLint x = static_cast<GLint>(c.x); |
| 3948 GLint y = static_cast<GLint>(c.y); | 3948 GLint y = static_cast<GLint>(c.y); |
| 3949 GLint z = static_cast<GLint>(c.z); | 3949 GLint z = static_cast<GLint>(c.z); |
| 3950 GLint w = static_cast<GLint>(c.w); | 3950 GLint w = static_cast<GLint>(c.w); |
| 3951 glVertexAttribI4i(indx, x, y, z, w); | 3951 DoVertexAttribI4i(indx, x, y, z, w); |
| 3952 return error::kNoError; | 3952 return error::kNoError; |
| 3953 } | 3953 } |
| 3954 | 3954 |
| 3955 error::Error GLES2DecoderImpl::HandleVertexAttribI4ivImmediate( | 3955 error::Error GLES2DecoderImpl::HandleVertexAttribI4ivImmediate( |
| 3956 uint32_t immediate_data_size, | 3956 uint32_t immediate_data_size, |
| 3957 const void* cmd_data) { | 3957 const void* cmd_data) { |
| 3958 if (!unsafe_es3_apis_enabled()) | 3958 if (!unsafe_es3_apis_enabled()) |
| 3959 return error::kUnknownCommand; | 3959 return error::kUnknownCommand; |
| 3960 const gles2::cmds::VertexAttribI4ivImmediate& c = | 3960 const gles2::cmds::VertexAttribI4ivImmediate& c = |
| 3961 *static_cast<const gles2::cmds::VertexAttribI4ivImmediate*>(cmd_data); | 3961 *static_cast<const gles2::cmds::VertexAttribI4ivImmediate*>(cmd_data); |
| 3962 (void)c; | 3962 (void)c; |
| 3963 GLuint indx = static_cast<GLuint>(c.indx); | 3963 GLuint indx = static_cast<GLuint>(c.indx); |
| 3964 uint32_t data_size; | 3964 uint32_t data_size; |
| 3965 if (!ComputeDataSize(1, sizeof(GLint), 4, &data_size)) { | 3965 if (!ComputeDataSize(1, sizeof(GLint), 4, &data_size)) { |
| 3966 return error::kOutOfBounds; | 3966 return error::kOutOfBounds; |
| 3967 } | 3967 } |
| 3968 if (data_size > immediate_data_size) { | 3968 if (data_size > immediate_data_size) { |
| 3969 return error::kOutOfBounds; | 3969 return error::kOutOfBounds; |
| 3970 } | 3970 } |
| 3971 const GLint* values = | 3971 const GLint* values = |
| 3972 GetImmediateDataAs<const GLint*>(c, data_size, immediate_data_size); | 3972 GetImmediateDataAs<const GLint*>(c, data_size, immediate_data_size); |
| 3973 if (values == NULL) { | 3973 if (values == NULL) { |
| 3974 return error::kOutOfBounds; | 3974 return error::kOutOfBounds; |
| 3975 } | 3975 } |
| 3976 glVertexAttribI4iv(indx, values); | 3976 DoVertexAttribI4iv(indx, values); |
| 3977 return error::kNoError; | 3977 return error::kNoError; |
| 3978 } | 3978 } |
| 3979 | 3979 |
| 3980 error::Error GLES2DecoderImpl::HandleVertexAttribI4ui( | 3980 error::Error GLES2DecoderImpl::HandleVertexAttribI4ui( |
| 3981 uint32_t immediate_data_size, | 3981 uint32_t immediate_data_size, |
| 3982 const void* cmd_data) { | 3982 const void* cmd_data) { |
| 3983 if (!unsafe_es3_apis_enabled()) | 3983 if (!unsafe_es3_apis_enabled()) |
| 3984 return error::kUnknownCommand; | 3984 return error::kUnknownCommand; |
| 3985 const gles2::cmds::VertexAttribI4ui& c = | 3985 const gles2::cmds::VertexAttribI4ui& c = |
| 3986 *static_cast<const gles2::cmds::VertexAttribI4ui*>(cmd_data); | 3986 *static_cast<const gles2::cmds::VertexAttribI4ui*>(cmd_data); |
| 3987 (void)c; | 3987 (void)c; |
| 3988 GLuint indx = static_cast<GLuint>(c.indx); | 3988 GLuint indx = static_cast<GLuint>(c.indx); |
| 3989 GLuint x = static_cast<GLuint>(c.x); | 3989 GLuint x = static_cast<GLuint>(c.x); |
| 3990 GLuint y = static_cast<GLuint>(c.y); | 3990 GLuint y = static_cast<GLuint>(c.y); |
| 3991 GLuint z = static_cast<GLuint>(c.z); | 3991 GLuint z = static_cast<GLuint>(c.z); |
| 3992 GLuint w = static_cast<GLuint>(c.w); | 3992 GLuint w = static_cast<GLuint>(c.w); |
| 3993 glVertexAttribI4ui(indx, x, y, z, w); | 3993 DoVertexAttribI4ui(indx, x, y, z, w); |
| 3994 return error::kNoError; | 3994 return error::kNoError; |
| 3995 } | 3995 } |
| 3996 | 3996 |
| 3997 error::Error GLES2DecoderImpl::HandleVertexAttribI4uivImmediate( | 3997 error::Error GLES2DecoderImpl::HandleVertexAttribI4uivImmediate( |
| 3998 uint32_t immediate_data_size, | 3998 uint32_t immediate_data_size, |
| 3999 const void* cmd_data) { | 3999 const void* cmd_data) { |
| 4000 if (!unsafe_es3_apis_enabled()) | 4000 if (!unsafe_es3_apis_enabled()) |
| 4001 return error::kUnknownCommand; | 4001 return error::kUnknownCommand; |
| 4002 const gles2::cmds::VertexAttribI4uivImmediate& c = | 4002 const gles2::cmds::VertexAttribI4uivImmediate& c = |
| 4003 *static_cast<const gles2::cmds::VertexAttribI4uivImmediate*>(cmd_data); | 4003 *static_cast<const gles2::cmds::VertexAttribI4uivImmediate*>(cmd_data); |
| 4004 (void)c; | 4004 (void)c; |
| 4005 GLuint indx = static_cast<GLuint>(c.indx); | 4005 GLuint indx = static_cast<GLuint>(c.indx); |
| 4006 uint32_t data_size; | 4006 uint32_t data_size; |
| 4007 if (!ComputeDataSize(1, sizeof(GLuint), 4, &data_size)) { | 4007 if (!ComputeDataSize(1, sizeof(GLuint), 4, &data_size)) { |
| 4008 return error::kOutOfBounds; | 4008 return error::kOutOfBounds; |
| 4009 } | 4009 } |
| 4010 if (data_size > immediate_data_size) { | 4010 if (data_size > immediate_data_size) { |
| 4011 return error::kOutOfBounds; | 4011 return error::kOutOfBounds; |
| 4012 } | 4012 } |
| 4013 const GLuint* values = | 4013 const GLuint* values = |
| 4014 GetImmediateDataAs<const GLuint*>(c, data_size, immediate_data_size); | 4014 GetImmediateDataAs<const GLuint*>(c, data_size, immediate_data_size); |
| 4015 if (values == NULL) { | 4015 if (values == NULL) { |
| 4016 return error::kOutOfBounds; | 4016 return error::kOutOfBounds; |
| 4017 } | 4017 } |
| 4018 glVertexAttribI4uiv(indx, values); | 4018 DoVertexAttribI4uiv(indx, values); |
| 4019 return error::kNoError; | 4019 return error::kNoError; |
| 4020 } | 4020 } |
| 4021 | 4021 |
| 4022 error::Error GLES2DecoderImpl::HandleViewport(uint32_t immediate_data_size, | 4022 error::Error GLES2DecoderImpl::HandleViewport(uint32_t immediate_data_size, |
| 4023 const void* cmd_data) { | 4023 const void* cmd_data) { |
| 4024 const gles2::cmds::Viewport& c = | 4024 const gles2::cmds::Viewport& c = |
| 4025 *static_cast<const gles2::cmds::Viewport*>(cmd_data); | 4025 *static_cast<const gles2::cmds::Viewport*>(cmd_data); |
| 4026 (void)c; | 4026 (void)c; |
| 4027 GLint x = static_cast<GLint>(c.x); | 4027 GLint x = static_cast<GLint>(c.x); |
| 4028 GLint y = static_cast<GLint>(c.y); | 4028 GLint y = static_cast<GLint>(c.y); |
| (...skipping 1053 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5082 state_.enable_flags.cached_primitive_restart_fixed_index = enabled; | 5082 state_.enable_flags.cached_primitive_restart_fixed_index = enabled; |
| 5083 return true; | 5083 return true; |
| 5084 } | 5084 } |
| 5085 return false; | 5085 return false; |
| 5086 default: | 5086 default: |
| 5087 NOTREACHED(); | 5087 NOTREACHED(); |
| 5088 return false; | 5088 return false; |
| 5089 } | 5089 } |
| 5090 } | 5090 } |
| 5091 #endif // GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_AUTOGEN_H_ | 5091 #endif // GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_AUTOGEN_H_ |
| OLD | NEW |