| 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 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 43 LOCAL_SET_GL_ERROR_INVALID_ENUM("glBindBuffer", target, "target"); | 43 LOCAL_SET_GL_ERROR_INVALID_ENUM("glBindBuffer", target, "target"); |
| 44 return error::kNoError; | 44 return error::kNoError; |
| 45 } | 45 } |
| 46 DoBindBuffer(target, buffer); | 46 DoBindBuffer(target, buffer); |
| 47 return error::kNoError; | 47 return error::kNoError; |
| 48 } | 48 } |
| 49 | 49 |
| 50 error::Error GLES2DecoderImpl::HandleBindBufferBase( | 50 error::Error GLES2DecoderImpl::HandleBindBufferBase( |
| 51 uint32_t immediate_data_size, | 51 uint32_t immediate_data_size, |
| 52 const volatile void* cmd_data) { | 52 const volatile void* cmd_data) { |
| 53 if (!unsafe_es3_apis_enabled()) | 53 if (!es3_apis_enabled()) |
| 54 return error::kUnknownCommand; | 54 return error::kUnknownCommand; |
| 55 const volatile gles2::cmds::BindBufferBase& c = | 55 const volatile gles2::cmds::BindBufferBase& c = |
| 56 *static_cast<const volatile gles2::cmds::BindBufferBase*>(cmd_data); | 56 *static_cast<const volatile gles2::cmds::BindBufferBase*>(cmd_data); |
| 57 GLenum target = static_cast<GLenum>(c.target); | 57 GLenum target = static_cast<GLenum>(c.target); |
| 58 GLuint index = static_cast<GLuint>(c.index); | 58 GLuint index = static_cast<GLuint>(c.index); |
| 59 GLuint buffer = c.buffer; | 59 GLuint buffer = c.buffer; |
| 60 if (!validators_->indexed_buffer_target.IsValid(target)) { | 60 if (!validators_->indexed_buffer_target.IsValid(target)) { |
| 61 LOCAL_SET_GL_ERROR_INVALID_ENUM("glBindBufferBase", target, "target"); | 61 LOCAL_SET_GL_ERROR_INVALID_ENUM("glBindBufferBase", target, "target"); |
| 62 return error::kNoError; | 62 return error::kNoError; |
| 63 } | 63 } |
| 64 DoBindBufferBase(target, index, buffer); | 64 DoBindBufferBase(target, index, buffer); |
| 65 return error::kNoError; | 65 return error::kNoError; |
| 66 } | 66 } |
| 67 | 67 |
| 68 error::Error GLES2DecoderImpl::HandleBindBufferRange( | 68 error::Error GLES2DecoderImpl::HandleBindBufferRange( |
| 69 uint32_t immediate_data_size, | 69 uint32_t immediate_data_size, |
| 70 const volatile void* cmd_data) { | 70 const volatile void* cmd_data) { |
| 71 if (!unsafe_es3_apis_enabled()) | 71 if (!es3_apis_enabled()) |
| 72 return error::kUnknownCommand; | 72 return error::kUnknownCommand; |
| 73 const volatile gles2::cmds::BindBufferRange& c = | 73 const volatile gles2::cmds::BindBufferRange& c = |
| 74 *static_cast<const volatile gles2::cmds::BindBufferRange*>(cmd_data); | 74 *static_cast<const volatile gles2::cmds::BindBufferRange*>(cmd_data); |
| 75 GLenum target = static_cast<GLenum>(c.target); | 75 GLenum target = static_cast<GLenum>(c.target); |
| 76 GLuint index = static_cast<GLuint>(c.index); | 76 GLuint index = static_cast<GLuint>(c.index); |
| 77 GLuint buffer = c.buffer; | 77 GLuint buffer = c.buffer; |
| 78 GLintptr offset = static_cast<GLintptr>(c.offset); | 78 GLintptr offset = static_cast<GLintptr>(c.offset); |
| 79 GLsizeiptr size = static_cast<GLsizeiptr>(c.size); | 79 GLsizeiptr size = static_cast<GLsizeiptr>(c.size); |
| 80 if (!validators_->indexed_buffer_target.IsValid(target)) { | 80 if (!validators_->indexed_buffer_target.IsValid(target)) { |
| 81 LOCAL_SET_GL_ERROR_INVALID_ENUM("glBindBufferRange", target, "target"); | 81 LOCAL_SET_GL_ERROR_INVALID_ENUM("glBindBufferRange", target, "target"); |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 115 LOCAL_SET_GL_ERROR_INVALID_ENUM("glBindRenderbuffer", target, "target"); | 115 LOCAL_SET_GL_ERROR_INVALID_ENUM("glBindRenderbuffer", target, "target"); |
| 116 return error::kNoError; | 116 return error::kNoError; |
| 117 } | 117 } |
| 118 DoBindRenderbuffer(target, renderbuffer); | 118 DoBindRenderbuffer(target, renderbuffer); |
| 119 return error::kNoError; | 119 return error::kNoError; |
| 120 } | 120 } |
| 121 | 121 |
| 122 error::Error GLES2DecoderImpl::HandleBindSampler( | 122 error::Error GLES2DecoderImpl::HandleBindSampler( |
| 123 uint32_t immediate_data_size, | 123 uint32_t immediate_data_size, |
| 124 const volatile void* cmd_data) { | 124 const volatile void* cmd_data) { |
| 125 if (!unsafe_es3_apis_enabled()) | 125 if (!es3_apis_enabled()) |
| 126 return error::kUnknownCommand; | 126 return error::kUnknownCommand; |
| 127 const volatile gles2::cmds::BindSampler& c = | 127 const volatile gles2::cmds::BindSampler& c = |
| 128 *static_cast<const volatile gles2::cmds::BindSampler*>(cmd_data); | 128 *static_cast<const volatile gles2::cmds::BindSampler*>(cmd_data); |
| 129 GLuint unit = static_cast<GLuint>(c.unit); | 129 GLuint unit = static_cast<GLuint>(c.unit); |
| 130 GLuint sampler = c.sampler; | 130 GLuint sampler = c.sampler; |
| 131 DoBindSampler(unit, sampler); | 131 DoBindSampler(unit, sampler); |
| 132 return error::kNoError; | 132 return error::kNoError; |
| 133 } | 133 } |
| 134 | 134 |
| 135 error::Error GLES2DecoderImpl::HandleBindTexture( | 135 error::Error GLES2DecoderImpl::HandleBindTexture( |
| 136 uint32_t immediate_data_size, | 136 uint32_t immediate_data_size, |
| 137 const volatile void* cmd_data) { | 137 const volatile void* cmd_data) { |
| 138 const volatile gles2::cmds::BindTexture& c = | 138 const volatile gles2::cmds::BindTexture& c = |
| 139 *static_cast<const volatile gles2::cmds::BindTexture*>(cmd_data); | 139 *static_cast<const volatile gles2::cmds::BindTexture*>(cmd_data); |
| 140 GLenum target = static_cast<GLenum>(c.target); | 140 GLenum target = static_cast<GLenum>(c.target); |
| 141 GLuint texture = c.texture; | 141 GLuint texture = c.texture; |
| 142 if (!validators_->texture_bind_target.IsValid(target)) { | 142 if (!validators_->texture_bind_target.IsValid(target)) { |
| 143 LOCAL_SET_GL_ERROR_INVALID_ENUM("glBindTexture", target, "target"); | 143 LOCAL_SET_GL_ERROR_INVALID_ENUM("glBindTexture", target, "target"); |
| 144 return error::kNoError; | 144 return error::kNoError; |
| 145 } | 145 } |
| 146 DoBindTexture(target, texture); | 146 DoBindTexture(target, texture); |
| 147 return error::kNoError; | 147 return error::kNoError; |
| 148 } | 148 } |
| 149 | 149 |
| 150 error::Error GLES2DecoderImpl::HandleBindTransformFeedback( | 150 error::Error GLES2DecoderImpl::HandleBindTransformFeedback( |
| 151 uint32_t immediate_data_size, | 151 uint32_t immediate_data_size, |
| 152 const volatile void* cmd_data) { | 152 const volatile void* cmd_data) { |
| 153 if (!unsafe_es3_apis_enabled()) | 153 if (!es3_apis_enabled()) |
| 154 return error::kUnknownCommand; | 154 return error::kUnknownCommand; |
| 155 const volatile gles2::cmds::BindTransformFeedback& c = | 155 const volatile gles2::cmds::BindTransformFeedback& c = |
| 156 *static_cast<const volatile gles2::cmds::BindTransformFeedback*>( | 156 *static_cast<const volatile gles2::cmds::BindTransformFeedback*>( |
| 157 cmd_data); | 157 cmd_data); |
| 158 GLenum target = static_cast<GLenum>(c.target); | 158 GLenum target = static_cast<GLenum>(c.target); |
| 159 GLuint transformfeedback = c.transformfeedback; | 159 GLuint transformfeedback = c.transformfeedback; |
| 160 if (!validators_->transform_feedback_bind_target.IsValid(target)) { | 160 if (!validators_->transform_feedback_bind_target.IsValid(target)) { |
| 161 LOCAL_SET_GL_ERROR_INVALID_ENUM("glBindTransformFeedback", target, | 161 LOCAL_SET_GL_ERROR_INVALID_ENUM("glBindTransformFeedback", target, |
| 162 "target"); | 162 "target"); |
| 163 return error::kNoError; | 163 return error::kNoError; |
| (...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 353 if (error != error::kNoError) | 353 if (error != error::kNoError) |
| 354 return error; | 354 return error; |
| 355 GLbitfield mask = static_cast<GLbitfield>(c.mask); | 355 GLbitfield mask = static_cast<GLbitfield>(c.mask); |
| 356 DoClear(mask); | 356 DoClear(mask); |
| 357 return error::kNoError; | 357 return error::kNoError; |
| 358 } | 358 } |
| 359 | 359 |
| 360 error::Error GLES2DecoderImpl::HandleClearBufferfi( | 360 error::Error GLES2DecoderImpl::HandleClearBufferfi( |
| 361 uint32_t immediate_data_size, | 361 uint32_t immediate_data_size, |
| 362 const volatile void* cmd_data) { | 362 const volatile void* cmd_data) { |
| 363 if (!unsafe_es3_apis_enabled()) | 363 if (!es3_apis_enabled()) |
| 364 return error::kUnknownCommand; | 364 return error::kUnknownCommand; |
| 365 const volatile gles2::cmds::ClearBufferfi& c = | 365 const volatile gles2::cmds::ClearBufferfi& c = |
| 366 *static_cast<const volatile gles2::cmds::ClearBufferfi*>(cmd_data); | 366 *static_cast<const volatile gles2::cmds::ClearBufferfi*>(cmd_data); |
| 367 GLenum buffer = static_cast<GLenum>(c.buffer); | 367 GLenum buffer = static_cast<GLenum>(c.buffer); |
| 368 GLint drawbuffers = static_cast<GLint>(c.drawbuffers); | 368 GLint drawbuffers = static_cast<GLint>(c.drawbuffers); |
| 369 GLfloat depth = static_cast<GLfloat>(c.depth); | 369 GLfloat depth = static_cast<GLfloat>(c.depth); |
| 370 GLint stencil = static_cast<GLint>(c.stencil); | 370 GLint stencil = static_cast<GLint>(c.stencil); |
| 371 if (!validators_->bufferfi.IsValid(buffer)) { | 371 if (!validators_->bufferfi.IsValid(buffer)) { |
| 372 LOCAL_SET_GL_ERROR_INVALID_ENUM("glClearBufferfi", buffer, "buffer"); | 372 LOCAL_SET_GL_ERROR_INVALID_ENUM("glClearBufferfi", buffer, "buffer"); |
| 373 return error::kNoError; | 373 return error::kNoError; |
| 374 } | 374 } |
| 375 DoClearBufferfi(buffer, drawbuffers, depth, stencil); | 375 DoClearBufferfi(buffer, drawbuffers, depth, stencil); |
| 376 return error::kNoError; | 376 return error::kNoError; |
| 377 } | 377 } |
| 378 | 378 |
| 379 error::Error GLES2DecoderImpl::HandleClearBufferfvImmediate( | 379 error::Error GLES2DecoderImpl::HandleClearBufferfvImmediate( |
| 380 uint32_t immediate_data_size, | 380 uint32_t immediate_data_size, |
| 381 const volatile void* cmd_data) { | 381 const volatile void* cmd_data) { |
| 382 if (!unsafe_es3_apis_enabled()) | 382 if (!es3_apis_enabled()) |
| 383 return error::kUnknownCommand; | 383 return error::kUnknownCommand; |
| 384 const volatile gles2::cmds::ClearBufferfvImmediate& c = | 384 const volatile gles2::cmds::ClearBufferfvImmediate& c = |
| 385 *static_cast<const volatile gles2::cmds::ClearBufferfvImmediate*>( | 385 *static_cast<const volatile gles2::cmds::ClearBufferfvImmediate*>( |
| 386 cmd_data); | 386 cmd_data); |
| 387 GLenum buffer = static_cast<GLenum>(c.buffer); | 387 GLenum buffer = static_cast<GLenum>(c.buffer); |
| 388 GLint drawbuffers = static_cast<GLint>(c.drawbuffers); | 388 GLint drawbuffers = static_cast<GLint>(c.drawbuffers); |
| 389 uint32_t data_size; | 389 uint32_t data_size; |
| 390 if (!GLES2Util::ComputeDataSize(1, sizeof(GLfloat), 4, &data_size)) { | 390 if (!GLES2Util::ComputeDataSize(1, sizeof(GLfloat), 4, &data_size)) { |
| 391 return error::kOutOfBounds; | 391 return error::kOutOfBounds; |
| 392 } | 392 } |
| 393 if (data_size > immediate_data_size) { | 393 if (data_size > immediate_data_size) { |
| 394 return error::kOutOfBounds; | 394 return error::kOutOfBounds; |
| 395 } | 395 } |
| 396 volatile const GLfloat* value = GetImmediateDataAs<volatile const GLfloat*>( | 396 volatile const GLfloat* value = GetImmediateDataAs<volatile const GLfloat*>( |
| 397 c, data_size, immediate_data_size); | 397 c, data_size, immediate_data_size); |
| 398 if (!validators_->bufferfv.IsValid(buffer)) { | 398 if (!validators_->bufferfv.IsValid(buffer)) { |
| 399 LOCAL_SET_GL_ERROR_INVALID_ENUM("glClearBufferfv", buffer, "buffer"); | 399 LOCAL_SET_GL_ERROR_INVALID_ENUM("glClearBufferfv", buffer, "buffer"); |
| 400 return error::kNoError; | 400 return error::kNoError; |
| 401 } | 401 } |
| 402 if (value == NULL) { | 402 if (value == NULL) { |
| 403 return error::kOutOfBounds; | 403 return error::kOutOfBounds; |
| 404 } | 404 } |
| 405 DoClearBufferfv(buffer, drawbuffers, value); | 405 DoClearBufferfv(buffer, drawbuffers, value); |
| 406 return error::kNoError; | 406 return error::kNoError; |
| 407 } | 407 } |
| 408 | 408 |
| 409 error::Error GLES2DecoderImpl::HandleClearBufferivImmediate( | 409 error::Error GLES2DecoderImpl::HandleClearBufferivImmediate( |
| 410 uint32_t immediate_data_size, | 410 uint32_t immediate_data_size, |
| 411 const volatile void* cmd_data) { | 411 const volatile void* cmd_data) { |
| 412 if (!unsafe_es3_apis_enabled()) | 412 if (!es3_apis_enabled()) |
| 413 return error::kUnknownCommand; | 413 return error::kUnknownCommand; |
| 414 const volatile gles2::cmds::ClearBufferivImmediate& c = | 414 const volatile gles2::cmds::ClearBufferivImmediate& c = |
| 415 *static_cast<const volatile gles2::cmds::ClearBufferivImmediate*>( | 415 *static_cast<const volatile gles2::cmds::ClearBufferivImmediate*>( |
| 416 cmd_data); | 416 cmd_data); |
| 417 GLenum buffer = static_cast<GLenum>(c.buffer); | 417 GLenum buffer = static_cast<GLenum>(c.buffer); |
| 418 GLint drawbuffers = static_cast<GLint>(c.drawbuffers); | 418 GLint drawbuffers = static_cast<GLint>(c.drawbuffers); |
| 419 uint32_t data_size; | 419 uint32_t data_size; |
| 420 if (!GLES2Util::ComputeDataSize(1, sizeof(GLint), 4, &data_size)) { | 420 if (!GLES2Util::ComputeDataSize(1, sizeof(GLint), 4, &data_size)) { |
| 421 return error::kOutOfBounds; | 421 return error::kOutOfBounds; |
| 422 } | 422 } |
| 423 if (data_size > immediate_data_size) { | 423 if (data_size > immediate_data_size) { |
| 424 return error::kOutOfBounds; | 424 return error::kOutOfBounds; |
| 425 } | 425 } |
| 426 volatile const GLint* value = GetImmediateDataAs<volatile const GLint*>( | 426 volatile const GLint* value = GetImmediateDataAs<volatile const GLint*>( |
| 427 c, data_size, immediate_data_size); | 427 c, data_size, immediate_data_size); |
| 428 if (!validators_->bufferiv.IsValid(buffer)) { | 428 if (!validators_->bufferiv.IsValid(buffer)) { |
| 429 LOCAL_SET_GL_ERROR_INVALID_ENUM("glClearBufferiv", buffer, "buffer"); | 429 LOCAL_SET_GL_ERROR_INVALID_ENUM("glClearBufferiv", buffer, "buffer"); |
| 430 return error::kNoError; | 430 return error::kNoError; |
| 431 } | 431 } |
| 432 if (value == NULL) { | 432 if (value == NULL) { |
| 433 return error::kOutOfBounds; | 433 return error::kOutOfBounds; |
| 434 } | 434 } |
| 435 DoClearBufferiv(buffer, drawbuffers, value); | 435 DoClearBufferiv(buffer, drawbuffers, value); |
| 436 return error::kNoError; | 436 return error::kNoError; |
| 437 } | 437 } |
| 438 | 438 |
| 439 error::Error GLES2DecoderImpl::HandleClearBufferuivImmediate( | 439 error::Error GLES2DecoderImpl::HandleClearBufferuivImmediate( |
| 440 uint32_t immediate_data_size, | 440 uint32_t immediate_data_size, |
| 441 const volatile void* cmd_data) { | 441 const volatile void* cmd_data) { |
| 442 if (!unsafe_es3_apis_enabled()) | 442 if (!es3_apis_enabled()) |
| 443 return error::kUnknownCommand; | 443 return error::kUnknownCommand; |
| 444 const volatile gles2::cmds::ClearBufferuivImmediate& c = | 444 const volatile gles2::cmds::ClearBufferuivImmediate& c = |
| 445 *static_cast<const volatile gles2::cmds::ClearBufferuivImmediate*>( | 445 *static_cast<const volatile gles2::cmds::ClearBufferuivImmediate*>( |
| 446 cmd_data); | 446 cmd_data); |
| 447 GLenum buffer = static_cast<GLenum>(c.buffer); | 447 GLenum buffer = static_cast<GLenum>(c.buffer); |
| 448 GLint drawbuffers = static_cast<GLint>(c.drawbuffers); | 448 GLint drawbuffers = static_cast<GLint>(c.drawbuffers); |
| 449 uint32_t data_size; | 449 uint32_t data_size; |
| 450 if (!GLES2Util::ComputeDataSize(1, sizeof(GLuint), 4, &data_size)) { | 450 if (!GLES2Util::ComputeDataSize(1, sizeof(GLuint), 4, &data_size)) { |
| 451 return error::kOutOfBounds; | 451 return error::kOutOfBounds; |
| 452 } | 452 } |
| (...skipping 275 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 728 return error::kOutOfBounds; | 728 return error::kOutOfBounds; |
| 729 } | 729 } |
| 730 DoCompressedTexSubImage2D(target, level, xoffset, yoffset, width, height, | 730 DoCompressedTexSubImage2D(target, level, xoffset, yoffset, width, height, |
| 731 format, imageSize, data); | 731 format, imageSize, data); |
| 732 return error::kNoError; | 732 return error::kNoError; |
| 733 } | 733 } |
| 734 | 734 |
| 735 error::Error GLES2DecoderImpl::HandleCompressedTexImage3DBucket( | 735 error::Error GLES2DecoderImpl::HandleCompressedTexImage3DBucket( |
| 736 uint32_t immediate_data_size, | 736 uint32_t immediate_data_size, |
| 737 const volatile void* cmd_data) { | 737 const volatile void* cmd_data) { |
| 738 if (!unsafe_es3_apis_enabled()) | 738 if (!es3_apis_enabled()) |
| 739 return error::kUnknownCommand; | 739 return error::kUnknownCommand; |
| 740 const volatile gles2::cmds::CompressedTexImage3DBucket& c = | 740 const volatile gles2::cmds::CompressedTexImage3DBucket& c = |
| 741 *static_cast<const volatile gles2::cmds::CompressedTexImage3DBucket*>( | 741 *static_cast<const volatile gles2::cmds::CompressedTexImage3DBucket*>( |
| 742 cmd_data); | 742 cmd_data); |
| 743 GLenum target = static_cast<GLenum>(c.target); | 743 GLenum target = static_cast<GLenum>(c.target); |
| 744 GLint level = static_cast<GLint>(c.level); | 744 GLint level = static_cast<GLint>(c.level); |
| 745 GLenum internalformat = static_cast<GLenum>(c.internalformat); | 745 GLenum internalformat = static_cast<GLenum>(c.internalformat); |
| 746 GLsizei width = static_cast<GLsizei>(c.width); | 746 GLsizei width = static_cast<GLsizei>(c.width); |
| 747 GLsizei height = static_cast<GLsizei>(c.height); | 747 GLsizei height = static_cast<GLsizei>(c.height); |
| 748 GLsizei depth = static_cast<GLsizei>(c.depth); | 748 GLsizei depth = static_cast<GLsizei>(c.depth); |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 783 return error::kNoError; | 783 return error::kNoError; |
| 784 } | 784 } |
| 785 DoCompressedTexImage3D(target, level, internalformat, width, height, depth, | 785 DoCompressedTexImage3D(target, level, internalformat, width, height, depth, |
| 786 border, imageSize, data); | 786 border, imageSize, data); |
| 787 return error::kNoError; | 787 return error::kNoError; |
| 788 } | 788 } |
| 789 | 789 |
| 790 error::Error GLES2DecoderImpl::HandleCompressedTexImage3D( | 790 error::Error GLES2DecoderImpl::HandleCompressedTexImage3D( |
| 791 uint32_t immediate_data_size, | 791 uint32_t immediate_data_size, |
| 792 const volatile void* cmd_data) { | 792 const volatile void* cmd_data) { |
| 793 if (!unsafe_es3_apis_enabled()) | 793 if (!es3_apis_enabled()) |
| 794 return error::kUnknownCommand; | 794 return error::kUnknownCommand; |
| 795 const volatile gles2::cmds::CompressedTexImage3D& c = | 795 const volatile gles2::cmds::CompressedTexImage3D& c = |
| 796 *static_cast<const volatile gles2::cmds::CompressedTexImage3D*>(cmd_data); | 796 *static_cast<const volatile gles2::cmds::CompressedTexImage3D*>(cmd_data); |
| 797 GLenum target = static_cast<GLenum>(c.target); | 797 GLenum target = static_cast<GLenum>(c.target); |
| 798 GLint level = static_cast<GLint>(c.level); | 798 GLint level = static_cast<GLint>(c.level); |
| 799 GLenum internalformat = static_cast<GLenum>(c.internalformat); | 799 GLenum internalformat = static_cast<GLenum>(c.internalformat); |
| 800 GLsizei width = static_cast<GLsizei>(c.width); | 800 GLsizei width = static_cast<GLsizei>(c.width); |
| 801 GLsizei height = static_cast<GLsizei>(c.height); | 801 GLsizei height = static_cast<GLsizei>(c.height); |
| 802 GLsizei depth = static_cast<GLsizei>(c.depth); | 802 GLsizei depth = static_cast<GLsizei>(c.depth); |
| 803 GLint border = static_cast<GLint>(c.border); | 803 GLint border = static_cast<GLint>(c.border); |
| (...skipping 29 matching lines...) Expand all Loading... |
| 833 return error::kNoError; | 833 return error::kNoError; |
| 834 } | 834 } |
| 835 DoCompressedTexImage3D(target, level, internalformat, width, height, depth, | 835 DoCompressedTexImage3D(target, level, internalformat, width, height, depth, |
| 836 border, imageSize, data); | 836 border, imageSize, data); |
| 837 return error::kNoError; | 837 return error::kNoError; |
| 838 } | 838 } |
| 839 | 839 |
| 840 error::Error GLES2DecoderImpl::HandleCompressedTexSubImage3DBucket( | 840 error::Error GLES2DecoderImpl::HandleCompressedTexSubImage3DBucket( |
| 841 uint32_t immediate_data_size, | 841 uint32_t immediate_data_size, |
| 842 const volatile void* cmd_data) { | 842 const volatile void* cmd_data) { |
| 843 if (!unsafe_es3_apis_enabled()) | 843 if (!es3_apis_enabled()) |
| 844 return error::kUnknownCommand; | 844 return error::kUnknownCommand; |
| 845 const volatile gles2::cmds::CompressedTexSubImage3DBucket& c = | 845 const volatile gles2::cmds::CompressedTexSubImage3DBucket& c = |
| 846 *static_cast<const volatile gles2::cmds::CompressedTexSubImage3DBucket*>( | 846 *static_cast<const volatile gles2::cmds::CompressedTexSubImage3DBucket*>( |
| 847 cmd_data); | 847 cmd_data); |
| 848 GLenum target = static_cast<GLenum>(c.target); | 848 GLenum target = static_cast<GLenum>(c.target); |
| 849 GLint level = static_cast<GLint>(c.level); | 849 GLint level = static_cast<GLint>(c.level); |
| 850 GLint xoffset = static_cast<GLint>(c.xoffset); | 850 GLint xoffset = static_cast<GLint>(c.xoffset); |
| 851 GLint yoffset = static_cast<GLint>(c.yoffset); | 851 GLint yoffset = static_cast<GLint>(c.yoffset); |
| 852 GLint zoffset = static_cast<GLint>(c.zoffset); | 852 GLint zoffset = static_cast<GLint>(c.zoffset); |
| 853 GLsizei width = static_cast<GLsizei>(c.width); | 853 GLsizei width = static_cast<GLsizei>(c.width); |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 893 return error::kNoError; | 893 return error::kNoError; |
| 894 } | 894 } |
| 895 DoCompressedTexSubImage3D(target, level, xoffset, yoffset, zoffset, width, | 895 DoCompressedTexSubImage3D(target, level, xoffset, yoffset, zoffset, width, |
| 896 height, depth, format, imageSize, data); | 896 height, depth, format, imageSize, data); |
| 897 return error::kNoError; | 897 return error::kNoError; |
| 898 } | 898 } |
| 899 | 899 |
| 900 error::Error GLES2DecoderImpl::HandleCompressedTexSubImage3D( | 900 error::Error GLES2DecoderImpl::HandleCompressedTexSubImage3D( |
| 901 uint32_t immediate_data_size, | 901 uint32_t immediate_data_size, |
| 902 const volatile void* cmd_data) { | 902 const volatile void* cmd_data) { |
| 903 if (!unsafe_es3_apis_enabled()) | 903 if (!es3_apis_enabled()) |
| 904 return error::kUnknownCommand; | 904 return error::kUnknownCommand; |
| 905 const volatile gles2::cmds::CompressedTexSubImage3D& c = | 905 const volatile gles2::cmds::CompressedTexSubImage3D& c = |
| 906 *static_cast<const volatile gles2::cmds::CompressedTexSubImage3D*>( | 906 *static_cast<const volatile gles2::cmds::CompressedTexSubImage3D*>( |
| 907 cmd_data); | 907 cmd_data); |
| 908 GLenum target = static_cast<GLenum>(c.target); | 908 GLenum target = static_cast<GLenum>(c.target); |
| 909 GLint level = static_cast<GLint>(c.level); | 909 GLint level = static_cast<GLint>(c.level); |
| 910 GLint xoffset = static_cast<GLint>(c.xoffset); | 910 GLint xoffset = static_cast<GLint>(c.xoffset); |
| 911 GLint yoffset = static_cast<GLint>(c.yoffset); | 911 GLint yoffset = static_cast<GLint>(c.yoffset); |
| 912 GLint zoffset = static_cast<GLint>(c.zoffset); | 912 GLint zoffset = static_cast<GLint>(c.zoffset); |
| 913 GLsizei width = static_cast<GLsizei>(c.width); | 913 GLsizei width = static_cast<GLsizei>(c.width); |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 952 return error::kOutOfBounds; | 952 return error::kOutOfBounds; |
| 953 } | 953 } |
| 954 DoCompressedTexSubImage3D(target, level, xoffset, yoffset, zoffset, width, | 954 DoCompressedTexSubImage3D(target, level, xoffset, yoffset, zoffset, width, |
| 955 height, depth, format, imageSize, data); | 955 height, depth, format, imageSize, data); |
| 956 return error::kNoError; | 956 return error::kNoError; |
| 957 } | 957 } |
| 958 | 958 |
| 959 error::Error GLES2DecoderImpl::HandleCopyBufferSubData( | 959 error::Error GLES2DecoderImpl::HandleCopyBufferSubData( |
| 960 uint32_t immediate_data_size, | 960 uint32_t immediate_data_size, |
| 961 const volatile void* cmd_data) { | 961 const volatile void* cmd_data) { |
| 962 if (!unsafe_es3_apis_enabled()) | 962 if (!es3_apis_enabled()) |
| 963 return error::kUnknownCommand; | 963 return error::kUnknownCommand; |
| 964 const volatile gles2::cmds::CopyBufferSubData& c = | 964 const volatile gles2::cmds::CopyBufferSubData& c = |
| 965 *static_cast<const volatile gles2::cmds::CopyBufferSubData*>(cmd_data); | 965 *static_cast<const volatile gles2::cmds::CopyBufferSubData*>(cmd_data); |
| 966 GLenum readtarget = static_cast<GLenum>(c.readtarget); | 966 GLenum readtarget = static_cast<GLenum>(c.readtarget); |
| 967 GLenum writetarget = static_cast<GLenum>(c.writetarget); | 967 GLenum writetarget = static_cast<GLenum>(c.writetarget); |
| 968 GLintptr readoffset = static_cast<GLintptr>(c.readoffset); | 968 GLintptr readoffset = static_cast<GLintptr>(c.readoffset); |
| 969 GLintptr writeoffset = static_cast<GLintptr>(c.writeoffset); | 969 GLintptr writeoffset = static_cast<GLintptr>(c.writeoffset); |
| 970 GLsizeiptr size = static_cast<GLsizeiptr>(c.size); | 970 GLsizeiptr size = static_cast<GLsizeiptr>(c.size); |
| 971 if (!validators_->buffer_target.IsValid(readtarget)) { | 971 if (!validators_->buffer_target.IsValid(readtarget)) { |
| 972 LOCAL_SET_GL_ERROR_INVALID_ENUM("glCopyBufferSubData", readtarget, | 972 LOCAL_SET_GL_ERROR_INVALID_ENUM("glCopyBufferSubData", readtarget, |
| (...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1053 LOCAL_SET_GL_ERROR(GL_INVALID_VALUE, "glCopyTexSubImage2D", "height < 0"); | 1053 LOCAL_SET_GL_ERROR(GL_INVALID_VALUE, "glCopyTexSubImage2D", "height < 0"); |
| 1054 return error::kNoError; | 1054 return error::kNoError; |
| 1055 } | 1055 } |
| 1056 DoCopyTexSubImage2D(target, level, xoffset, yoffset, x, y, width, height); | 1056 DoCopyTexSubImage2D(target, level, xoffset, yoffset, x, y, width, height); |
| 1057 return error::kNoError; | 1057 return error::kNoError; |
| 1058 } | 1058 } |
| 1059 | 1059 |
| 1060 error::Error GLES2DecoderImpl::HandleCopyTexSubImage3D( | 1060 error::Error GLES2DecoderImpl::HandleCopyTexSubImage3D( |
| 1061 uint32_t immediate_data_size, | 1061 uint32_t immediate_data_size, |
| 1062 const volatile void* cmd_data) { | 1062 const volatile void* cmd_data) { |
| 1063 if (!unsafe_es3_apis_enabled()) | 1063 if (!es3_apis_enabled()) |
| 1064 return error::kUnknownCommand; | 1064 return error::kUnknownCommand; |
| 1065 const volatile gles2::cmds::CopyTexSubImage3D& c = | 1065 const volatile gles2::cmds::CopyTexSubImage3D& c = |
| 1066 *static_cast<const volatile gles2::cmds::CopyTexSubImage3D*>(cmd_data); | 1066 *static_cast<const volatile gles2::cmds::CopyTexSubImage3D*>(cmd_data); |
| 1067 error::Error error; | 1067 error::Error error; |
| 1068 error = WillAccessBoundFramebufferForRead(); | 1068 error = WillAccessBoundFramebufferForRead(); |
| 1069 if (error != error::kNoError) | 1069 if (error != error::kNoError) |
| 1070 return error; | 1070 return error; |
| 1071 GLenum target = static_cast<GLenum>(c.target); | 1071 GLenum target = static_cast<GLenum>(c.target); |
| 1072 GLint level = static_cast<GLint>(c.level); | 1072 GLint level = static_cast<GLint>(c.level); |
| 1073 GLint xoffset = static_cast<GLint>(c.xoffset); | 1073 GLint xoffset = static_cast<GLint>(c.xoffset); |
| (...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1205 if (renderbuffers == NULL) { | 1205 if (renderbuffers == NULL) { |
| 1206 return error::kOutOfBounds; | 1206 return error::kOutOfBounds; |
| 1207 } | 1207 } |
| 1208 DeleteRenderbuffersHelper(n, renderbuffers); | 1208 DeleteRenderbuffersHelper(n, renderbuffers); |
| 1209 return error::kNoError; | 1209 return error::kNoError; |
| 1210 } | 1210 } |
| 1211 | 1211 |
| 1212 error::Error GLES2DecoderImpl::HandleDeleteSamplersImmediate( | 1212 error::Error GLES2DecoderImpl::HandleDeleteSamplersImmediate( |
| 1213 uint32_t immediate_data_size, | 1213 uint32_t immediate_data_size, |
| 1214 const volatile void* cmd_data) { | 1214 const volatile void* cmd_data) { |
| 1215 if (!unsafe_es3_apis_enabled()) | 1215 if (!es3_apis_enabled()) |
| 1216 return error::kUnknownCommand; | 1216 return error::kUnknownCommand; |
| 1217 const volatile gles2::cmds::DeleteSamplersImmediate& c = | 1217 const volatile gles2::cmds::DeleteSamplersImmediate& c = |
| 1218 *static_cast<const volatile gles2::cmds::DeleteSamplersImmediate*>( | 1218 *static_cast<const volatile gles2::cmds::DeleteSamplersImmediate*>( |
| 1219 cmd_data); | 1219 cmd_data); |
| 1220 GLsizei n = static_cast<GLsizei>(c.n); | 1220 GLsizei n = static_cast<GLsizei>(c.n); |
| 1221 uint32_t data_size; | 1221 uint32_t data_size; |
| 1222 if (!SafeMultiplyUint32(n, sizeof(GLuint), &data_size)) { | 1222 if (!SafeMultiplyUint32(n, sizeof(GLuint), &data_size)) { |
| 1223 return error::kOutOfBounds; | 1223 return error::kOutOfBounds; |
| 1224 } | 1224 } |
| 1225 volatile const GLuint* samplers = GetImmediateDataAs<volatile const GLuint*>( | 1225 volatile const GLuint* samplers = GetImmediateDataAs<volatile const GLuint*>( |
| 1226 c, data_size, immediate_data_size); | 1226 c, data_size, immediate_data_size); |
| 1227 if (samplers == NULL) { | 1227 if (samplers == NULL) { |
| 1228 return error::kOutOfBounds; | 1228 return error::kOutOfBounds; |
| 1229 } | 1229 } |
| 1230 DeleteSamplersHelper(n, samplers); | 1230 DeleteSamplersHelper(n, samplers); |
| 1231 return error::kNoError; | 1231 return error::kNoError; |
| 1232 } | 1232 } |
| 1233 | 1233 |
| 1234 error::Error GLES2DecoderImpl::HandleDeleteSync(uint32_t immediate_data_size, | 1234 error::Error GLES2DecoderImpl::HandleDeleteSync(uint32_t immediate_data_size, |
| 1235 const volatile void* cmd_data) { | 1235 const volatile void* cmd_data) { |
| 1236 if (!unsafe_es3_apis_enabled()) | 1236 if (!es3_apis_enabled()) |
| 1237 return error::kUnknownCommand; | 1237 return error::kUnknownCommand; |
| 1238 const volatile gles2::cmds::DeleteSync& c = | 1238 const volatile gles2::cmds::DeleteSync& c = |
| 1239 *static_cast<const volatile gles2::cmds::DeleteSync*>(cmd_data); | 1239 *static_cast<const volatile gles2::cmds::DeleteSync*>(cmd_data); |
| 1240 GLuint sync = c.sync; | 1240 GLuint sync = c.sync; |
| 1241 DeleteSyncHelper(sync); | 1241 DeleteSyncHelper(sync); |
| 1242 return error::kNoError; | 1242 return error::kNoError; |
| 1243 } | 1243 } |
| 1244 | 1244 |
| 1245 error::Error GLES2DecoderImpl::HandleDeleteTexturesImmediate( | 1245 error::Error GLES2DecoderImpl::HandleDeleteTexturesImmediate( |
| 1246 uint32_t immediate_data_size, | 1246 uint32_t immediate_data_size, |
| (...skipping 11 matching lines...) Expand all Loading... |
| 1258 if (textures == NULL) { | 1258 if (textures == NULL) { |
| 1259 return error::kOutOfBounds; | 1259 return error::kOutOfBounds; |
| 1260 } | 1260 } |
| 1261 DeleteTexturesHelper(n, textures); | 1261 DeleteTexturesHelper(n, textures); |
| 1262 return error::kNoError; | 1262 return error::kNoError; |
| 1263 } | 1263 } |
| 1264 | 1264 |
| 1265 error::Error GLES2DecoderImpl::HandleDeleteTransformFeedbacksImmediate( | 1265 error::Error GLES2DecoderImpl::HandleDeleteTransformFeedbacksImmediate( |
| 1266 uint32_t immediate_data_size, | 1266 uint32_t immediate_data_size, |
| 1267 const volatile void* cmd_data) { | 1267 const volatile void* cmd_data) { |
| 1268 if (!unsafe_es3_apis_enabled()) | 1268 if (!es3_apis_enabled()) |
| 1269 return error::kUnknownCommand; | 1269 return error::kUnknownCommand; |
| 1270 const volatile gles2::cmds::DeleteTransformFeedbacksImmediate& c = | 1270 const volatile gles2::cmds::DeleteTransformFeedbacksImmediate& c = |
| 1271 *static_cast< | 1271 *static_cast< |
| 1272 const volatile gles2::cmds::DeleteTransformFeedbacksImmediate*>( | 1272 const volatile gles2::cmds::DeleteTransformFeedbacksImmediate*>( |
| 1273 cmd_data); | 1273 cmd_data); |
| 1274 GLsizei n = static_cast<GLsizei>(c.n); | 1274 GLsizei n = static_cast<GLsizei>(c.n); |
| 1275 uint32_t data_size; | 1275 uint32_t data_size; |
| 1276 if (!SafeMultiplyUint32(n, sizeof(GLuint), &data_size)) { | 1276 if (!SafeMultiplyUint32(n, sizeof(GLuint), &data_size)) { |
| 1277 return error::kOutOfBounds; | 1277 return error::kOutOfBounds; |
| 1278 } | 1278 } |
| (...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1378 const volatile gles2::cmds::EnableVertexAttribArray& c = | 1378 const volatile gles2::cmds::EnableVertexAttribArray& c = |
| 1379 *static_cast<const volatile gles2::cmds::EnableVertexAttribArray*>( | 1379 *static_cast<const volatile gles2::cmds::EnableVertexAttribArray*>( |
| 1380 cmd_data); | 1380 cmd_data); |
| 1381 GLuint index = static_cast<GLuint>(c.index); | 1381 GLuint index = static_cast<GLuint>(c.index); |
| 1382 DoEnableVertexAttribArray(index); | 1382 DoEnableVertexAttribArray(index); |
| 1383 return error::kNoError; | 1383 return error::kNoError; |
| 1384 } | 1384 } |
| 1385 | 1385 |
| 1386 error::Error GLES2DecoderImpl::HandleFenceSync(uint32_t immediate_data_size, | 1386 error::Error GLES2DecoderImpl::HandleFenceSync(uint32_t immediate_data_size, |
| 1387 const volatile void* cmd_data) { | 1387 const volatile void* cmd_data) { |
| 1388 if (!unsafe_es3_apis_enabled()) | 1388 if (!es3_apis_enabled()) |
| 1389 return error::kUnknownCommand; | 1389 return error::kUnknownCommand; |
| 1390 const volatile gles2::cmds::FenceSync& c = | 1390 const volatile gles2::cmds::FenceSync& c = |
| 1391 *static_cast<const volatile gles2::cmds::FenceSync*>(cmd_data); | 1391 *static_cast<const volatile gles2::cmds::FenceSync*>(cmd_data); |
| 1392 GLenum condition = static_cast<GLenum>(c.condition); | 1392 GLenum condition = static_cast<GLenum>(c.condition); |
| 1393 GLbitfield flags = static_cast<GLbitfield>(c.flags); | 1393 GLbitfield flags = static_cast<GLbitfield>(c.flags); |
| 1394 uint32_t client_id = c.client_id; | 1394 uint32_t client_id = c.client_id; |
| 1395 GLsync service_id = 0; | 1395 GLsync service_id = 0; |
| 1396 if (group_->GetSyncServiceId(client_id, &service_id)) { | 1396 if (group_->GetSyncServiceId(client_id, &service_id)) { |
| 1397 return error::kInvalidArguments; | 1397 return error::kInvalidArguments; |
| 1398 } | 1398 } |
| (...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1473 "textarget"); | 1473 "textarget"); |
| 1474 return error::kNoError; | 1474 return error::kNoError; |
| 1475 } | 1475 } |
| 1476 DoFramebufferTexture2D(target, attachment, textarget, texture, level); | 1476 DoFramebufferTexture2D(target, attachment, textarget, texture, level); |
| 1477 return error::kNoError; | 1477 return error::kNoError; |
| 1478 } | 1478 } |
| 1479 | 1479 |
| 1480 error::Error GLES2DecoderImpl::HandleFramebufferTextureLayer( | 1480 error::Error GLES2DecoderImpl::HandleFramebufferTextureLayer( |
| 1481 uint32_t immediate_data_size, | 1481 uint32_t immediate_data_size, |
| 1482 const volatile void* cmd_data) { | 1482 const volatile void* cmd_data) { |
| 1483 if (!unsafe_es3_apis_enabled()) | 1483 if (!es3_apis_enabled()) |
| 1484 return error::kUnknownCommand; | 1484 return error::kUnknownCommand; |
| 1485 const volatile gles2::cmds::FramebufferTextureLayer& c = | 1485 const volatile gles2::cmds::FramebufferTextureLayer& c = |
| 1486 *static_cast<const volatile gles2::cmds::FramebufferTextureLayer*>( | 1486 *static_cast<const volatile gles2::cmds::FramebufferTextureLayer*>( |
| 1487 cmd_data); | 1487 cmd_data); |
| 1488 GLenum target = static_cast<GLenum>(c.target); | 1488 GLenum target = static_cast<GLenum>(c.target); |
| 1489 GLenum attachment = static_cast<GLenum>(c.attachment); | 1489 GLenum attachment = static_cast<GLenum>(c.attachment); |
| 1490 GLuint texture = c.texture; | 1490 GLuint texture = c.texture; |
| 1491 GLint level = static_cast<GLint>(c.level); | 1491 GLint level = static_cast<GLint>(c.level); |
| 1492 GLint layer = static_cast<GLint>(c.layer); | 1492 GLint layer = static_cast<GLint>(c.layer); |
| 1493 if (!validators_->framebuffer_target.IsValid(target)) { | 1493 if (!validators_->framebuffer_target.IsValid(target)) { |
| (...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1607 if (!CheckUniqueAndNonNullIds(n, renderbuffers_safe) || | 1607 if (!CheckUniqueAndNonNullIds(n, renderbuffers_safe) || |
| 1608 !GenRenderbuffersHelper(n, renderbuffers_safe)) { | 1608 !GenRenderbuffersHelper(n, renderbuffers_safe)) { |
| 1609 return error::kInvalidArguments; | 1609 return error::kInvalidArguments; |
| 1610 } | 1610 } |
| 1611 return error::kNoError; | 1611 return error::kNoError; |
| 1612 } | 1612 } |
| 1613 | 1613 |
| 1614 error::Error GLES2DecoderImpl::HandleGenSamplersImmediate( | 1614 error::Error GLES2DecoderImpl::HandleGenSamplersImmediate( |
| 1615 uint32_t immediate_data_size, | 1615 uint32_t immediate_data_size, |
| 1616 const volatile void* cmd_data) { | 1616 const volatile void* cmd_data) { |
| 1617 if (!unsafe_es3_apis_enabled()) | 1617 if (!es3_apis_enabled()) |
| 1618 return error::kUnknownCommand; | 1618 return error::kUnknownCommand; |
| 1619 const volatile gles2::cmds::GenSamplersImmediate& c = | 1619 const volatile gles2::cmds::GenSamplersImmediate& c = |
| 1620 *static_cast<const volatile gles2::cmds::GenSamplersImmediate*>(cmd_data); | 1620 *static_cast<const volatile gles2::cmds::GenSamplersImmediate*>(cmd_data); |
| 1621 GLsizei n = static_cast<GLsizei>(c.n); | 1621 GLsizei n = static_cast<GLsizei>(c.n); |
| 1622 uint32_t data_size; | 1622 uint32_t data_size; |
| 1623 if (!SafeMultiplyUint32(n, sizeof(GLuint), &data_size)) { | 1623 if (!SafeMultiplyUint32(n, sizeof(GLuint), &data_size)) { |
| 1624 return error::kOutOfBounds; | 1624 return error::kOutOfBounds; |
| 1625 } | 1625 } |
| 1626 volatile GLuint* samplers = | 1626 volatile GLuint* samplers = |
| 1627 GetImmediateDataAs<volatile GLuint*>(c, data_size, immediate_data_size); | 1627 GetImmediateDataAs<volatile GLuint*>(c, data_size, immediate_data_size); |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1659 if (!CheckUniqueAndNonNullIds(n, textures_safe) || | 1659 if (!CheckUniqueAndNonNullIds(n, textures_safe) || |
| 1660 !GenTexturesHelper(n, textures_safe)) { | 1660 !GenTexturesHelper(n, textures_safe)) { |
| 1661 return error::kInvalidArguments; | 1661 return error::kInvalidArguments; |
| 1662 } | 1662 } |
| 1663 return error::kNoError; | 1663 return error::kNoError; |
| 1664 } | 1664 } |
| 1665 | 1665 |
| 1666 error::Error GLES2DecoderImpl::HandleGenTransformFeedbacksImmediate( | 1666 error::Error GLES2DecoderImpl::HandleGenTransformFeedbacksImmediate( |
| 1667 uint32_t immediate_data_size, | 1667 uint32_t immediate_data_size, |
| 1668 const volatile void* cmd_data) { | 1668 const volatile void* cmd_data) { |
| 1669 if (!unsafe_es3_apis_enabled()) | 1669 if (!es3_apis_enabled()) |
| 1670 return error::kUnknownCommand; | 1670 return error::kUnknownCommand; |
| 1671 const volatile gles2::cmds::GenTransformFeedbacksImmediate& c = | 1671 const volatile gles2::cmds::GenTransformFeedbacksImmediate& c = |
| 1672 *static_cast<const volatile gles2::cmds::GenTransformFeedbacksImmediate*>( | 1672 *static_cast<const volatile gles2::cmds::GenTransformFeedbacksImmediate*>( |
| 1673 cmd_data); | 1673 cmd_data); |
| 1674 GLsizei n = static_cast<GLsizei>(c.n); | 1674 GLsizei n = static_cast<GLsizei>(c.n); |
| 1675 uint32_t data_size; | 1675 uint32_t data_size; |
| 1676 if (!SafeMultiplyUint32(n, sizeof(GLuint), &data_size)) { | 1676 if (!SafeMultiplyUint32(n, sizeof(GLuint), &data_size)) { |
| 1677 return error::kOutOfBounds; | 1677 return error::kOutOfBounds; |
| 1678 } | 1678 } |
| 1679 volatile GLuint* ids = | 1679 volatile GLuint* ids = |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1722 GLenum error = LOCAL_PEEK_GL_ERROR("GetBooleanv"); | 1722 GLenum error = LOCAL_PEEK_GL_ERROR("GetBooleanv"); |
| 1723 if (error == GL_NO_ERROR) { | 1723 if (error == GL_NO_ERROR) { |
| 1724 result->SetNumResults(num_values); | 1724 result->SetNumResults(num_values); |
| 1725 } | 1725 } |
| 1726 return error::kNoError; | 1726 return error::kNoError; |
| 1727 } | 1727 } |
| 1728 | 1728 |
| 1729 error::Error GLES2DecoderImpl::HandleGetBufferParameteri64v( | 1729 error::Error GLES2DecoderImpl::HandleGetBufferParameteri64v( |
| 1730 uint32_t immediate_data_size, | 1730 uint32_t immediate_data_size, |
| 1731 const volatile void* cmd_data) { | 1731 const volatile void* cmd_data) { |
| 1732 if (!unsafe_es3_apis_enabled()) | 1732 if (!es3_apis_enabled()) |
| 1733 return error::kUnknownCommand; | 1733 return error::kUnknownCommand; |
| 1734 const volatile gles2::cmds::GetBufferParameteri64v& c = | 1734 const volatile gles2::cmds::GetBufferParameteri64v& c = |
| 1735 *static_cast<const volatile gles2::cmds::GetBufferParameteri64v*>( | 1735 *static_cast<const volatile gles2::cmds::GetBufferParameteri64v*>( |
| 1736 cmd_data); | 1736 cmd_data); |
| 1737 GLenum target = static_cast<GLenum>(c.target); | 1737 GLenum target = static_cast<GLenum>(c.target); |
| 1738 GLenum pname = static_cast<GLenum>(c.pname); | 1738 GLenum pname = static_cast<GLenum>(c.pname); |
| 1739 typedef cmds::GetBufferParameteri64v::Result Result; | 1739 typedef cmds::GetBufferParameteri64v::Result Result; |
| 1740 GLsizei num_values = 0; | 1740 GLsizei num_values = 0; |
| 1741 if (!GetNumValuesReturnedForGLGet(pname, &num_values)) { | 1741 if (!GetNumValuesReturnedForGLGet(pname, &num_values)) { |
| 1742 LOCAL_SET_GL_ERROR_INVALID_ENUM(":GetBufferParameteri64v", pname, "pname"); | 1742 LOCAL_SET_GL_ERROR_INVALID_ENUM(":GetBufferParameteri64v", pname, "pname"); |
| (...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1896 GLenum error = LOCAL_PEEK_GL_ERROR("GetFramebufferAttachmentParameteriv"); | 1896 GLenum error = LOCAL_PEEK_GL_ERROR("GetFramebufferAttachmentParameteriv"); |
| 1897 if (error == GL_NO_ERROR) { | 1897 if (error == GL_NO_ERROR) { |
| 1898 result->SetNumResults(num_values); | 1898 result->SetNumResults(num_values); |
| 1899 } | 1899 } |
| 1900 return error::kNoError; | 1900 return error::kNoError; |
| 1901 } | 1901 } |
| 1902 | 1902 |
| 1903 error::Error GLES2DecoderImpl::HandleGetInteger64v( | 1903 error::Error GLES2DecoderImpl::HandleGetInteger64v( |
| 1904 uint32_t immediate_data_size, | 1904 uint32_t immediate_data_size, |
| 1905 const volatile void* cmd_data) { | 1905 const volatile void* cmd_data) { |
| 1906 if (!unsafe_es3_apis_enabled()) | 1906 if (!es3_apis_enabled()) |
| 1907 return error::kUnknownCommand; | 1907 return error::kUnknownCommand; |
| 1908 const volatile gles2::cmds::GetInteger64v& c = | 1908 const volatile gles2::cmds::GetInteger64v& c = |
| 1909 *static_cast<const volatile gles2::cmds::GetInteger64v*>(cmd_data); | 1909 *static_cast<const volatile gles2::cmds::GetInteger64v*>(cmd_data); |
| 1910 GLenum pname = static_cast<GLenum>(c.pname); | 1910 GLenum pname = static_cast<GLenum>(c.pname); |
| 1911 typedef cmds::GetInteger64v::Result Result; | 1911 typedef cmds::GetInteger64v::Result Result; |
| 1912 GLsizei num_values = 0; | 1912 GLsizei num_values = 0; |
| 1913 if (!GetNumValuesReturnedForGLGet(pname, &num_values)) { | 1913 if (!GetNumValuesReturnedForGLGet(pname, &num_values)) { |
| 1914 LOCAL_SET_GL_ERROR_INVALID_ENUM(":GetInteger64v", pname, "pname"); | 1914 LOCAL_SET_GL_ERROR_INVALID_ENUM(":GetInteger64v", pname, "pname"); |
| 1915 return error::kNoError; | 1915 return error::kNoError; |
| 1916 } | 1916 } |
| (...skipping 16 matching lines...) Expand all Loading... |
| 1933 GLenum error = LOCAL_PEEK_GL_ERROR("GetInteger64v"); | 1933 GLenum error = LOCAL_PEEK_GL_ERROR("GetInteger64v"); |
| 1934 if (error == GL_NO_ERROR) { | 1934 if (error == GL_NO_ERROR) { |
| 1935 result->SetNumResults(num_values); | 1935 result->SetNumResults(num_values); |
| 1936 } | 1936 } |
| 1937 return error::kNoError; | 1937 return error::kNoError; |
| 1938 } | 1938 } |
| 1939 | 1939 |
| 1940 error::Error GLES2DecoderImpl::HandleGetIntegeri_v( | 1940 error::Error GLES2DecoderImpl::HandleGetIntegeri_v( |
| 1941 uint32_t immediate_data_size, | 1941 uint32_t immediate_data_size, |
| 1942 const volatile void* cmd_data) { | 1942 const volatile void* cmd_data) { |
| 1943 if (!unsafe_es3_apis_enabled()) | 1943 if (!es3_apis_enabled()) |
| 1944 return error::kUnknownCommand; | 1944 return error::kUnknownCommand; |
| 1945 const volatile gles2::cmds::GetIntegeri_v& c = | 1945 const volatile gles2::cmds::GetIntegeri_v& c = |
| 1946 *static_cast<const volatile gles2::cmds::GetIntegeri_v*>(cmd_data); | 1946 *static_cast<const volatile gles2::cmds::GetIntegeri_v*>(cmd_data); |
| 1947 GLenum pname = static_cast<GLenum>(c.pname); | 1947 GLenum pname = static_cast<GLenum>(c.pname); |
| 1948 GLuint index = static_cast<GLuint>(c.index); | 1948 GLuint index = static_cast<GLuint>(c.index); |
| 1949 typedef cmds::GetIntegeri_v::Result Result; | 1949 typedef cmds::GetIntegeri_v::Result Result; |
| 1950 GLsizei num_values = 0; | 1950 GLsizei num_values = 0; |
| 1951 if (!GetNumValuesReturnedForGLGet(pname, &num_values)) { | 1951 if (!GetNumValuesReturnedForGLGet(pname, &num_values)) { |
| 1952 LOCAL_SET_GL_ERROR_INVALID_ENUM(":GetIntegeri_v", pname, "pname"); | 1952 LOCAL_SET_GL_ERROR_INVALID_ENUM(":GetIntegeri_v", pname, "pname"); |
| 1953 return error::kNoError; | 1953 return error::kNoError; |
| (...skipping 12 matching lines...) Expand all Loading... |
| 1966 if (result->size != 0) { | 1966 if (result->size != 0) { |
| 1967 return error::kInvalidArguments; | 1967 return error::kInvalidArguments; |
| 1968 } | 1968 } |
| 1969 DoGetIntegeri_v(pname, index, data, num_values); | 1969 DoGetIntegeri_v(pname, index, data, num_values); |
| 1970 result->SetNumResults(num_values); | 1970 result->SetNumResults(num_values); |
| 1971 return error::kNoError; | 1971 return error::kNoError; |
| 1972 } | 1972 } |
| 1973 error::Error GLES2DecoderImpl::HandleGetInteger64i_v( | 1973 error::Error GLES2DecoderImpl::HandleGetInteger64i_v( |
| 1974 uint32_t immediate_data_size, | 1974 uint32_t immediate_data_size, |
| 1975 const volatile void* cmd_data) { | 1975 const volatile void* cmd_data) { |
| 1976 if (!unsafe_es3_apis_enabled()) | 1976 if (!es3_apis_enabled()) |
| 1977 return error::kUnknownCommand; | 1977 return error::kUnknownCommand; |
| 1978 const volatile gles2::cmds::GetInteger64i_v& c = | 1978 const volatile gles2::cmds::GetInteger64i_v& c = |
| 1979 *static_cast<const volatile gles2::cmds::GetInteger64i_v*>(cmd_data); | 1979 *static_cast<const volatile gles2::cmds::GetInteger64i_v*>(cmd_data); |
| 1980 GLenum pname = static_cast<GLenum>(c.pname); | 1980 GLenum pname = static_cast<GLenum>(c.pname); |
| 1981 GLuint index = static_cast<GLuint>(c.index); | 1981 GLuint index = static_cast<GLuint>(c.index); |
| 1982 typedef cmds::GetInteger64i_v::Result Result; | 1982 typedef cmds::GetInteger64i_v::Result Result; |
| 1983 GLsizei num_values = 0; | 1983 GLsizei num_values = 0; |
| 1984 if (!GetNumValuesReturnedForGLGet(pname, &num_values)) { | 1984 if (!GetNumValuesReturnedForGLGet(pname, &num_values)) { |
| 1985 LOCAL_SET_GL_ERROR_INVALID_ENUM(":GetInteger64i_v", pname, "pname"); | 1985 LOCAL_SET_GL_ERROR_INVALID_ENUM(":GetInteger64i_v", pname, "pname"); |
| 1986 return error::kNoError; | 1986 return error::kNoError; |
| (...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2114 GLenum error = LOCAL_PEEK_GL_ERROR("GetRenderbufferParameteriv"); | 2114 GLenum error = LOCAL_PEEK_GL_ERROR("GetRenderbufferParameteriv"); |
| 2115 if (error == GL_NO_ERROR) { | 2115 if (error == GL_NO_ERROR) { |
| 2116 result->SetNumResults(num_values); | 2116 result->SetNumResults(num_values); |
| 2117 } | 2117 } |
| 2118 return error::kNoError; | 2118 return error::kNoError; |
| 2119 } | 2119 } |
| 2120 | 2120 |
| 2121 error::Error GLES2DecoderImpl::HandleGetSamplerParameterfv( | 2121 error::Error GLES2DecoderImpl::HandleGetSamplerParameterfv( |
| 2122 uint32_t immediate_data_size, | 2122 uint32_t immediate_data_size, |
| 2123 const volatile void* cmd_data) { | 2123 const volatile void* cmd_data) { |
| 2124 if (!unsafe_es3_apis_enabled()) | 2124 if (!es3_apis_enabled()) |
| 2125 return error::kUnknownCommand; | 2125 return error::kUnknownCommand; |
| 2126 const volatile gles2::cmds::GetSamplerParameterfv& c = | 2126 const volatile gles2::cmds::GetSamplerParameterfv& c = |
| 2127 *static_cast<const volatile gles2::cmds::GetSamplerParameterfv*>( | 2127 *static_cast<const volatile gles2::cmds::GetSamplerParameterfv*>( |
| 2128 cmd_data); | 2128 cmd_data); |
| 2129 GLuint sampler = c.sampler; | 2129 GLuint sampler = c.sampler; |
| 2130 GLenum pname = static_cast<GLenum>(c.pname); | 2130 GLenum pname = static_cast<GLenum>(c.pname); |
| 2131 typedef cmds::GetSamplerParameterfv::Result Result; | 2131 typedef cmds::GetSamplerParameterfv::Result Result; |
| 2132 GLsizei num_values = 0; | 2132 GLsizei num_values = 0; |
| 2133 if (!GetNumValuesReturnedForGLGet(pname, &num_values)) { | 2133 if (!GetNumValuesReturnedForGLGet(pname, &num_values)) { |
| 2134 LOCAL_SET_GL_ERROR_INVALID_ENUM(":GetSamplerParameterfv", pname, "pname"); | 2134 LOCAL_SET_GL_ERROR_INVALID_ENUM(":GetSamplerParameterfv", pname, "pname"); |
| (...skipping 18 matching lines...) Expand all Loading... |
| 2153 GLenum error = LOCAL_PEEK_GL_ERROR("GetSamplerParameterfv"); | 2153 GLenum error = LOCAL_PEEK_GL_ERROR("GetSamplerParameterfv"); |
| 2154 if (error == GL_NO_ERROR) { | 2154 if (error == GL_NO_ERROR) { |
| 2155 result->SetNumResults(num_values); | 2155 result->SetNumResults(num_values); |
| 2156 } | 2156 } |
| 2157 return error::kNoError; | 2157 return error::kNoError; |
| 2158 } | 2158 } |
| 2159 | 2159 |
| 2160 error::Error GLES2DecoderImpl::HandleGetSamplerParameteriv( | 2160 error::Error GLES2DecoderImpl::HandleGetSamplerParameteriv( |
| 2161 uint32_t immediate_data_size, | 2161 uint32_t immediate_data_size, |
| 2162 const volatile void* cmd_data) { | 2162 const volatile void* cmd_data) { |
| 2163 if (!unsafe_es3_apis_enabled()) | 2163 if (!es3_apis_enabled()) |
| 2164 return error::kUnknownCommand; | 2164 return error::kUnknownCommand; |
| 2165 const volatile gles2::cmds::GetSamplerParameteriv& c = | 2165 const volatile gles2::cmds::GetSamplerParameteriv& c = |
| 2166 *static_cast<const volatile gles2::cmds::GetSamplerParameteriv*>( | 2166 *static_cast<const volatile gles2::cmds::GetSamplerParameteriv*>( |
| 2167 cmd_data); | 2167 cmd_data); |
| 2168 GLuint sampler = c.sampler; | 2168 GLuint sampler = c.sampler; |
| 2169 GLenum pname = static_cast<GLenum>(c.pname); | 2169 GLenum pname = static_cast<GLenum>(c.pname); |
| 2170 typedef cmds::GetSamplerParameteriv::Result Result; | 2170 typedef cmds::GetSamplerParameteriv::Result Result; |
| 2171 GLsizei num_values = 0; | 2171 GLsizei num_values = 0; |
| 2172 if (!GetNumValuesReturnedForGLGet(pname, &num_values)) { | 2172 if (!GetNumValuesReturnedForGLGet(pname, &num_values)) { |
| 2173 LOCAL_SET_GL_ERROR_INVALID_ENUM(":GetSamplerParameteriv", pname, "pname"); | 2173 LOCAL_SET_GL_ERROR_INVALID_ENUM(":GetSamplerParameteriv", pname, "pname"); |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2227 DoGetShaderiv(shader, pname, params, num_values); | 2227 DoGetShaderiv(shader, pname, params, num_values); |
| 2228 GLenum error = LOCAL_PEEK_GL_ERROR("GetShaderiv"); | 2228 GLenum error = LOCAL_PEEK_GL_ERROR("GetShaderiv"); |
| 2229 if (error == GL_NO_ERROR) { | 2229 if (error == GL_NO_ERROR) { |
| 2230 result->SetNumResults(num_values); | 2230 result->SetNumResults(num_values); |
| 2231 } | 2231 } |
| 2232 return error::kNoError; | 2232 return error::kNoError; |
| 2233 } | 2233 } |
| 2234 | 2234 |
| 2235 error::Error GLES2DecoderImpl::HandleGetSynciv(uint32_t immediate_data_size, | 2235 error::Error GLES2DecoderImpl::HandleGetSynciv(uint32_t immediate_data_size, |
| 2236 const volatile void* cmd_data) { | 2236 const volatile void* cmd_data) { |
| 2237 if (!unsafe_es3_apis_enabled()) | 2237 if (!es3_apis_enabled()) |
| 2238 return error::kUnknownCommand; | 2238 return error::kUnknownCommand; |
| 2239 const volatile gles2::cmds::GetSynciv& c = | 2239 const volatile gles2::cmds::GetSynciv& c = |
| 2240 *static_cast<const volatile gles2::cmds::GetSynciv*>(cmd_data); | 2240 *static_cast<const volatile gles2::cmds::GetSynciv*>(cmd_data); |
| 2241 GLuint sync = static_cast<GLuint>(c.sync); | 2241 GLuint sync = static_cast<GLuint>(c.sync); |
| 2242 GLenum pname = static_cast<GLenum>(c.pname); | 2242 GLenum pname = static_cast<GLenum>(c.pname); |
| 2243 typedef cmds::GetSynciv::Result Result; | 2243 typedef cmds::GetSynciv::Result Result; |
| 2244 GLsizei num_values = 0; | 2244 GLsizei num_values = 0; |
| 2245 if (!GetNumValuesReturnedForGLGet(pname, &num_values)) { | 2245 if (!GetNumValuesReturnedForGLGet(pname, &num_values)) { |
| 2246 LOCAL_SET_GL_ERROR_INVALID_ENUM(":GetSynciv", pname, "pname"); | 2246 LOCAL_SET_GL_ERROR_INVALID_ENUM(":GetSynciv", pname, "pname"); |
| 2247 return error::kNoError; | 2247 return error::kNoError; |
| (...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2422 GLenum error = LOCAL_PEEK_GL_ERROR("GetVertexAttribiv"); | 2422 GLenum error = LOCAL_PEEK_GL_ERROR("GetVertexAttribiv"); |
| 2423 if (error == GL_NO_ERROR) { | 2423 if (error == GL_NO_ERROR) { |
| 2424 result->SetNumResults(num_values); | 2424 result->SetNumResults(num_values); |
| 2425 } | 2425 } |
| 2426 return error::kNoError; | 2426 return error::kNoError; |
| 2427 } | 2427 } |
| 2428 | 2428 |
| 2429 error::Error GLES2DecoderImpl::HandleGetVertexAttribIiv( | 2429 error::Error GLES2DecoderImpl::HandleGetVertexAttribIiv( |
| 2430 uint32_t immediate_data_size, | 2430 uint32_t immediate_data_size, |
| 2431 const volatile void* cmd_data) { | 2431 const volatile void* cmd_data) { |
| 2432 if (!unsafe_es3_apis_enabled()) | 2432 if (!es3_apis_enabled()) |
| 2433 return error::kUnknownCommand; | 2433 return error::kUnknownCommand; |
| 2434 const volatile gles2::cmds::GetVertexAttribIiv& c = | 2434 const volatile gles2::cmds::GetVertexAttribIiv& c = |
| 2435 *static_cast<const volatile gles2::cmds::GetVertexAttribIiv*>(cmd_data); | 2435 *static_cast<const volatile gles2::cmds::GetVertexAttribIiv*>(cmd_data); |
| 2436 GLuint index = static_cast<GLuint>(c.index); | 2436 GLuint index = static_cast<GLuint>(c.index); |
| 2437 GLenum pname = static_cast<GLenum>(c.pname); | 2437 GLenum pname = static_cast<GLenum>(c.pname); |
| 2438 typedef cmds::GetVertexAttribIiv::Result Result; | 2438 typedef cmds::GetVertexAttribIiv::Result Result; |
| 2439 GLsizei num_values = 0; | 2439 GLsizei num_values = 0; |
| 2440 if (!GetNumValuesReturnedForGLGet(pname, &num_values)) { | 2440 if (!GetNumValuesReturnedForGLGet(pname, &num_values)) { |
| 2441 LOCAL_SET_GL_ERROR_INVALID_ENUM(":GetVertexAttribIiv", pname, "pname"); | 2441 LOCAL_SET_GL_ERROR_INVALID_ENUM(":GetVertexAttribIiv", pname, "pname"); |
| 2442 return error::kNoError; | 2442 return error::kNoError; |
| (...skipping 17 matching lines...) Expand all Loading... |
| 2460 GLenum error = LOCAL_PEEK_GL_ERROR("GetVertexAttribIiv"); | 2460 GLenum error = LOCAL_PEEK_GL_ERROR("GetVertexAttribIiv"); |
| 2461 if (error == GL_NO_ERROR) { | 2461 if (error == GL_NO_ERROR) { |
| 2462 result->SetNumResults(num_values); | 2462 result->SetNumResults(num_values); |
| 2463 } | 2463 } |
| 2464 return error::kNoError; | 2464 return error::kNoError; |
| 2465 } | 2465 } |
| 2466 | 2466 |
| 2467 error::Error GLES2DecoderImpl::HandleGetVertexAttribIuiv( | 2467 error::Error GLES2DecoderImpl::HandleGetVertexAttribIuiv( |
| 2468 uint32_t immediate_data_size, | 2468 uint32_t immediate_data_size, |
| 2469 const volatile void* cmd_data) { | 2469 const volatile void* cmd_data) { |
| 2470 if (!unsafe_es3_apis_enabled()) | 2470 if (!es3_apis_enabled()) |
| 2471 return error::kUnknownCommand; | 2471 return error::kUnknownCommand; |
| 2472 const volatile gles2::cmds::GetVertexAttribIuiv& c = | 2472 const volatile gles2::cmds::GetVertexAttribIuiv& c = |
| 2473 *static_cast<const volatile gles2::cmds::GetVertexAttribIuiv*>(cmd_data); | 2473 *static_cast<const volatile gles2::cmds::GetVertexAttribIuiv*>(cmd_data); |
| 2474 GLuint index = static_cast<GLuint>(c.index); | 2474 GLuint index = static_cast<GLuint>(c.index); |
| 2475 GLenum pname = static_cast<GLenum>(c.pname); | 2475 GLenum pname = static_cast<GLenum>(c.pname); |
| 2476 typedef cmds::GetVertexAttribIuiv::Result Result; | 2476 typedef cmds::GetVertexAttribIuiv::Result Result; |
| 2477 GLsizei num_values = 0; | 2477 GLsizei num_values = 0; |
| 2478 if (!GetNumValuesReturnedForGLGet(pname, &num_values)) { | 2478 if (!GetNumValuesReturnedForGLGet(pname, &num_values)) { |
| 2479 LOCAL_SET_GL_ERROR_INVALID_ENUM(":GetVertexAttribIuiv", pname, "pname"); | 2479 LOCAL_SET_GL_ERROR_INVALID_ENUM(":GetVertexAttribIuiv", pname, "pname"); |
| 2480 return error::kNoError; | 2480 return error::kNoError; |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2535 break; | 2535 break; |
| 2536 default: | 2536 default: |
| 2537 NOTREACHED(); | 2537 NOTREACHED(); |
| 2538 } | 2538 } |
| 2539 return error::kNoError; | 2539 return error::kNoError; |
| 2540 } | 2540 } |
| 2541 | 2541 |
| 2542 error::Error GLES2DecoderImpl::HandleInvalidateFramebufferImmediate( | 2542 error::Error GLES2DecoderImpl::HandleInvalidateFramebufferImmediate( |
| 2543 uint32_t immediate_data_size, | 2543 uint32_t immediate_data_size, |
| 2544 const volatile void* cmd_data) { | 2544 const volatile void* cmd_data) { |
| 2545 if (!unsafe_es3_apis_enabled()) | 2545 if (!es3_apis_enabled()) |
| 2546 return error::kUnknownCommand; | 2546 return error::kUnknownCommand; |
| 2547 const volatile gles2::cmds::InvalidateFramebufferImmediate& c = | 2547 const volatile gles2::cmds::InvalidateFramebufferImmediate& c = |
| 2548 *static_cast<const volatile gles2::cmds::InvalidateFramebufferImmediate*>( | 2548 *static_cast<const volatile gles2::cmds::InvalidateFramebufferImmediate*>( |
| 2549 cmd_data); | 2549 cmd_data); |
| 2550 GLenum target = static_cast<GLenum>(c.target); | 2550 GLenum target = static_cast<GLenum>(c.target); |
| 2551 GLsizei count = static_cast<GLsizei>(c.count); | 2551 GLsizei count = static_cast<GLsizei>(c.count); |
| 2552 uint32_t data_size = 0; | 2552 uint32_t data_size = 0; |
| 2553 if (count >= 0 && | 2553 if (count >= 0 && |
| 2554 !GLES2Util::ComputeDataSize(count, sizeof(GLenum), 1, &data_size)) { | 2554 !GLES2Util::ComputeDataSize(count, sizeof(GLenum), 1, &data_size)) { |
| 2555 return error::kOutOfBounds; | 2555 return error::kOutOfBounds; |
| (...skipping 17 matching lines...) Expand all Loading... |
| 2573 if (attachments == NULL) { | 2573 if (attachments == NULL) { |
| 2574 return error::kOutOfBounds; | 2574 return error::kOutOfBounds; |
| 2575 } | 2575 } |
| 2576 DoInvalidateFramebuffer(target, count, attachments); | 2576 DoInvalidateFramebuffer(target, count, attachments); |
| 2577 return error::kNoError; | 2577 return error::kNoError; |
| 2578 } | 2578 } |
| 2579 | 2579 |
| 2580 error::Error GLES2DecoderImpl::HandleInvalidateSubFramebufferImmediate( | 2580 error::Error GLES2DecoderImpl::HandleInvalidateSubFramebufferImmediate( |
| 2581 uint32_t immediate_data_size, | 2581 uint32_t immediate_data_size, |
| 2582 const volatile void* cmd_data) { | 2582 const volatile void* cmd_data) { |
| 2583 if (!unsafe_es3_apis_enabled()) | 2583 if (!es3_apis_enabled()) |
| 2584 return error::kUnknownCommand; | 2584 return error::kUnknownCommand; |
| 2585 const volatile gles2::cmds::InvalidateSubFramebufferImmediate& c = | 2585 const volatile gles2::cmds::InvalidateSubFramebufferImmediate& c = |
| 2586 *static_cast< | 2586 *static_cast< |
| 2587 const volatile gles2::cmds::InvalidateSubFramebufferImmediate*>( | 2587 const volatile gles2::cmds::InvalidateSubFramebufferImmediate*>( |
| 2588 cmd_data); | 2588 cmd_data); |
| 2589 GLenum target = static_cast<GLenum>(c.target); | 2589 GLenum target = static_cast<GLenum>(c.target); |
| 2590 GLsizei count = static_cast<GLsizei>(c.count); | 2590 GLsizei count = static_cast<GLsizei>(c.count); |
| 2591 uint32_t data_size = 0; | 2591 uint32_t data_size = 0; |
| 2592 if (count >= 0 && | 2592 if (count >= 0 && |
| 2593 !GLES2Util::ComputeDataSize(count, sizeof(GLenum), 1, &data_size)) { | 2593 !GLES2Util::ComputeDataSize(count, sizeof(GLenum), 1, &data_size)) { |
| (...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2706 c.result_shm_id, c.result_shm_offset, sizeof(*result_dst)); | 2706 c.result_shm_id, c.result_shm_offset, sizeof(*result_dst)); |
| 2707 if (!result_dst) { | 2707 if (!result_dst) { |
| 2708 return error::kOutOfBounds; | 2708 return error::kOutOfBounds; |
| 2709 } | 2709 } |
| 2710 *result_dst = DoIsRenderbuffer(renderbuffer); | 2710 *result_dst = DoIsRenderbuffer(renderbuffer); |
| 2711 return error::kNoError; | 2711 return error::kNoError; |
| 2712 } | 2712 } |
| 2713 | 2713 |
| 2714 error::Error GLES2DecoderImpl::HandleIsSampler(uint32_t immediate_data_size, | 2714 error::Error GLES2DecoderImpl::HandleIsSampler(uint32_t immediate_data_size, |
| 2715 const volatile void* cmd_data) { | 2715 const volatile void* cmd_data) { |
| 2716 if (!unsafe_es3_apis_enabled()) | 2716 if (!es3_apis_enabled()) |
| 2717 return error::kUnknownCommand; | 2717 return error::kUnknownCommand; |
| 2718 const volatile gles2::cmds::IsSampler& c = | 2718 const volatile gles2::cmds::IsSampler& c = |
| 2719 *static_cast<const volatile gles2::cmds::IsSampler*>(cmd_data); | 2719 *static_cast<const volatile gles2::cmds::IsSampler*>(cmd_data); |
| 2720 GLuint sampler = c.sampler; | 2720 GLuint sampler = c.sampler; |
| 2721 typedef cmds::IsSampler::Result Result; | 2721 typedef cmds::IsSampler::Result Result; |
| 2722 Result* result_dst = GetSharedMemoryAs<Result*>( | 2722 Result* result_dst = GetSharedMemoryAs<Result*>( |
| 2723 c.result_shm_id, c.result_shm_offset, sizeof(*result_dst)); | 2723 c.result_shm_id, c.result_shm_offset, sizeof(*result_dst)); |
| 2724 if (!result_dst) { | 2724 if (!result_dst) { |
| 2725 return error::kOutOfBounds; | 2725 return error::kOutOfBounds; |
| 2726 } | 2726 } |
| (...skipping 11 matching lines...) Expand all Loading... |
| 2738 c.result_shm_id, c.result_shm_offset, sizeof(*result_dst)); | 2738 c.result_shm_id, c.result_shm_offset, sizeof(*result_dst)); |
| 2739 if (!result_dst) { | 2739 if (!result_dst) { |
| 2740 return error::kOutOfBounds; | 2740 return error::kOutOfBounds; |
| 2741 } | 2741 } |
| 2742 *result_dst = DoIsShader(shader); | 2742 *result_dst = DoIsShader(shader); |
| 2743 return error::kNoError; | 2743 return error::kNoError; |
| 2744 } | 2744 } |
| 2745 | 2745 |
| 2746 error::Error GLES2DecoderImpl::HandleIsSync(uint32_t immediate_data_size, | 2746 error::Error GLES2DecoderImpl::HandleIsSync(uint32_t immediate_data_size, |
| 2747 const volatile void* cmd_data) { | 2747 const volatile void* cmd_data) { |
| 2748 if (!unsafe_es3_apis_enabled()) | 2748 if (!es3_apis_enabled()) |
| 2749 return error::kUnknownCommand; | 2749 return error::kUnknownCommand; |
| 2750 const volatile gles2::cmds::IsSync& c = | 2750 const volatile gles2::cmds::IsSync& c = |
| 2751 *static_cast<const volatile gles2::cmds::IsSync*>(cmd_data); | 2751 *static_cast<const volatile gles2::cmds::IsSync*>(cmd_data); |
| 2752 GLuint sync = c.sync; | 2752 GLuint sync = c.sync; |
| 2753 typedef cmds::IsSync::Result Result; | 2753 typedef cmds::IsSync::Result Result; |
| 2754 Result* result_dst = GetSharedMemoryAs<Result*>( | 2754 Result* result_dst = GetSharedMemoryAs<Result*>( |
| 2755 c.result_shm_id, c.result_shm_offset, sizeof(*result_dst)); | 2755 c.result_shm_id, c.result_shm_offset, sizeof(*result_dst)); |
| 2756 if (!result_dst) { | 2756 if (!result_dst) { |
| 2757 return error::kOutOfBounds; | 2757 return error::kOutOfBounds; |
| 2758 } | 2758 } |
| (...skipping 12 matching lines...) Expand all Loading... |
| 2771 if (!result_dst) { | 2771 if (!result_dst) { |
| 2772 return error::kOutOfBounds; | 2772 return error::kOutOfBounds; |
| 2773 } | 2773 } |
| 2774 *result_dst = DoIsTexture(texture); | 2774 *result_dst = DoIsTexture(texture); |
| 2775 return error::kNoError; | 2775 return error::kNoError; |
| 2776 } | 2776 } |
| 2777 | 2777 |
| 2778 error::Error GLES2DecoderImpl::HandleIsTransformFeedback( | 2778 error::Error GLES2DecoderImpl::HandleIsTransformFeedback( |
| 2779 uint32_t immediate_data_size, | 2779 uint32_t immediate_data_size, |
| 2780 const volatile void* cmd_data) { | 2780 const volatile void* cmd_data) { |
| 2781 if (!unsafe_es3_apis_enabled()) | 2781 if (!es3_apis_enabled()) |
| 2782 return error::kUnknownCommand; | 2782 return error::kUnknownCommand; |
| 2783 const volatile gles2::cmds::IsTransformFeedback& c = | 2783 const volatile gles2::cmds::IsTransformFeedback& c = |
| 2784 *static_cast<const volatile gles2::cmds::IsTransformFeedback*>(cmd_data); | 2784 *static_cast<const volatile gles2::cmds::IsTransformFeedback*>(cmd_data); |
| 2785 GLuint transformfeedback = c.transformfeedback; | 2785 GLuint transformfeedback = c.transformfeedback; |
| 2786 typedef cmds::IsTransformFeedback::Result Result; | 2786 typedef cmds::IsTransformFeedback::Result Result; |
| 2787 Result* result_dst = GetSharedMemoryAs<Result*>( | 2787 Result* result_dst = GetSharedMemoryAs<Result*>( |
| 2788 c.result_shm_id, c.result_shm_offset, sizeof(*result_dst)); | 2788 c.result_shm_id, c.result_shm_offset, sizeof(*result_dst)); |
| 2789 if (!result_dst) { | 2789 if (!result_dst) { |
| 2790 return error::kOutOfBounds; | 2790 return error::kOutOfBounds; |
| 2791 } | 2791 } |
| (...skipping 23 matching lines...) Expand all Loading... |
| 2815 const volatile gles2::cmds::LinkProgram& c = | 2815 const volatile gles2::cmds::LinkProgram& c = |
| 2816 *static_cast<const volatile gles2::cmds::LinkProgram*>(cmd_data); | 2816 *static_cast<const volatile gles2::cmds::LinkProgram*>(cmd_data); |
| 2817 GLuint program = c.program; | 2817 GLuint program = c.program; |
| 2818 DoLinkProgram(program); | 2818 DoLinkProgram(program); |
| 2819 return error::kNoError; | 2819 return error::kNoError; |
| 2820 } | 2820 } |
| 2821 | 2821 |
| 2822 error::Error GLES2DecoderImpl::HandlePauseTransformFeedback( | 2822 error::Error GLES2DecoderImpl::HandlePauseTransformFeedback( |
| 2823 uint32_t immediate_data_size, | 2823 uint32_t immediate_data_size, |
| 2824 const volatile void* cmd_data) { | 2824 const volatile void* cmd_data) { |
| 2825 if (!unsafe_es3_apis_enabled()) | 2825 if (!es3_apis_enabled()) |
| 2826 return error::kUnknownCommand; | 2826 return error::kUnknownCommand; |
| 2827 DoPauseTransformFeedback(); | 2827 DoPauseTransformFeedback(); |
| 2828 return error::kNoError; | 2828 return error::kNoError; |
| 2829 } | 2829 } |
| 2830 | 2830 |
| 2831 error::Error GLES2DecoderImpl::HandlePolygonOffset( | 2831 error::Error GLES2DecoderImpl::HandlePolygonOffset( |
| 2832 uint32_t immediate_data_size, | 2832 uint32_t immediate_data_size, |
| 2833 const volatile void* cmd_data) { | 2833 const volatile void* cmd_data) { |
| 2834 const volatile gles2::cmds::PolygonOffset& c = | 2834 const volatile gles2::cmds::PolygonOffset& c = |
| 2835 *static_cast<const volatile gles2::cmds::PolygonOffset*>(cmd_data); | 2835 *static_cast<const volatile gles2::cmds::PolygonOffset*>(cmd_data); |
| 2836 GLfloat factor = static_cast<GLfloat>(c.factor); | 2836 GLfloat factor = static_cast<GLfloat>(c.factor); |
| 2837 GLfloat units = static_cast<GLfloat>(c.units); | 2837 GLfloat units = static_cast<GLfloat>(c.units); |
| 2838 if (state_.polygon_offset_factor != factor || | 2838 if (state_.polygon_offset_factor != factor || |
| 2839 state_.polygon_offset_units != units) { | 2839 state_.polygon_offset_units != units) { |
| 2840 state_.polygon_offset_factor = factor; | 2840 state_.polygon_offset_factor = factor; |
| 2841 state_.polygon_offset_units = units; | 2841 state_.polygon_offset_units = units; |
| 2842 glPolygonOffset(factor, units); | 2842 glPolygonOffset(factor, units); |
| 2843 } | 2843 } |
| 2844 return error::kNoError; | 2844 return error::kNoError; |
| 2845 } | 2845 } |
| 2846 | 2846 |
| 2847 error::Error GLES2DecoderImpl::HandleReadBuffer(uint32_t immediate_data_size, | 2847 error::Error GLES2DecoderImpl::HandleReadBuffer(uint32_t immediate_data_size, |
| 2848 const volatile void* cmd_data) { | 2848 const volatile void* cmd_data) { |
| 2849 if (!unsafe_es3_apis_enabled()) | 2849 if (!es3_apis_enabled()) |
| 2850 return error::kUnknownCommand; | 2850 return error::kUnknownCommand; |
| 2851 const volatile gles2::cmds::ReadBuffer& c = | 2851 const volatile gles2::cmds::ReadBuffer& c = |
| 2852 *static_cast<const volatile gles2::cmds::ReadBuffer*>(cmd_data); | 2852 *static_cast<const volatile gles2::cmds::ReadBuffer*>(cmd_data); |
| 2853 GLenum src = static_cast<GLenum>(c.src); | 2853 GLenum src = static_cast<GLenum>(c.src); |
| 2854 if (!validators_->read_buffer.IsValid(src)) { | 2854 if (!validators_->read_buffer.IsValid(src)) { |
| 2855 LOCAL_SET_GL_ERROR_INVALID_ENUM("glReadBuffer", src, "src"); | 2855 LOCAL_SET_GL_ERROR_INVALID_ENUM("glReadBuffer", src, "src"); |
| 2856 return error::kNoError; | 2856 return error::kNoError; |
| 2857 } | 2857 } |
| 2858 DoReadBuffer(src); | 2858 DoReadBuffer(src); |
| 2859 return error::kNoError; | 2859 return error::kNoError; |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2892 LOCAL_SET_GL_ERROR(GL_INVALID_VALUE, "glRenderbufferStorage", "height < 0"); | 2892 LOCAL_SET_GL_ERROR(GL_INVALID_VALUE, "glRenderbufferStorage", "height < 0"); |
| 2893 return error::kNoError; | 2893 return error::kNoError; |
| 2894 } | 2894 } |
| 2895 DoRenderbufferStorage(target, internalformat, width, height); | 2895 DoRenderbufferStorage(target, internalformat, width, height); |
| 2896 return error::kNoError; | 2896 return error::kNoError; |
| 2897 } | 2897 } |
| 2898 | 2898 |
| 2899 error::Error GLES2DecoderImpl::HandleResumeTransformFeedback( | 2899 error::Error GLES2DecoderImpl::HandleResumeTransformFeedback( |
| 2900 uint32_t immediate_data_size, | 2900 uint32_t immediate_data_size, |
| 2901 const volatile void* cmd_data) { | 2901 const volatile void* cmd_data) { |
| 2902 if (!unsafe_es3_apis_enabled()) | 2902 if (!es3_apis_enabled()) |
| 2903 return error::kUnknownCommand; | 2903 return error::kUnknownCommand; |
| 2904 DoResumeTransformFeedback(); | 2904 DoResumeTransformFeedback(); |
| 2905 return error::kNoError; | 2905 return error::kNoError; |
| 2906 } | 2906 } |
| 2907 | 2907 |
| 2908 error::Error GLES2DecoderImpl::HandleSampleCoverage( | 2908 error::Error GLES2DecoderImpl::HandleSampleCoverage( |
| 2909 uint32_t immediate_data_size, | 2909 uint32_t immediate_data_size, |
| 2910 const volatile void* cmd_data) { | 2910 const volatile void* cmd_data) { |
| 2911 const volatile gles2::cmds::SampleCoverage& c = | 2911 const volatile gles2::cmds::SampleCoverage& c = |
| 2912 *static_cast<const volatile gles2::cmds::SampleCoverage*>(cmd_data); | 2912 *static_cast<const volatile gles2::cmds::SampleCoverage*>(cmd_data); |
| 2913 GLclampf value = static_cast<GLclampf>(c.value); | 2913 GLclampf value = static_cast<GLclampf>(c.value); |
| 2914 GLboolean invert = static_cast<GLboolean>(c.invert); | 2914 GLboolean invert = static_cast<GLboolean>(c.invert); |
| 2915 DoSampleCoverage(value, invert); | 2915 DoSampleCoverage(value, invert); |
| 2916 return error::kNoError; | 2916 return error::kNoError; |
| 2917 } | 2917 } |
| 2918 | 2918 |
| 2919 error::Error GLES2DecoderImpl::HandleSamplerParameterf( | 2919 error::Error GLES2DecoderImpl::HandleSamplerParameterf( |
| 2920 uint32_t immediate_data_size, | 2920 uint32_t immediate_data_size, |
| 2921 const volatile void* cmd_data) { | 2921 const volatile void* cmd_data) { |
| 2922 if (!unsafe_es3_apis_enabled()) | 2922 if (!es3_apis_enabled()) |
| 2923 return error::kUnknownCommand; | 2923 return error::kUnknownCommand; |
| 2924 const volatile gles2::cmds::SamplerParameterf& c = | 2924 const volatile gles2::cmds::SamplerParameterf& c = |
| 2925 *static_cast<const volatile gles2::cmds::SamplerParameterf*>(cmd_data); | 2925 *static_cast<const volatile gles2::cmds::SamplerParameterf*>(cmd_data); |
| 2926 GLuint sampler = c.sampler; | 2926 GLuint sampler = c.sampler; |
| 2927 GLenum pname = static_cast<GLenum>(c.pname); | 2927 GLenum pname = static_cast<GLenum>(c.pname); |
| 2928 GLfloat param = static_cast<GLfloat>(c.param); | 2928 GLfloat param = static_cast<GLfloat>(c.param); |
| 2929 if (!validators_->sampler_parameter.IsValid(pname)) { | 2929 if (!validators_->sampler_parameter.IsValid(pname)) { |
| 2930 LOCAL_SET_GL_ERROR_INVALID_ENUM("glSamplerParameterf", pname, "pname"); | 2930 LOCAL_SET_GL_ERROR_INVALID_ENUM("glSamplerParameterf", pname, "pname"); |
| 2931 return error::kNoError; | 2931 return error::kNoError; |
| 2932 } | 2932 } |
| 2933 DoSamplerParameterf(sampler, pname, param); | 2933 DoSamplerParameterf(sampler, pname, param); |
| 2934 return error::kNoError; | 2934 return error::kNoError; |
| 2935 } | 2935 } |
| 2936 | 2936 |
| 2937 error::Error GLES2DecoderImpl::HandleSamplerParameterfvImmediate( | 2937 error::Error GLES2DecoderImpl::HandleSamplerParameterfvImmediate( |
| 2938 uint32_t immediate_data_size, | 2938 uint32_t immediate_data_size, |
| 2939 const volatile void* cmd_data) { | 2939 const volatile void* cmd_data) { |
| 2940 if (!unsafe_es3_apis_enabled()) | 2940 if (!es3_apis_enabled()) |
| 2941 return error::kUnknownCommand; | 2941 return error::kUnknownCommand; |
| 2942 const volatile gles2::cmds::SamplerParameterfvImmediate& c = | 2942 const volatile gles2::cmds::SamplerParameterfvImmediate& c = |
| 2943 *static_cast<const volatile gles2::cmds::SamplerParameterfvImmediate*>( | 2943 *static_cast<const volatile gles2::cmds::SamplerParameterfvImmediate*>( |
| 2944 cmd_data); | 2944 cmd_data); |
| 2945 GLuint sampler = c.sampler; | 2945 GLuint sampler = c.sampler; |
| 2946 GLenum pname = static_cast<GLenum>(c.pname); | 2946 GLenum pname = static_cast<GLenum>(c.pname); |
| 2947 uint32_t data_size; | 2947 uint32_t data_size; |
| 2948 if (!GLES2Util::ComputeDataSize(1, sizeof(GLfloat), 1, &data_size)) { | 2948 if (!GLES2Util::ComputeDataSize(1, sizeof(GLfloat), 1, &data_size)) { |
| 2949 return error::kOutOfBounds; | 2949 return error::kOutOfBounds; |
| 2950 } | 2950 } |
| 2951 if (data_size > immediate_data_size) { | 2951 if (data_size > immediate_data_size) { |
| 2952 return error::kOutOfBounds; | 2952 return error::kOutOfBounds; |
| 2953 } | 2953 } |
| 2954 volatile const GLfloat* params = GetImmediateDataAs<volatile const GLfloat*>( | 2954 volatile const GLfloat* params = GetImmediateDataAs<volatile const GLfloat*>( |
| 2955 c, data_size, immediate_data_size); | 2955 c, data_size, immediate_data_size); |
| 2956 if (!validators_->sampler_parameter.IsValid(pname)) { | 2956 if (!validators_->sampler_parameter.IsValid(pname)) { |
| 2957 LOCAL_SET_GL_ERROR_INVALID_ENUM("glSamplerParameterfv", pname, "pname"); | 2957 LOCAL_SET_GL_ERROR_INVALID_ENUM("glSamplerParameterfv", pname, "pname"); |
| 2958 return error::kNoError; | 2958 return error::kNoError; |
| 2959 } | 2959 } |
| 2960 if (params == NULL) { | 2960 if (params == NULL) { |
| 2961 return error::kOutOfBounds; | 2961 return error::kOutOfBounds; |
| 2962 } | 2962 } |
| 2963 DoSamplerParameterfv(sampler, pname, params); | 2963 DoSamplerParameterfv(sampler, pname, params); |
| 2964 return error::kNoError; | 2964 return error::kNoError; |
| 2965 } | 2965 } |
| 2966 | 2966 |
| 2967 error::Error GLES2DecoderImpl::HandleSamplerParameteri( | 2967 error::Error GLES2DecoderImpl::HandleSamplerParameteri( |
| 2968 uint32_t immediate_data_size, | 2968 uint32_t immediate_data_size, |
| 2969 const volatile void* cmd_data) { | 2969 const volatile void* cmd_data) { |
| 2970 if (!unsafe_es3_apis_enabled()) | 2970 if (!es3_apis_enabled()) |
| 2971 return error::kUnknownCommand; | 2971 return error::kUnknownCommand; |
| 2972 const volatile gles2::cmds::SamplerParameteri& c = | 2972 const volatile gles2::cmds::SamplerParameteri& c = |
| 2973 *static_cast<const volatile gles2::cmds::SamplerParameteri*>(cmd_data); | 2973 *static_cast<const volatile gles2::cmds::SamplerParameteri*>(cmd_data); |
| 2974 GLuint sampler = c.sampler; | 2974 GLuint sampler = c.sampler; |
| 2975 GLenum pname = static_cast<GLenum>(c.pname); | 2975 GLenum pname = static_cast<GLenum>(c.pname); |
| 2976 GLint param = static_cast<GLint>(c.param); | 2976 GLint param = static_cast<GLint>(c.param); |
| 2977 if (!validators_->sampler_parameter.IsValid(pname)) { | 2977 if (!validators_->sampler_parameter.IsValid(pname)) { |
| 2978 LOCAL_SET_GL_ERROR_INVALID_ENUM("glSamplerParameteri", pname, "pname"); | 2978 LOCAL_SET_GL_ERROR_INVALID_ENUM("glSamplerParameteri", pname, "pname"); |
| 2979 return error::kNoError; | 2979 return error::kNoError; |
| 2980 } | 2980 } |
| 2981 DoSamplerParameteri(sampler, pname, param); | 2981 DoSamplerParameteri(sampler, pname, param); |
| 2982 return error::kNoError; | 2982 return error::kNoError; |
| 2983 } | 2983 } |
| 2984 | 2984 |
| 2985 error::Error GLES2DecoderImpl::HandleSamplerParameterivImmediate( | 2985 error::Error GLES2DecoderImpl::HandleSamplerParameterivImmediate( |
| 2986 uint32_t immediate_data_size, | 2986 uint32_t immediate_data_size, |
| 2987 const volatile void* cmd_data) { | 2987 const volatile void* cmd_data) { |
| 2988 if (!unsafe_es3_apis_enabled()) | 2988 if (!es3_apis_enabled()) |
| 2989 return error::kUnknownCommand; | 2989 return error::kUnknownCommand; |
| 2990 const volatile gles2::cmds::SamplerParameterivImmediate& c = | 2990 const volatile gles2::cmds::SamplerParameterivImmediate& c = |
| 2991 *static_cast<const volatile gles2::cmds::SamplerParameterivImmediate*>( | 2991 *static_cast<const volatile gles2::cmds::SamplerParameterivImmediate*>( |
| 2992 cmd_data); | 2992 cmd_data); |
| 2993 GLuint sampler = c.sampler; | 2993 GLuint sampler = c.sampler; |
| 2994 GLenum pname = static_cast<GLenum>(c.pname); | 2994 GLenum pname = static_cast<GLenum>(c.pname); |
| 2995 uint32_t data_size; | 2995 uint32_t data_size; |
| 2996 if (!GLES2Util::ComputeDataSize(1, sizeof(GLint), 1, &data_size)) { | 2996 if (!GLES2Util::ComputeDataSize(1, sizeof(GLint), 1, &data_size)) { |
| 2997 return error::kOutOfBounds; | 2997 return error::kOutOfBounds; |
| 2998 } | 2998 } |
| (...skipping 369 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3368 if (params == NULL) { | 3368 if (params == NULL) { |
| 3369 return error::kOutOfBounds; | 3369 return error::kOutOfBounds; |
| 3370 } | 3370 } |
| 3371 DoTexParameteriv(target, pname, params); | 3371 DoTexParameteriv(target, pname, params); |
| 3372 return error::kNoError; | 3372 return error::kNoError; |
| 3373 } | 3373 } |
| 3374 | 3374 |
| 3375 error::Error GLES2DecoderImpl::HandleTexStorage3D( | 3375 error::Error GLES2DecoderImpl::HandleTexStorage3D( |
| 3376 uint32_t immediate_data_size, | 3376 uint32_t immediate_data_size, |
| 3377 const volatile void* cmd_data) { | 3377 const volatile void* cmd_data) { |
| 3378 if (!unsafe_es3_apis_enabled()) | 3378 if (!es3_apis_enabled()) |
| 3379 return error::kUnknownCommand; | 3379 return error::kUnknownCommand; |
| 3380 const volatile gles2::cmds::TexStorage3D& c = | 3380 const volatile gles2::cmds::TexStorage3D& c = |
| 3381 *static_cast<const volatile gles2::cmds::TexStorage3D*>(cmd_data); | 3381 *static_cast<const volatile gles2::cmds::TexStorage3D*>(cmd_data); |
| 3382 GLenum target = static_cast<GLenum>(c.target); | 3382 GLenum target = static_cast<GLenum>(c.target); |
| 3383 GLsizei levels = static_cast<GLsizei>(c.levels); | 3383 GLsizei levels = static_cast<GLsizei>(c.levels); |
| 3384 GLenum internalFormat = static_cast<GLenum>(c.internalFormat); | 3384 GLenum internalFormat = static_cast<GLenum>(c.internalFormat); |
| 3385 GLsizei width = static_cast<GLsizei>(c.width); | 3385 GLsizei width = static_cast<GLsizei>(c.width); |
| 3386 GLsizei height = static_cast<GLsizei>(c.height); | 3386 GLsizei height = static_cast<GLsizei>(c.height); |
| 3387 GLsizei depth = static_cast<GLsizei>(c.depth); | 3387 GLsizei depth = static_cast<GLsizei>(c.depth); |
| 3388 if (!validators_->texture_3_d_target.IsValid(target)) { | 3388 if (!validators_->texture_3_d_target.IsValid(target)) { |
| (...skipping 21 matching lines...) Expand all Loading... |
| 3410 LOCAL_SET_GL_ERROR(GL_INVALID_VALUE, "glTexStorage3D", "depth < 0"); | 3410 LOCAL_SET_GL_ERROR(GL_INVALID_VALUE, "glTexStorage3D", "depth < 0"); |
| 3411 return error::kNoError; | 3411 return error::kNoError; |
| 3412 } | 3412 } |
| 3413 DoTexStorage3D(target, levels, internalFormat, width, height, depth); | 3413 DoTexStorage3D(target, levels, internalFormat, width, height, depth); |
| 3414 return error::kNoError; | 3414 return error::kNoError; |
| 3415 } | 3415 } |
| 3416 | 3416 |
| 3417 error::Error GLES2DecoderImpl::HandleTransformFeedbackVaryingsBucket( | 3417 error::Error GLES2DecoderImpl::HandleTransformFeedbackVaryingsBucket( |
| 3418 uint32_t immediate_data_size, | 3418 uint32_t immediate_data_size, |
| 3419 const volatile void* cmd_data) { | 3419 const volatile void* cmd_data) { |
| 3420 if (!unsafe_es3_apis_enabled()) | 3420 if (!es3_apis_enabled()) |
| 3421 return error::kUnknownCommand; | 3421 return error::kUnknownCommand; |
| 3422 const volatile gles2::cmds::TransformFeedbackVaryingsBucket& c = *static_cast< | 3422 const volatile gles2::cmds::TransformFeedbackVaryingsBucket& c = *static_cast< |
| 3423 const volatile gles2::cmds::TransformFeedbackVaryingsBucket*>(cmd_data); | 3423 const volatile gles2::cmds::TransformFeedbackVaryingsBucket*>(cmd_data); |
| 3424 GLuint program = static_cast<GLuint>(c.program); | 3424 GLuint program = static_cast<GLuint>(c.program); |
| 3425 | 3425 |
| 3426 Bucket* bucket = GetBucket(c.varyings_bucket_id); | 3426 Bucket* bucket = GetBucket(c.varyings_bucket_id); |
| 3427 if (!bucket) { | 3427 if (!bucket) { |
| 3428 return error::kInvalidArguments; | 3428 return error::kInvalidArguments; |
| 3429 } | 3429 } |
| 3430 GLsizei count = 0; | 3430 GLsizei count = 0; |
| (...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3522 } | 3522 } |
| 3523 if (v == NULL) { | 3523 if (v == NULL) { |
| 3524 return error::kOutOfBounds; | 3524 return error::kOutOfBounds; |
| 3525 } | 3525 } |
| 3526 DoUniform1iv(location, count, v); | 3526 DoUniform1iv(location, count, v); |
| 3527 return error::kNoError; | 3527 return error::kNoError; |
| 3528 } | 3528 } |
| 3529 | 3529 |
| 3530 error::Error GLES2DecoderImpl::HandleUniform1ui(uint32_t immediate_data_size, | 3530 error::Error GLES2DecoderImpl::HandleUniform1ui(uint32_t immediate_data_size, |
| 3531 const volatile void* cmd_data) { | 3531 const volatile void* cmd_data) { |
| 3532 if (!unsafe_es3_apis_enabled()) | 3532 if (!es3_apis_enabled()) |
| 3533 return error::kUnknownCommand; | 3533 return error::kUnknownCommand; |
| 3534 const volatile gles2::cmds::Uniform1ui& c = | 3534 const volatile gles2::cmds::Uniform1ui& c = |
| 3535 *static_cast<const volatile gles2::cmds::Uniform1ui*>(cmd_data); | 3535 *static_cast<const volatile gles2::cmds::Uniform1ui*>(cmd_data); |
| 3536 GLint location = static_cast<GLint>(c.location); | 3536 GLint location = static_cast<GLint>(c.location); |
| 3537 GLuint x = static_cast<GLuint>(c.x); | 3537 GLuint x = static_cast<GLuint>(c.x); |
| 3538 GLuint temp[1] = { | 3538 GLuint temp[1] = { |
| 3539 x, | 3539 x, |
| 3540 }; | 3540 }; |
| 3541 DoUniform1uiv(location, 1, &temp[0]); | 3541 DoUniform1uiv(location, 1, &temp[0]); |
| 3542 return error::kNoError; | 3542 return error::kNoError; |
| 3543 } | 3543 } |
| 3544 | 3544 |
| 3545 error::Error GLES2DecoderImpl::HandleUniform1uivImmediate( | 3545 error::Error GLES2DecoderImpl::HandleUniform1uivImmediate( |
| 3546 uint32_t immediate_data_size, | 3546 uint32_t immediate_data_size, |
| 3547 const volatile void* cmd_data) { | 3547 const volatile void* cmd_data) { |
| 3548 if (!unsafe_es3_apis_enabled()) | 3548 if (!es3_apis_enabled()) |
| 3549 return error::kUnknownCommand; | 3549 return error::kUnknownCommand; |
| 3550 const volatile gles2::cmds::Uniform1uivImmediate& c = | 3550 const volatile gles2::cmds::Uniform1uivImmediate& c = |
| 3551 *static_cast<const volatile gles2::cmds::Uniform1uivImmediate*>(cmd_data); | 3551 *static_cast<const volatile gles2::cmds::Uniform1uivImmediate*>(cmd_data); |
| 3552 GLint location = static_cast<GLint>(c.location); | 3552 GLint location = static_cast<GLint>(c.location); |
| 3553 GLsizei count = static_cast<GLsizei>(c.count); | 3553 GLsizei count = static_cast<GLsizei>(c.count); |
| 3554 uint32_t data_size = 0; | 3554 uint32_t data_size = 0; |
| 3555 if (count >= 0 && | 3555 if (count >= 0 && |
| 3556 !GLES2Util::ComputeDataSize(count, sizeof(GLuint), 1, &data_size)) { | 3556 !GLES2Util::ComputeDataSize(count, sizeof(GLuint), 1, &data_size)) { |
| 3557 return error::kOutOfBounds; | 3557 return error::kOutOfBounds; |
| 3558 } | 3558 } |
| (...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3651 } | 3651 } |
| 3652 if (v == NULL) { | 3652 if (v == NULL) { |
| 3653 return error::kOutOfBounds; | 3653 return error::kOutOfBounds; |
| 3654 } | 3654 } |
| 3655 DoUniform2iv(location, count, v); | 3655 DoUniform2iv(location, count, v); |
| 3656 return error::kNoError; | 3656 return error::kNoError; |
| 3657 } | 3657 } |
| 3658 | 3658 |
| 3659 error::Error GLES2DecoderImpl::HandleUniform2ui(uint32_t immediate_data_size, | 3659 error::Error GLES2DecoderImpl::HandleUniform2ui(uint32_t immediate_data_size, |
| 3660 const volatile void* cmd_data) { | 3660 const volatile void* cmd_data) { |
| 3661 if (!unsafe_es3_apis_enabled()) | 3661 if (!es3_apis_enabled()) |
| 3662 return error::kUnknownCommand; | 3662 return error::kUnknownCommand; |
| 3663 const volatile gles2::cmds::Uniform2ui& c = | 3663 const volatile gles2::cmds::Uniform2ui& c = |
| 3664 *static_cast<const volatile gles2::cmds::Uniform2ui*>(cmd_data); | 3664 *static_cast<const volatile gles2::cmds::Uniform2ui*>(cmd_data); |
| 3665 GLint location = static_cast<GLint>(c.location); | 3665 GLint location = static_cast<GLint>(c.location); |
| 3666 GLuint x = static_cast<GLuint>(c.x); | 3666 GLuint x = static_cast<GLuint>(c.x); |
| 3667 GLuint y = static_cast<GLuint>(c.y); | 3667 GLuint y = static_cast<GLuint>(c.y); |
| 3668 GLuint temp[2] = { | 3668 GLuint temp[2] = { |
| 3669 x, y, | 3669 x, y, |
| 3670 }; | 3670 }; |
| 3671 DoUniform2uiv(location, 1, &temp[0]); | 3671 DoUniform2uiv(location, 1, &temp[0]); |
| 3672 return error::kNoError; | 3672 return error::kNoError; |
| 3673 } | 3673 } |
| 3674 | 3674 |
| 3675 error::Error GLES2DecoderImpl::HandleUniform2uivImmediate( | 3675 error::Error GLES2DecoderImpl::HandleUniform2uivImmediate( |
| 3676 uint32_t immediate_data_size, | 3676 uint32_t immediate_data_size, |
| 3677 const volatile void* cmd_data) { | 3677 const volatile void* cmd_data) { |
| 3678 if (!unsafe_es3_apis_enabled()) | 3678 if (!es3_apis_enabled()) |
| 3679 return error::kUnknownCommand; | 3679 return error::kUnknownCommand; |
| 3680 const volatile gles2::cmds::Uniform2uivImmediate& c = | 3680 const volatile gles2::cmds::Uniform2uivImmediate& c = |
| 3681 *static_cast<const volatile gles2::cmds::Uniform2uivImmediate*>(cmd_data); | 3681 *static_cast<const volatile gles2::cmds::Uniform2uivImmediate*>(cmd_data); |
| 3682 GLint location = static_cast<GLint>(c.location); | 3682 GLint location = static_cast<GLint>(c.location); |
| 3683 GLsizei count = static_cast<GLsizei>(c.count); | 3683 GLsizei count = static_cast<GLsizei>(c.count); |
| 3684 uint32_t data_size = 0; | 3684 uint32_t data_size = 0; |
| 3685 if (count >= 0 && | 3685 if (count >= 0 && |
| 3686 !GLES2Util::ComputeDataSize(count, sizeof(GLuint), 2, &data_size)) { | 3686 !GLES2Util::ComputeDataSize(count, sizeof(GLuint), 2, &data_size)) { |
| 3687 return error::kOutOfBounds; | 3687 return error::kOutOfBounds; |
| 3688 } | 3688 } |
| (...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3783 } | 3783 } |
| 3784 if (v == NULL) { | 3784 if (v == NULL) { |
| 3785 return error::kOutOfBounds; | 3785 return error::kOutOfBounds; |
| 3786 } | 3786 } |
| 3787 DoUniform3iv(location, count, v); | 3787 DoUniform3iv(location, count, v); |
| 3788 return error::kNoError; | 3788 return error::kNoError; |
| 3789 } | 3789 } |
| 3790 | 3790 |
| 3791 error::Error GLES2DecoderImpl::HandleUniform3ui(uint32_t immediate_data_size, | 3791 error::Error GLES2DecoderImpl::HandleUniform3ui(uint32_t immediate_data_size, |
| 3792 const volatile void* cmd_data) { | 3792 const volatile void* cmd_data) { |
| 3793 if (!unsafe_es3_apis_enabled()) | 3793 if (!es3_apis_enabled()) |
| 3794 return error::kUnknownCommand; | 3794 return error::kUnknownCommand; |
| 3795 const volatile gles2::cmds::Uniform3ui& c = | 3795 const volatile gles2::cmds::Uniform3ui& c = |
| 3796 *static_cast<const volatile gles2::cmds::Uniform3ui*>(cmd_data); | 3796 *static_cast<const volatile gles2::cmds::Uniform3ui*>(cmd_data); |
| 3797 GLint location = static_cast<GLint>(c.location); | 3797 GLint location = static_cast<GLint>(c.location); |
| 3798 GLuint x = static_cast<GLuint>(c.x); | 3798 GLuint x = static_cast<GLuint>(c.x); |
| 3799 GLuint y = static_cast<GLuint>(c.y); | 3799 GLuint y = static_cast<GLuint>(c.y); |
| 3800 GLuint z = static_cast<GLuint>(c.z); | 3800 GLuint z = static_cast<GLuint>(c.z); |
| 3801 GLuint temp[3] = { | 3801 GLuint temp[3] = { |
| 3802 x, y, z, | 3802 x, y, z, |
| 3803 }; | 3803 }; |
| 3804 DoUniform3uiv(location, 1, &temp[0]); | 3804 DoUniform3uiv(location, 1, &temp[0]); |
| 3805 return error::kNoError; | 3805 return error::kNoError; |
| 3806 } | 3806 } |
| 3807 | 3807 |
| 3808 error::Error GLES2DecoderImpl::HandleUniform3uivImmediate( | 3808 error::Error GLES2DecoderImpl::HandleUniform3uivImmediate( |
| 3809 uint32_t immediate_data_size, | 3809 uint32_t immediate_data_size, |
| 3810 const volatile void* cmd_data) { | 3810 const volatile void* cmd_data) { |
| 3811 if (!unsafe_es3_apis_enabled()) | 3811 if (!es3_apis_enabled()) |
| 3812 return error::kUnknownCommand; | 3812 return error::kUnknownCommand; |
| 3813 const volatile gles2::cmds::Uniform3uivImmediate& c = | 3813 const volatile gles2::cmds::Uniform3uivImmediate& c = |
| 3814 *static_cast<const volatile gles2::cmds::Uniform3uivImmediate*>(cmd_data); | 3814 *static_cast<const volatile gles2::cmds::Uniform3uivImmediate*>(cmd_data); |
| 3815 GLint location = static_cast<GLint>(c.location); | 3815 GLint location = static_cast<GLint>(c.location); |
| 3816 GLsizei count = static_cast<GLsizei>(c.count); | 3816 GLsizei count = static_cast<GLsizei>(c.count); |
| 3817 uint32_t data_size = 0; | 3817 uint32_t data_size = 0; |
| 3818 if (count >= 0 && | 3818 if (count >= 0 && |
| 3819 !GLES2Util::ComputeDataSize(count, sizeof(GLuint), 3, &data_size)) { | 3819 !GLES2Util::ComputeDataSize(count, sizeof(GLuint), 3, &data_size)) { |
| 3820 return error::kOutOfBounds; | 3820 return error::kOutOfBounds; |
| 3821 } | 3821 } |
| (...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3918 } | 3918 } |
| 3919 if (v == NULL) { | 3919 if (v == NULL) { |
| 3920 return error::kOutOfBounds; | 3920 return error::kOutOfBounds; |
| 3921 } | 3921 } |
| 3922 DoUniform4iv(location, count, v); | 3922 DoUniform4iv(location, count, v); |
| 3923 return error::kNoError; | 3923 return error::kNoError; |
| 3924 } | 3924 } |
| 3925 | 3925 |
| 3926 error::Error GLES2DecoderImpl::HandleUniform4ui(uint32_t immediate_data_size, | 3926 error::Error GLES2DecoderImpl::HandleUniform4ui(uint32_t immediate_data_size, |
| 3927 const volatile void* cmd_data) { | 3927 const volatile void* cmd_data) { |
| 3928 if (!unsafe_es3_apis_enabled()) | 3928 if (!es3_apis_enabled()) |
| 3929 return error::kUnknownCommand; | 3929 return error::kUnknownCommand; |
| 3930 const volatile gles2::cmds::Uniform4ui& c = | 3930 const volatile gles2::cmds::Uniform4ui& c = |
| 3931 *static_cast<const volatile gles2::cmds::Uniform4ui*>(cmd_data); | 3931 *static_cast<const volatile gles2::cmds::Uniform4ui*>(cmd_data); |
| 3932 GLint location = static_cast<GLint>(c.location); | 3932 GLint location = static_cast<GLint>(c.location); |
| 3933 GLuint x = static_cast<GLuint>(c.x); | 3933 GLuint x = static_cast<GLuint>(c.x); |
| 3934 GLuint y = static_cast<GLuint>(c.y); | 3934 GLuint y = static_cast<GLuint>(c.y); |
| 3935 GLuint z = static_cast<GLuint>(c.z); | 3935 GLuint z = static_cast<GLuint>(c.z); |
| 3936 GLuint w = static_cast<GLuint>(c.w); | 3936 GLuint w = static_cast<GLuint>(c.w); |
| 3937 GLuint temp[4] = { | 3937 GLuint temp[4] = { |
| 3938 x, y, z, w, | 3938 x, y, z, w, |
| 3939 }; | 3939 }; |
| 3940 DoUniform4uiv(location, 1, &temp[0]); | 3940 DoUniform4uiv(location, 1, &temp[0]); |
| 3941 return error::kNoError; | 3941 return error::kNoError; |
| 3942 } | 3942 } |
| 3943 | 3943 |
| 3944 error::Error GLES2DecoderImpl::HandleUniform4uivImmediate( | 3944 error::Error GLES2DecoderImpl::HandleUniform4uivImmediate( |
| 3945 uint32_t immediate_data_size, | 3945 uint32_t immediate_data_size, |
| 3946 const volatile void* cmd_data) { | 3946 const volatile void* cmd_data) { |
| 3947 if (!unsafe_es3_apis_enabled()) | 3947 if (!es3_apis_enabled()) |
| 3948 return error::kUnknownCommand; | 3948 return error::kUnknownCommand; |
| 3949 const volatile gles2::cmds::Uniform4uivImmediate& c = | 3949 const volatile gles2::cmds::Uniform4uivImmediate& c = |
| 3950 *static_cast<const volatile gles2::cmds::Uniform4uivImmediate*>(cmd_data); | 3950 *static_cast<const volatile gles2::cmds::Uniform4uivImmediate*>(cmd_data); |
| 3951 GLint location = static_cast<GLint>(c.location); | 3951 GLint location = static_cast<GLint>(c.location); |
| 3952 GLsizei count = static_cast<GLsizei>(c.count); | 3952 GLsizei count = static_cast<GLsizei>(c.count); |
| 3953 uint32_t data_size = 0; | 3953 uint32_t data_size = 0; |
| 3954 if (count >= 0 && | 3954 if (count >= 0 && |
| 3955 !GLES2Util::ComputeDataSize(count, sizeof(GLuint), 4, &data_size)) { | 3955 !GLES2Util::ComputeDataSize(count, sizeof(GLuint), 4, &data_size)) { |
| 3956 return error::kOutOfBounds; | 3956 return error::kOutOfBounds; |
| 3957 } | 3957 } |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3997 if (value == NULL) { | 3997 if (value == NULL) { |
| 3998 return error::kOutOfBounds; | 3998 return error::kOutOfBounds; |
| 3999 } | 3999 } |
| 4000 DoUniformMatrix2fv(location, count, transpose, value); | 4000 DoUniformMatrix2fv(location, count, transpose, value); |
| 4001 return error::kNoError; | 4001 return error::kNoError; |
| 4002 } | 4002 } |
| 4003 | 4003 |
| 4004 error::Error GLES2DecoderImpl::HandleUniformMatrix2x3fvImmediate( | 4004 error::Error GLES2DecoderImpl::HandleUniformMatrix2x3fvImmediate( |
| 4005 uint32_t immediate_data_size, | 4005 uint32_t immediate_data_size, |
| 4006 const volatile void* cmd_data) { | 4006 const volatile void* cmd_data) { |
| 4007 if (!unsafe_es3_apis_enabled()) | 4007 if (!es3_apis_enabled()) |
| 4008 return error::kUnknownCommand; | 4008 return error::kUnknownCommand; |
| 4009 const volatile gles2::cmds::UniformMatrix2x3fvImmediate& c = | 4009 const volatile gles2::cmds::UniformMatrix2x3fvImmediate& c = |
| 4010 *static_cast<const volatile gles2::cmds::UniformMatrix2x3fvImmediate*>( | 4010 *static_cast<const volatile gles2::cmds::UniformMatrix2x3fvImmediate*>( |
| 4011 cmd_data); | 4011 cmd_data); |
| 4012 GLint location = static_cast<GLint>(c.location); | 4012 GLint location = static_cast<GLint>(c.location); |
| 4013 GLsizei count = static_cast<GLsizei>(c.count); | 4013 GLsizei count = static_cast<GLsizei>(c.count); |
| 4014 GLboolean transpose = static_cast<GLboolean>(c.transpose); | 4014 GLboolean transpose = static_cast<GLboolean>(c.transpose); |
| 4015 uint32_t data_size = 0; | 4015 uint32_t data_size = 0; |
| 4016 if (count >= 0 && | 4016 if (count >= 0 && |
| 4017 !GLES2Util::ComputeDataSize(count, sizeof(GLfloat), 6, &data_size)) { | 4017 !GLES2Util::ComputeDataSize(count, sizeof(GLfloat), 6, &data_size)) { |
| (...skipping 11 matching lines...) Expand all Loading... |
| 4029 if (value == NULL) { | 4029 if (value == NULL) { |
| 4030 return error::kOutOfBounds; | 4030 return error::kOutOfBounds; |
| 4031 } | 4031 } |
| 4032 DoUniformMatrix2x3fv(location, count, transpose, value); | 4032 DoUniformMatrix2x3fv(location, count, transpose, value); |
| 4033 return error::kNoError; | 4033 return error::kNoError; |
| 4034 } | 4034 } |
| 4035 | 4035 |
| 4036 error::Error GLES2DecoderImpl::HandleUniformMatrix2x4fvImmediate( | 4036 error::Error GLES2DecoderImpl::HandleUniformMatrix2x4fvImmediate( |
| 4037 uint32_t immediate_data_size, | 4037 uint32_t immediate_data_size, |
| 4038 const volatile void* cmd_data) { | 4038 const volatile void* cmd_data) { |
| 4039 if (!unsafe_es3_apis_enabled()) | 4039 if (!es3_apis_enabled()) |
| 4040 return error::kUnknownCommand; | 4040 return error::kUnknownCommand; |
| 4041 const volatile gles2::cmds::UniformMatrix2x4fvImmediate& c = | 4041 const volatile gles2::cmds::UniformMatrix2x4fvImmediate& c = |
| 4042 *static_cast<const volatile gles2::cmds::UniformMatrix2x4fvImmediate*>( | 4042 *static_cast<const volatile gles2::cmds::UniformMatrix2x4fvImmediate*>( |
| 4043 cmd_data); | 4043 cmd_data); |
| 4044 GLint location = static_cast<GLint>(c.location); | 4044 GLint location = static_cast<GLint>(c.location); |
| 4045 GLsizei count = static_cast<GLsizei>(c.count); | 4045 GLsizei count = static_cast<GLsizei>(c.count); |
| 4046 GLboolean transpose = static_cast<GLboolean>(c.transpose); | 4046 GLboolean transpose = static_cast<GLboolean>(c.transpose); |
| 4047 uint32_t data_size = 0; | 4047 uint32_t data_size = 0; |
| 4048 if (count >= 0 && | 4048 if (count >= 0 && |
| 4049 !GLES2Util::ComputeDataSize(count, sizeof(GLfloat), 8, &data_size)) { | 4049 !GLES2Util::ComputeDataSize(count, sizeof(GLfloat), 8, &data_size)) { |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4091 if (value == NULL) { | 4091 if (value == NULL) { |
| 4092 return error::kOutOfBounds; | 4092 return error::kOutOfBounds; |
| 4093 } | 4093 } |
| 4094 DoUniformMatrix3fv(location, count, transpose, value); | 4094 DoUniformMatrix3fv(location, count, transpose, value); |
| 4095 return error::kNoError; | 4095 return error::kNoError; |
| 4096 } | 4096 } |
| 4097 | 4097 |
| 4098 error::Error GLES2DecoderImpl::HandleUniformMatrix3x2fvImmediate( | 4098 error::Error GLES2DecoderImpl::HandleUniformMatrix3x2fvImmediate( |
| 4099 uint32_t immediate_data_size, | 4099 uint32_t immediate_data_size, |
| 4100 const volatile void* cmd_data) { | 4100 const volatile void* cmd_data) { |
| 4101 if (!unsafe_es3_apis_enabled()) | 4101 if (!es3_apis_enabled()) |
| 4102 return error::kUnknownCommand; | 4102 return error::kUnknownCommand; |
| 4103 const volatile gles2::cmds::UniformMatrix3x2fvImmediate& c = | 4103 const volatile gles2::cmds::UniformMatrix3x2fvImmediate& c = |
| 4104 *static_cast<const volatile gles2::cmds::UniformMatrix3x2fvImmediate*>( | 4104 *static_cast<const volatile gles2::cmds::UniformMatrix3x2fvImmediate*>( |
| 4105 cmd_data); | 4105 cmd_data); |
| 4106 GLint location = static_cast<GLint>(c.location); | 4106 GLint location = static_cast<GLint>(c.location); |
| 4107 GLsizei count = static_cast<GLsizei>(c.count); | 4107 GLsizei count = static_cast<GLsizei>(c.count); |
| 4108 GLboolean transpose = static_cast<GLboolean>(c.transpose); | 4108 GLboolean transpose = static_cast<GLboolean>(c.transpose); |
| 4109 uint32_t data_size = 0; | 4109 uint32_t data_size = 0; |
| 4110 if (count >= 0 && | 4110 if (count >= 0 && |
| 4111 !GLES2Util::ComputeDataSize(count, sizeof(GLfloat), 6, &data_size)) { | 4111 !GLES2Util::ComputeDataSize(count, sizeof(GLfloat), 6, &data_size)) { |
| (...skipping 11 matching lines...) Expand all Loading... |
| 4123 if (value == NULL) { | 4123 if (value == NULL) { |
| 4124 return error::kOutOfBounds; | 4124 return error::kOutOfBounds; |
| 4125 } | 4125 } |
| 4126 DoUniformMatrix3x2fv(location, count, transpose, value); | 4126 DoUniformMatrix3x2fv(location, count, transpose, value); |
| 4127 return error::kNoError; | 4127 return error::kNoError; |
| 4128 } | 4128 } |
| 4129 | 4129 |
| 4130 error::Error GLES2DecoderImpl::HandleUniformMatrix3x4fvImmediate( | 4130 error::Error GLES2DecoderImpl::HandleUniformMatrix3x4fvImmediate( |
| 4131 uint32_t immediate_data_size, | 4131 uint32_t immediate_data_size, |
| 4132 const volatile void* cmd_data) { | 4132 const volatile void* cmd_data) { |
| 4133 if (!unsafe_es3_apis_enabled()) | 4133 if (!es3_apis_enabled()) |
| 4134 return error::kUnknownCommand; | 4134 return error::kUnknownCommand; |
| 4135 const volatile gles2::cmds::UniformMatrix3x4fvImmediate& c = | 4135 const volatile gles2::cmds::UniformMatrix3x4fvImmediate& c = |
| 4136 *static_cast<const volatile gles2::cmds::UniformMatrix3x4fvImmediate*>( | 4136 *static_cast<const volatile gles2::cmds::UniformMatrix3x4fvImmediate*>( |
| 4137 cmd_data); | 4137 cmd_data); |
| 4138 GLint location = static_cast<GLint>(c.location); | 4138 GLint location = static_cast<GLint>(c.location); |
| 4139 GLsizei count = static_cast<GLsizei>(c.count); | 4139 GLsizei count = static_cast<GLsizei>(c.count); |
| 4140 GLboolean transpose = static_cast<GLboolean>(c.transpose); | 4140 GLboolean transpose = static_cast<GLboolean>(c.transpose); |
| 4141 uint32_t data_size = 0; | 4141 uint32_t data_size = 0; |
| 4142 if (count >= 0 && | 4142 if (count >= 0 && |
| 4143 !GLES2Util::ComputeDataSize(count, sizeof(GLfloat), 12, &data_size)) { | 4143 !GLES2Util::ComputeDataSize(count, sizeof(GLfloat), 12, &data_size)) { |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4185 if (value == NULL) { | 4185 if (value == NULL) { |
| 4186 return error::kOutOfBounds; | 4186 return error::kOutOfBounds; |
| 4187 } | 4187 } |
| 4188 DoUniformMatrix4fv(location, count, transpose, value); | 4188 DoUniformMatrix4fv(location, count, transpose, value); |
| 4189 return error::kNoError; | 4189 return error::kNoError; |
| 4190 } | 4190 } |
| 4191 | 4191 |
| 4192 error::Error GLES2DecoderImpl::HandleUniformMatrix4x2fvImmediate( | 4192 error::Error GLES2DecoderImpl::HandleUniformMatrix4x2fvImmediate( |
| 4193 uint32_t immediate_data_size, | 4193 uint32_t immediate_data_size, |
| 4194 const volatile void* cmd_data) { | 4194 const volatile void* cmd_data) { |
| 4195 if (!unsafe_es3_apis_enabled()) | 4195 if (!es3_apis_enabled()) |
| 4196 return error::kUnknownCommand; | 4196 return error::kUnknownCommand; |
| 4197 const volatile gles2::cmds::UniformMatrix4x2fvImmediate& c = | 4197 const volatile gles2::cmds::UniformMatrix4x2fvImmediate& c = |
| 4198 *static_cast<const volatile gles2::cmds::UniformMatrix4x2fvImmediate*>( | 4198 *static_cast<const volatile gles2::cmds::UniformMatrix4x2fvImmediate*>( |
| 4199 cmd_data); | 4199 cmd_data); |
| 4200 GLint location = static_cast<GLint>(c.location); | 4200 GLint location = static_cast<GLint>(c.location); |
| 4201 GLsizei count = static_cast<GLsizei>(c.count); | 4201 GLsizei count = static_cast<GLsizei>(c.count); |
| 4202 GLboolean transpose = static_cast<GLboolean>(c.transpose); | 4202 GLboolean transpose = static_cast<GLboolean>(c.transpose); |
| 4203 uint32_t data_size = 0; | 4203 uint32_t data_size = 0; |
| 4204 if (count >= 0 && | 4204 if (count >= 0 && |
| 4205 !GLES2Util::ComputeDataSize(count, sizeof(GLfloat), 8, &data_size)) { | 4205 !GLES2Util::ComputeDataSize(count, sizeof(GLfloat), 8, &data_size)) { |
| (...skipping 11 matching lines...) Expand all Loading... |
| 4217 if (value == NULL) { | 4217 if (value == NULL) { |
| 4218 return error::kOutOfBounds; | 4218 return error::kOutOfBounds; |
| 4219 } | 4219 } |
| 4220 DoUniformMatrix4x2fv(location, count, transpose, value); | 4220 DoUniformMatrix4x2fv(location, count, transpose, value); |
| 4221 return error::kNoError; | 4221 return error::kNoError; |
| 4222 } | 4222 } |
| 4223 | 4223 |
| 4224 error::Error GLES2DecoderImpl::HandleUniformMatrix4x3fvImmediate( | 4224 error::Error GLES2DecoderImpl::HandleUniformMatrix4x3fvImmediate( |
| 4225 uint32_t immediate_data_size, | 4225 uint32_t immediate_data_size, |
| 4226 const volatile void* cmd_data) { | 4226 const volatile void* cmd_data) { |
| 4227 if (!unsafe_es3_apis_enabled()) | 4227 if (!es3_apis_enabled()) |
| 4228 return error::kUnknownCommand; | 4228 return error::kUnknownCommand; |
| 4229 const volatile gles2::cmds::UniformMatrix4x3fvImmediate& c = | 4229 const volatile gles2::cmds::UniformMatrix4x3fvImmediate& c = |
| 4230 *static_cast<const volatile gles2::cmds::UniformMatrix4x3fvImmediate*>( | 4230 *static_cast<const volatile gles2::cmds::UniformMatrix4x3fvImmediate*>( |
| 4231 cmd_data); | 4231 cmd_data); |
| 4232 GLint location = static_cast<GLint>(c.location); | 4232 GLint location = static_cast<GLint>(c.location); |
| 4233 GLsizei count = static_cast<GLsizei>(c.count); | 4233 GLsizei count = static_cast<GLsizei>(c.count); |
| 4234 GLboolean transpose = static_cast<GLboolean>(c.transpose); | 4234 GLboolean transpose = static_cast<GLboolean>(c.transpose); |
| 4235 uint32_t data_size = 0; | 4235 uint32_t data_size = 0; |
| 4236 if (count >= 0 && | 4236 if (count >= 0 && |
| 4237 !GLES2Util::ComputeDataSize(count, sizeof(GLfloat), 12, &data_size)) { | 4237 !GLES2Util::ComputeDataSize(count, sizeof(GLfloat), 12, &data_size)) { |
| (...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4410 if (values == NULL) { | 4410 if (values == NULL) { |
| 4411 return error::kOutOfBounds; | 4411 return error::kOutOfBounds; |
| 4412 } | 4412 } |
| 4413 DoVertexAttrib4fv(indx, values); | 4413 DoVertexAttrib4fv(indx, values); |
| 4414 return error::kNoError; | 4414 return error::kNoError; |
| 4415 } | 4415 } |
| 4416 | 4416 |
| 4417 error::Error GLES2DecoderImpl::HandleVertexAttribI4i( | 4417 error::Error GLES2DecoderImpl::HandleVertexAttribI4i( |
| 4418 uint32_t immediate_data_size, | 4418 uint32_t immediate_data_size, |
| 4419 const volatile void* cmd_data) { | 4419 const volatile void* cmd_data) { |
| 4420 if (!unsafe_es3_apis_enabled()) | 4420 if (!es3_apis_enabled()) |
| 4421 return error::kUnknownCommand; | 4421 return error::kUnknownCommand; |
| 4422 const volatile gles2::cmds::VertexAttribI4i& c = | 4422 const volatile gles2::cmds::VertexAttribI4i& c = |
| 4423 *static_cast<const volatile gles2::cmds::VertexAttribI4i*>(cmd_data); | 4423 *static_cast<const volatile gles2::cmds::VertexAttribI4i*>(cmd_data); |
| 4424 GLuint indx = static_cast<GLuint>(c.indx); | 4424 GLuint indx = static_cast<GLuint>(c.indx); |
| 4425 GLint x = static_cast<GLint>(c.x); | 4425 GLint x = static_cast<GLint>(c.x); |
| 4426 GLint y = static_cast<GLint>(c.y); | 4426 GLint y = static_cast<GLint>(c.y); |
| 4427 GLint z = static_cast<GLint>(c.z); | 4427 GLint z = static_cast<GLint>(c.z); |
| 4428 GLint w = static_cast<GLint>(c.w); | 4428 GLint w = static_cast<GLint>(c.w); |
| 4429 DoVertexAttribI4i(indx, x, y, z, w); | 4429 DoVertexAttribI4i(indx, x, y, z, w); |
| 4430 return error::kNoError; | 4430 return error::kNoError; |
| 4431 } | 4431 } |
| 4432 | 4432 |
| 4433 error::Error GLES2DecoderImpl::HandleVertexAttribI4ivImmediate( | 4433 error::Error GLES2DecoderImpl::HandleVertexAttribI4ivImmediate( |
| 4434 uint32_t immediate_data_size, | 4434 uint32_t immediate_data_size, |
| 4435 const volatile void* cmd_data) { | 4435 const volatile void* cmd_data) { |
| 4436 if (!unsafe_es3_apis_enabled()) | 4436 if (!es3_apis_enabled()) |
| 4437 return error::kUnknownCommand; | 4437 return error::kUnknownCommand; |
| 4438 const volatile gles2::cmds::VertexAttribI4ivImmediate& c = | 4438 const volatile gles2::cmds::VertexAttribI4ivImmediate& c = |
| 4439 *static_cast<const volatile gles2::cmds::VertexAttribI4ivImmediate*>( | 4439 *static_cast<const volatile gles2::cmds::VertexAttribI4ivImmediate*>( |
| 4440 cmd_data); | 4440 cmd_data); |
| 4441 GLuint indx = static_cast<GLuint>(c.indx); | 4441 GLuint indx = static_cast<GLuint>(c.indx); |
| 4442 uint32_t data_size; | 4442 uint32_t data_size; |
| 4443 if (!GLES2Util::ComputeDataSize(1, sizeof(GLint), 4, &data_size)) { | 4443 if (!GLES2Util::ComputeDataSize(1, sizeof(GLint), 4, &data_size)) { |
| 4444 return error::kOutOfBounds; | 4444 return error::kOutOfBounds; |
| 4445 } | 4445 } |
| 4446 if (data_size > immediate_data_size) { | 4446 if (data_size > immediate_data_size) { |
| 4447 return error::kOutOfBounds; | 4447 return error::kOutOfBounds; |
| 4448 } | 4448 } |
| 4449 volatile const GLint* values = GetImmediateDataAs<volatile const GLint*>( | 4449 volatile const GLint* values = GetImmediateDataAs<volatile const GLint*>( |
| 4450 c, data_size, immediate_data_size); | 4450 c, data_size, immediate_data_size); |
| 4451 if (values == NULL) { | 4451 if (values == NULL) { |
| 4452 return error::kOutOfBounds; | 4452 return error::kOutOfBounds; |
| 4453 } | 4453 } |
| 4454 DoVertexAttribI4iv(indx, values); | 4454 DoVertexAttribI4iv(indx, values); |
| 4455 return error::kNoError; | 4455 return error::kNoError; |
| 4456 } | 4456 } |
| 4457 | 4457 |
| 4458 error::Error GLES2DecoderImpl::HandleVertexAttribI4ui( | 4458 error::Error GLES2DecoderImpl::HandleVertexAttribI4ui( |
| 4459 uint32_t immediate_data_size, | 4459 uint32_t immediate_data_size, |
| 4460 const volatile void* cmd_data) { | 4460 const volatile void* cmd_data) { |
| 4461 if (!unsafe_es3_apis_enabled()) | 4461 if (!es3_apis_enabled()) |
| 4462 return error::kUnknownCommand; | 4462 return error::kUnknownCommand; |
| 4463 const volatile gles2::cmds::VertexAttribI4ui& c = | 4463 const volatile gles2::cmds::VertexAttribI4ui& c = |
| 4464 *static_cast<const volatile gles2::cmds::VertexAttribI4ui*>(cmd_data); | 4464 *static_cast<const volatile gles2::cmds::VertexAttribI4ui*>(cmd_data); |
| 4465 GLuint indx = static_cast<GLuint>(c.indx); | 4465 GLuint indx = static_cast<GLuint>(c.indx); |
| 4466 GLuint x = static_cast<GLuint>(c.x); | 4466 GLuint x = static_cast<GLuint>(c.x); |
| 4467 GLuint y = static_cast<GLuint>(c.y); | 4467 GLuint y = static_cast<GLuint>(c.y); |
| 4468 GLuint z = static_cast<GLuint>(c.z); | 4468 GLuint z = static_cast<GLuint>(c.z); |
| 4469 GLuint w = static_cast<GLuint>(c.w); | 4469 GLuint w = static_cast<GLuint>(c.w); |
| 4470 DoVertexAttribI4ui(indx, x, y, z, w); | 4470 DoVertexAttribI4ui(indx, x, y, z, w); |
| 4471 return error::kNoError; | 4471 return error::kNoError; |
| 4472 } | 4472 } |
| 4473 | 4473 |
| 4474 error::Error GLES2DecoderImpl::HandleVertexAttribI4uivImmediate( | 4474 error::Error GLES2DecoderImpl::HandleVertexAttribI4uivImmediate( |
| 4475 uint32_t immediate_data_size, | 4475 uint32_t immediate_data_size, |
| 4476 const volatile void* cmd_data) { | 4476 const volatile void* cmd_data) { |
| 4477 if (!unsafe_es3_apis_enabled()) | 4477 if (!es3_apis_enabled()) |
| 4478 return error::kUnknownCommand; | 4478 return error::kUnknownCommand; |
| 4479 const volatile gles2::cmds::VertexAttribI4uivImmediate& c = | 4479 const volatile gles2::cmds::VertexAttribI4uivImmediate& c = |
| 4480 *static_cast<const volatile gles2::cmds::VertexAttribI4uivImmediate*>( | 4480 *static_cast<const volatile gles2::cmds::VertexAttribI4uivImmediate*>( |
| 4481 cmd_data); | 4481 cmd_data); |
| 4482 GLuint indx = static_cast<GLuint>(c.indx); | 4482 GLuint indx = static_cast<GLuint>(c.indx); |
| 4483 uint32_t data_size; | 4483 uint32_t data_size; |
| 4484 if (!GLES2Util::ComputeDataSize(1, sizeof(GLuint), 4, &data_size)) { | 4484 if (!GLES2Util::ComputeDataSize(1, sizeof(GLuint), 4, &data_size)) { |
| 4485 return error::kOutOfBounds; | 4485 return error::kOutOfBounds; |
| 4486 } | 4486 } |
| 4487 if (data_size > immediate_data_size) { | 4487 if (data_size > immediate_data_size) { |
| (...skipping 282 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4770 if (queries == NULL) { | 4770 if (queries == NULL) { |
| 4771 return error::kOutOfBounds; | 4771 return error::kOutOfBounds; |
| 4772 } | 4772 } |
| 4773 DeleteQueriesEXTHelper(n, queries); | 4773 DeleteQueriesEXTHelper(n, queries); |
| 4774 return error::kNoError; | 4774 return error::kNoError; |
| 4775 } | 4775 } |
| 4776 | 4776 |
| 4777 error::Error GLES2DecoderImpl::HandleBeginTransformFeedback( | 4777 error::Error GLES2DecoderImpl::HandleBeginTransformFeedback( |
| 4778 uint32_t immediate_data_size, | 4778 uint32_t immediate_data_size, |
| 4779 const volatile void* cmd_data) { | 4779 const volatile void* cmd_data) { |
| 4780 if (!unsafe_es3_apis_enabled()) | 4780 if (!es3_apis_enabled()) |
| 4781 return error::kUnknownCommand; | 4781 return error::kUnknownCommand; |
| 4782 const volatile gles2::cmds::BeginTransformFeedback& c = | 4782 const volatile gles2::cmds::BeginTransformFeedback& c = |
| 4783 *static_cast<const volatile gles2::cmds::BeginTransformFeedback*>( | 4783 *static_cast<const volatile gles2::cmds::BeginTransformFeedback*>( |
| 4784 cmd_data); | 4784 cmd_data); |
| 4785 GLenum primitivemode = static_cast<GLenum>(c.primitivemode); | 4785 GLenum primitivemode = static_cast<GLenum>(c.primitivemode); |
| 4786 if (!validators_->transform_feedback_primitive_mode.IsValid(primitivemode)) { | 4786 if (!validators_->transform_feedback_primitive_mode.IsValid(primitivemode)) { |
| 4787 LOCAL_SET_GL_ERROR_INVALID_ENUM("glBeginTransformFeedback", primitivemode, | 4787 LOCAL_SET_GL_ERROR_INVALID_ENUM("glBeginTransformFeedback", primitivemode, |
| 4788 "primitivemode"); | 4788 "primitivemode"); |
| 4789 return error::kNoError; | 4789 return error::kNoError; |
| 4790 } | 4790 } |
| 4791 DoBeginTransformFeedback(primitivemode); | 4791 DoBeginTransformFeedback(primitivemode); |
| 4792 return error::kNoError; | 4792 return error::kNoError; |
| 4793 } | 4793 } |
| 4794 | 4794 |
| 4795 error::Error GLES2DecoderImpl::HandleEndTransformFeedback( | 4795 error::Error GLES2DecoderImpl::HandleEndTransformFeedback( |
| 4796 uint32_t immediate_data_size, | 4796 uint32_t immediate_data_size, |
| 4797 const volatile void* cmd_data) { | 4797 const volatile void* cmd_data) { |
| 4798 if (!unsafe_es3_apis_enabled()) | 4798 if (!es3_apis_enabled()) |
| 4799 return error::kUnknownCommand; | 4799 return error::kUnknownCommand; |
| 4800 DoEndTransformFeedback(); | 4800 DoEndTransformFeedback(); |
| 4801 return error::kNoError; | 4801 return error::kNoError; |
| 4802 } | 4802 } |
| 4803 | 4803 |
| 4804 error::Error GLES2DecoderImpl::HandleInsertEventMarkerEXT( | 4804 error::Error GLES2DecoderImpl::HandleInsertEventMarkerEXT( |
| 4805 uint32_t immediate_data_size, | 4805 uint32_t immediate_data_size, |
| 4806 const volatile void* cmd_data) { | 4806 const volatile void* cmd_data) { |
| 4807 const volatile gles2::cmds::InsertEventMarkerEXT& c = | 4807 const volatile gles2::cmds::InsertEventMarkerEXT& c = |
| 4808 *static_cast<const volatile gles2::cmds::InsertEventMarkerEXT*>(cmd_data); | 4808 *static_cast<const volatile gles2::cmds::InsertEventMarkerEXT*>(cmd_data); |
| (...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4951 "type"); | 4951 "type"); |
| 4952 return error::kNoError; | 4952 return error::kNoError; |
| 4953 } | 4953 } |
| 4954 *result_dst = DoGetMaxValueInBufferCHROMIUM(buffer_id, count, type, offset); | 4954 *result_dst = DoGetMaxValueInBufferCHROMIUM(buffer_id, count, type, offset); |
| 4955 return error::kNoError; | 4955 return error::kNoError; |
| 4956 } | 4956 } |
| 4957 | 4957 |
| 4958 error::Error GLES2DecoderImpl::HandleFlushMappedBufferRange( | 4958 error::Error GLES2DecoderImpl::HandleFlushMappedBufferRange( |
| 4959 uint32_t immediate_data_size, | 4959 uint32_t immediate_data_size, |
| 4960 const volatile void* cmd_data) { | 4960 const volatile void* cmd_data) { |
| 4961 if (!unsafe_es3_apis_enabled()) | 4961 if (!es3_apis_enabled()) |
| 4962 return error::kUnknownCommand; | 4962 return error::kUnknownCommand; |
| 4963 const volatile gles2::cmds::FlushMappedBufferRange& c = | 4963 const volatile gles2::cmds::FlushMappedBufferRange& c = |
| 4964 *static_cast<const volatile gles2::cmds::FlushMappedBufferRange*>( | 4964 *static_cast<const volatile gles2::cmds::FlushMappedBufferRange*>( |
| 4965 cmd_data); | 4965 cmd_data); |
| 4966 GLenum target = static_cast<GLenum>(c.target); | 4966 GLenum target = static_cast<GLenum>(c.target); |
| 4967 GLintptr offset = static_cast<GLintptr>(c.offset); | 4967 GLintptr offset = static_cast<GLintptr>(c.offset); |
| 4968 GLsizeiptr size = static_cast<GLsizeiptr>(c.size); | 4968 GLsizeiptr size = static_cast<GLsizeiptr>(c.size); |
| 4969 if (!validators_->buffer_target.IsValid(target)) { | 4969 if (!validators_->buffer_target.IsValid(target)) { |
| 4970 LOCAL_SET_GL_ERROR_INVALID_ENUM("glFlushMappedBufferRange", target, | 4970 LOCAL_SET_GL_ERROR_INVALID_ENUM("glFlushMappedBufferRange", target, |
| 4971 "target"); | 4971 "target"); |
| (...skipping 649 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5621 state_.enable_flags.cached_sample_alpha_to_one_ext = enabled; | 5621 state_.enable_flags.cached_sample_alpha_to_one_ext = enabled; |
| 5622 return true; | 5622 return true; |
| 5623 } | 5623 } |
| 5624 return false; | 5624 return false; |
| 5625 default: | 5625 default: |
| 5626 NOTREACHED(); | 5626 NOTREACHED(); |
| 5627 return false; | 5627 return false; |
| 5628 } | 5628 } |
| 5629 } | 5629 } |
| 5630 #endif // GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_AUTOGEN_H_ | 5630 #endif // GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_AUTOGEN_H_ |
| OLD | NEW |