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 2027 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2038 LOCAL_SET_GL_ERROR_INVALID_ENUM("glTexParameteriv", pname, "pname"); | 2038 LOCAL_SET_GL_ERROR_INVALID_ENUM("glTexParameteriv", pname, "pname"); |
2039 return error::kNoError; | 2039 return error::kNoError; |
2040 } | 2040 } |
2041 if (params == NULL) { | 2041 if (params == NULL) { |
2042 return error::kOutOfBounds; | 2042 return error::kOutOfBounds; |
2043 } | 2043 } |
2044 DoTexParameteriv(target, pname, params); | 2044 DoTexParameteriv(target, pname, params); |
2045 return error::kNoError; | 2045 return error::kNoError; |
2046 } | 2046 } |
2047 | 2047 |
| 2048 error::Error GLES2DecoderImpl::HandleTexStorage3D(uint32_t immediate_data_size, |
| 2049 const void* cmd_data) { |
| 2050 if (!unsafe_es3_apis_enabled()) |
| 2051 return error::kUnknownCommand; |
| 2052 const gles2::cmds::TexStorage3D& c = |
| 2053 *static_cast<const gles2::cmds::TexStorage3D*>(cmd_data); |
| 2054 (void)c; |
| 2055 GLenum target = static_cast<GLenum>(c.target); |
| 2056 GLsizei levels = static_cast<GLsizei>(c.levels); |
| 2057 GLenum internalFormat = static_cast<GLenum>(c.internalFormat); |
| 2058 GLsizei width = static_cast<GLsizei>(c.width); |
| 2059 GLsizei height = static_cast<GLsizei>(c.height); |
| 2060 GLsizei depth = static_cast<GLsizei>(c.depth); |
| 2061 if (levels < 0) { |
| 2062 LOCAL_SET_GL_ERROR(GL_INVALID_VALUE, "glTexStorage3D", "levels < 0"); |
| 2063 return error::kNoError; |
| 2064 } |
| 2065 if (width < 0) { |
| 2066 LOCAL_SET_GL_ERROR(GL_INVALID_VALUE, "glTexStorage3D", "width < 0"); |
| 2067 return error::kNoError; |
| 2068 } |
| 2069 if (height < 0) { |
| 2070 LOCAL_SET_GL_ERROR(GL_INVALID_VALUE, "glTexStorage3D", "height < 0"); |
| 2071 return error::kNoError; |
| 2072 } |
| 2073 if (depth < 0) { |
| 2074 LOCAL_SET_GL_ERROR(GL_INVALID_VALUE, "glTexStorage3D", "depth < 0"); |
| 2075 return error::kNoError; |
| 2076 } |
| 2077 glTexStorage3D(target, levels, internalFormat, width, height, depth); |
| 2078 return error::kNoError; |
| 2079 } |
| 2080 |
2048 error::Error GLES2DecoderImpl::HandleUniform1f(uint32_t immediate_data_size, | 2081 error::Error GLES2DecoderImpl::HandleUniform1f(uint32_t immediate_data_size, |
2049 const void* cmd_data) { | 2082 const void* cmd_data) { |
2050 const gles2::cmds::Uniform1f& c = | 2083 const gles2::cmds::Uniform1f& c = |
2051 *static_cast<const gles2::cmds::Uniform1f*>(cmd_data); | 2084 *static_cast<const gles2::cmds::Uniform1f*>(cmd_data); |
2052 (void)c; | 2085 (void)c; |
2053 GLint location = static_cast<GLint>(c.location); | 2086 GLint location = static_cast<GLint>(c.location); |
2054 GLfloat x = static_cast<GLfloat>(c.x); | 2087 GLfloat x = static_cast<GLfloat>(c.x); |
2055 GLfloat temp[1] = { | 2088 GLfloat temp[1] = { |
2056 x, | 2089 x, |
2057 }; | 2090 }; |
(...skipping 1961 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4019 state_.ignore_cached_state) { | 4052 state_.ignore_cached_state) { |
4020 framebuffer_state_.clear_state_dirty = true; | 4053 framebuffer_state_.clear_state_dirty = true; |
4021 } | 4054 } |
4022 return false; | 4055 return false; |
4023 default: | 4056 default: |
4024 NOTREACHED(); | 4057 NOTREACHED(); |
4025 return false; | 4058 return false; |
4026 } | 4059 } |
4027 } | 4060 } |
4028 #endif // GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_AUTOGEN_H_ | 4061 #endif // GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_AUTOGEN_H_ |
OLD | NEW |