| 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 (!feature_info_->IsWebGL2OrES3Context()) |
| 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 (!feature_info_->IsWebGL2OrES3Context()) |
| 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 (!feature_info_->IsWebGL2OrES3Context()) |
| 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 (!feature_info_->IsWebGL2OrES3Context()) |
| 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 (!feature_info_->IsWebGL2OrES3Context()) |
| 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 (!feature_info_->IsWebGL2OrES3Context()) |
| 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 (!feature_info_->IsWebGL2OrES3Context()) |
| 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 (!feature_info_->IsWebGL2OrES3Context()) |
| 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 181 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 634 return error::kNoError; | 634 return error::kNoError; |
| 635 } | 635 } |
| 636 DoCompressedTexSubImage2D(target, level, xoffset, yoffset, width, height, | 636 DoCompressedTexSubImage2D(target, level, xoffset, yoffset, width, height, |
| 637 format, imageSize, data); | 637 format, imageSize, data); |
| 638 return error::kNoError; | 638 return error::kNoError; |
| 639 } | 639 } |
| 640 | 640 |
| 641 error::Error GLES2DecoderImpl::HandleCompressedTexImage3DBucket( | 641 error::Error GLES2DecoderImpl::HandleCompressedTexImage3DBucket( |
| 642 uint32_t immediate_data_size, | 642 uint32_t immediate_data_size, |
| 643 const volatile void* cmd_data) { | 643 const volatile void* cmd_data) { |
| 644 if (!unsafe_es3_apis_enabled()) | 644 if (!feature_info_->IsWebGL2OrES3Context()) |
| 645 return error::kUnknownCommand; | 645 return error::kUnknownCommand; |
| 646 const volatile gles2::cmds::CompressedTexImage3DBucket& c = | 646 const volatile gles2::cmds::CompressedTexImage3DBucket& c = |
| 647 *static_cast<const volatile gles2::cmds::CompressedTexImage3DBucket*>( | 647 *static_cast<const volatile gles2::cmds::CompressedTexImage3DBucket*>( |
| 648 cmd_data); | 648 cmd_data); |
| 649 GLenum target = static_cast<GLenum>(c.target); | 649 GLenum target = static_cast<GLenum>(c.target); |
| 650 GLint level = static_cast<GLint>(c.level); | 650 GLint level = static_cast<GLint>(c.level); |
| 651 GLenum internalformat = static_cast<GLenum>(c.internalformat); | 651 GLenum internalformat = static_cast<GLenum>(c.internalformat); |
| 652 GLsizei width = static_cast<GLsizei>(c.width); | 652 GLsizei width = static_cast<GLsizei>(c.width); |
| 653 GLsizei height = static_cast<GLsizei>(c.height); | 653 GLsizei height = static_cast<GLsizei>(c.height); |
| 654 GLsizei depth = static_cast<GLsizei>(c.depth); | 654 GLsizei depth = static_cast<GLsizei>(c.depth); |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 689 return error::kNoError; | 689 return error::kNoError; |
| 690 } | 690 } |
| 691 DoCompressedTexImage3D(target, level, internalformat, width, height, depth, | 691 DoCompressedTexImage3D(target, level, internalformat, width, height, depth, |
| 692 border, imageSize, data); | 692 border, imageSize, data); |
| 693 return error::kNoError; | 693 return error::kNoError; |
| 694 } | 694 } |
| 695 | 695 |
| 696 error::Error GLES2DecoderImpl::HandleCompressedTexImage3D( | 696 error::Error GLES2DecoderImpl::HandleCompressedTexImage3D( |
| 697 uint32_t immediate_data_size, | 697 uint32_t immediate_data_size, |
| 698 const volatile void* cmd_data) { | 698 const volatile void* cmd_data) { |
| 699 if (!unsafe_es3_apis_enabled()) | 699 if (!feature_info_->IsWebGL2OrES3Context()) |
| 700 return error::kUnknownCommand; | 700 return error::kUnknownCommand; |
| 701 const volatile gles2::cmds::CompressedTexImage3D& c = | 701 const volatile gles2::cmds::CompressedTexImage3D& c = |
| 702 *static_cast<const volatile gles2::cmds::CompressedTexImage3D*>(cmd_data); | 702 *static_cast<const volatile gles2::cmds::CompressedTexImage3D*>(cmd_data); |
| 703 GLenum target = static_cast<GLenum>(c.target); | 703 GLenum target = static_cast<GLenum>(c.target); |
| 704 GLint level = static_cast<GLint>(c.level); | 704 GLint level = static_cast<GLint>(c.level); |
| 705 GLenum internalformat = static_cast<GLenum>(c.internalformat); | 705 GLenum internalformat = static_cast<GLenum>(c.internalformat); |
| 706 GLsizei width = static_cast<GLsizei>(c.width); | 706 GLsizei width = static_cast<GLsizei>(c.width); |
| 707 GLsizei height = static_cast<GLsizei>(c.height); | 707 GLsizei height = static_cast<GLsizei>(c.height); |
| 708 GLsizei depth = static_cast<GLsizei>(c.depth); | 708 GLsizei depth = static_cast<GLsizei>(c.depth); |
| 709 GLint border = static_cast<GLint>(c.border); | 709 GLint border = static_cast<GLint>(c.border); |
| (...skipping 29 matching lines...) Expand all Loading... |
| 739 return error::kNoError; | 739 return error::kNoError; |
| 740 } | 740 } |
| 741 DoCompressedTexImage3D(target, level, internalformat, width, height, depth, | 741 DoCompressedTexImage3D(target, level, internalformat, width, height, depth, |
| 742 border, imageSize, data); | 742 border, imageSize, data); |
| 743 return error::kNoError; | 743 return error::kNoError; |
| 744 } | 744 } |
| 745 | 745 |
| 746 error::Error GLES2DecoderImpl::HandleCompressedTexSubImage3DBucket( | 746 error::Error GLES2DecoderImpl::HandleCompressedTexSubImage3DBucket( |
| 747 uint32_t immediate_data_size, | 747 uint32_t immediate_data_size, |
| 748 const volatile void* cmd_data) { | 748 const volatile void* cmd_data) { |
| 749 if (!unsafe_es3_apis_enabled()) | 749 if (!feature_info_->IsWebGL2OrES3Context()) |
| 750 return error::kUnknownCommand; | 750 return error::kUnknownCommand; |
| 751 const volatile gles2::cmds::CompressedTexSubImage3DBucket& c = | 751 const volatile gles2::cmds::CompressedTexSubImage3DBucket& c = |
| 752 *static_cast<const volatile gles2::cmds::CompressedTexSubImage3DBucket*>( | 752 *static_cast<const volatile gles2::cmds::CompressedTexSubImage3DBucket*>( |
| 753 cmd_data); | 753 cmd_data); |
| 754 GLenum target = static_cast<GLenum>(c.target); | 754 GLenum target = static_cast<GLenum>(c.target); |
| 755 GLint level = static_cast<GLint>(c.level); | 755 GLint level = static_cast<GLint>(c.level); |
| 756 GLint xoffset = static_cast<GLint>(c.xoffset); | 756 GLint xoffset = static_cast<GLint>(c.xoffset); |
| 757 GLint yoffset = static_cast<GLint>(c.yoffset); | 757 GLint yoffset = static_cast<GLint>(c.yoffset); |
| 758 GLint zoffset = static_cast<GLint>(c.zoffset); | 758 GLint zoffset = static_cast<GLint>(c.zoffset); |
| 759 GLsizei width = static_cast<GLsizei>(c.width); | 759 GLsizei width = static_cast<GLsizei>(c.width); |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 799 return error::kNoError; | 799 return error::kNoError; |
| 800 } | 800 } |
| 801 DoCompressedTexSubImage3D(target, level, xoffset, yoffset, zoffset, width, | 801 DoCompressedTexSubImage3D(target, level, xoffset, yoffset, zoffset, width, |
| 802 height, depth, format, imageSize, data); | 802 height, depth, format, imageSize, data); |
| 803 return error::kNoError; | 803 return error::kNoError; |
| 804 } | 804 } |
| 805 | 805 |
| 806 error::Error GLES2DecoderImpl::HandleCompressedTexSubImage3D( | 806 error::Error GLES2DecoderImpl::HandleCompressedTexSubImage3D( |
| 807 uint32_t immediate_data_size, | 807 uint32_t immediate_data_size, |
| 808 const volatile void* cmd_data) { | 808 const volatile void* cmd_data) { |
| 809 if (!unsafe_es3_apis_enabled()) | 809 if (!feature_info_->IsWebGL2OrES3Context()) |
| 810 return error::kUnknownCommand; | 810 return error::kUnknownCommand; |
| 811 const volatile gles2::cmds::CompressedTexSubImage3D& c = | 811 const volatile gles2::cmds::CompressedTexSubImage3D& c = |
| 812 *static_cast<const volatile gles2::cmds::CompressedTexSubImage3D*>( | 812 *static_cast<const volatile gles2::cmds::CompressedTexSubImage3D*>( |
| 813 cmd_data); | 813 cmd_data); |
| 814 GLenum target = static_cast<GLenum>(c.target); | 814 GLenum target = static_cast<GLenum>(c.target); |
| 815 GLint level = static_cast<GLint>(c.level); | 815 GLint level = static_cast<GLint>(c.level); |
| 816 GLint xoffset = static_cast<GLint>(c.xoffset); | 816 GLint xoffset = static_cast<GLint>(c.xoffset); |
| 817 GLint yoffset = static_cast<GLint>(c.yoffset); | 817 GLint yoffset = static_cast<GLint>(c.yoffset); |
| 818 GLint zoffset = static_cast<GLint>(c.zoffset); | 818 GLint zoffset = static_cast<GLint>(c.zoffset); |
| 819 GLsizei width = static_cast<GLsizei>(c.width); | 819 GLsizei width = static_cast<GLsizei>(c.width); |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 855 return error::kNoError; | 855 return error::kNoError; |
| 856 } | 856 } |
| 857 DoCompressedTexSubImage3D(target, level, xoffset, yoffset, zoffset, width, | 857 DoCompressedTexSubImage3D(target, level, xoffset, yoffset, zoffset, width, |
| 858 height, depth, format, imageSize, data); | 858 height, depth, format, imageSize, data); |
| 859 return error::kNoError; | 859 return error::kNoError; |
| 860 } | 860 } |
| 861 | 861 |
| 862 error::Error GLES2DecoderImpl::HandleCopyBufferSubData( | 862 error::Error GLES2DecoderImpl::HandleCopyBufferSubData( |
| 863 uint32_t immediate_data_size, | 863 uint32_t immediate_data_size, |
| 864 const volatile void* cmd_data) { | 864 const volatile void* cmd_data) { |
| 865 if (!unsafe_es3_apis_enabled()) | 865 if (!feature_info_->IsWebGL2OrES3Context()) |
| 866 return error::kUnknownCommand; | 866 return error::kUnknownCommand; |
| 867 const volatile gles2::cmds::CopyBufferSubData& c = | 867 const volatile gles2::cmds::CopyBufferSubData& c = |
| 868 *static_cast<const volatile gles2::cmds::CopyBufferSubData*>(cmd_data); | 868 *static_cast<const volatile gles2::cmds::CopyBufferSubData*>(cmd_data); |
| 869 GLenum readtarget = static_cast<GLenum>(c.readtarget); | 869 GLenum readtarget = static_cast<GLenum>(c.readtarget); |
| 870 GLenum writetarget = static_cast<GLenum>(c.writetarget); | 870 GLenum writetarget = static_cast<GLenum>(c.writetarget); |
| 871 GLintptr readoffset = static_cast<GLintptr>(c.readoffset); | 871 GLintptr readoffset = static_cast<GLintptr>(c.readoffset); |
| 872 GLintptr writeoffset = static_cast<GLintptr>(c.writeoffset); | 872 GLintptr writeoffset = static_cast<GLintptr>(c.writeoffset); |
| 873 GLsizeiptr size = static_cast<GLsizeiptr>(c.size); | 873 GLsizeiptr size = static_cast<GLsizeiptr>(c.size); |
| 874 if (!validators_->buffer_target.IsValid(readtarget)) { | 874 if (!validators_->buffer_target.IsValid(readtarget)) { |
| 875 LOCAL_SET_GL_ERROR_INVALID_ENUM("glCopyBufferSubData", readtarget, | 875 LOCAL_SET_GL_ERROR_INVALID_ENUM("glCopyBufferSubData", readtarget, |
| (...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 956 LOCAL_SET_GL_ERROR(GL_INVALID_VALUE, "glCopyTexSubImage2D", "height < 0"); | 956 LOCAL_SET_GL_ERROR(GL_INVALID_VALUE, "glCopyTexSubImage2D", "height < 0"); |
| 957 return error::kNoError; | 957 return error::kNoError; |
| 958 } | 958 } |
| 959 DoCopyTexSubImage2D(target, level, xoffset, yoffset, x, y, width, height); | 959 DoCopyTexSubImage2D(target, level, xoffset, yoffset, x, y, width, height); |
| 960 return error::kNoError; | 960 return error::kNoError; |
| 961 } | 961 } |
| 962 | 962 |
| 963 error::Error GLES2DecoderImpl::HandleCopyTexSubImage3D( | 963 error::Error GLES2DecoderImpl::HandleCopyTexSubImage3D( |
| 964 uint32_t immediate_data_size, | 964 uint32_t immediate_data_size, |
| 965 const volatile void* cmd_data) { | 965 const volatile void* cmd_data) { |
| 966 if (!unsafe_es3_apis_enabled()) | 966 if (!feature_info_->IsWebGL2OrES3Context()) |
| 967 return error::kUnknownCommand; | 967 return error::kUnknownCommand; |
| 968 const volatile gles2::cmds::CopyTexSubImage3D& c = | 968 const volatile gles2::cmds::CopyTexSubImage3D& c = |
| 969 *static_cast<const volatile gles2::cmds::CopyTexSubImage3D*>(cmd_data); | 969 *static_cast<const volatile gles2::cmds::CopyTexSubImage3D*>(cmd_data); |
| 970 error::Error error; | 970 error::Error error; |
| 971 error = WillAccessBoundFramebufferForRead(); | 971 error = WillAccessBoundFramebufferForRead(); |
| 972 if (error != error::kNoError) | 972 if (error != error::kNoError) |
| 973 return error; | 973 return error; |
| 974 GLenum target = static_cast<GLenum>(c.target); | 974 GLenum target = static_cast<GLenum>(c.target); |
| 975 GLint level = static_cast<GLint>(c.level); | 975 GLint level = static_cast<GLint>(c.level); |
| 976 GLint xoffset = static_cast<GLint>(c.xoffset); | 976 GLint xoffset = static_cast<GLint>(c.xoffset); |
| (...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1108 if (renderbuffers == NULL) { | 1108 if (renderbuffers == NULL) { |
| 1109 return error::kOutOfBounds; | 1109 return error::kOutOfBounds; |
| 1110 } | 1110 } |
| 1111 DeleteRenderbuffersHelper(n, renderbuffers); | 1111 DeleteRenderbuffersHelper(n, renderbuffers); |
| 1112 return error::kNoError; | 1112 return error::kNoError; |
| 1113 } | 1113 } |
| 1114 | 1114 |
| 1115 error::Error GLES2DecoderImpl::HandleDeleteSamplersImmediate( | 1115 error::Error GLES2DecoderImpl::HandleDeleteSamplersImmediate( |
| 1116 uint32_t immediate_data_size, | 1116 uint32_t immediate_data_size, |
| 1117 const volatile void* cmd_data) { | 1117 const volatile void* cmd_data) { |
| 1118 if (!unsafe_es3_apis_enabled()) | 1118 if (!feature_info_->IsWebGL2OrES3Context()) |
| 1119 return error::kUnknownCommand; | 1119 return error::kUnknownCommand; |
| 1120 const volatile gles2::cmds::DeleteSamplersImmediate& c = | 1120 const volatile gles2::cmds::DeleteSamplersImmediate& c = |
| 1121 *static_cast<const volatile gles2::cmds::DeleteSamplersImmediate*>( | 1121 *static_cast<const volatile gles2::cmds::DeleteSamplersImmediate*>( |
| 1122 cmd_data); | 1122 cmd_data); |
| 1123 GLsizei n = static_cast<GLsizei>(c.n); | 1123 GLsizei n = static_cast<GLsizei>(c.n); |
| 1124 uint32_t data_size; | 1124 uint32_t data_size; |
| 1125 if (!SafeMultiplyUint32(n, sizeof(GLuint), &data_size)) { | 1125 if (!SafeMultiplyUint32(n, sizeof(GLuint), &data_size)) { |
| 1126 return error::kOutOfBounds; | 1126 return error::kOutOfBounds; |
| 1127 } | 1127 } |
| 1128 volatile const GLuint* samplers = GetImmediateDataAs<volatile const GLuint*>( | 1128 volatile const GLuint* samplers = GetImmediateDataAs<volatile const GLuint*>( |
| 1129 c, data_size, immediate_data_size); | 1129 c, data_size, immediate_data_size); |
| 1130 if (samplers == NULL) { | 1130 if (samplers == NULL) { |
| 1131 return error::kOutOfBounds; | 1131 return error::kOutOfBounds; |
| 1132 } | 1132 } |
| 1133 DeleteSamplersHelper(n, samplers); | 1133 DeleteSamplersHelper(n, samplers); |
| 1134 return error::kNoError; | 1134 return error::kNoError; |
| 1135 } | 1135 } |
| 1136 | 1136 |
| 1137 error::Error GLES2DecoderImpl::HandleDeleteSync(uint32_t immediate_data_size, | 1137 error::Error GLES2DecoderImpl::HandleDeleteSync(uint32_t immediate_data_size, |
| 1138 const volatile void* cmd_data) { | 1138 const volatile void* cmd_data) { |
| 1139 if (!unsafe_es3_apis_enabled()) | 1139 if (!feature_info_->IsWebGL2OrES3Context()) |
| 1140 return error::kUnknownCommand; | 1140 return error::kUnknownCommand; |
| 1141 const volatile gles2::cmds::DeleteSync& c = | 1141 const volatile gles2::cmds::DeleteSync& c = |
| 1142 *static_cast<const volatile gles2::cmds::DeleteSync*>(cmd_data); | 1142 *static_cast<const volatile gles2::cmds::DeleteSync*>(cmd_data); |
| 1143 GLuint sync = c.sync; | 1143 GLuint sync = c.sync; |
| 1144 DeleteSyncHelper(sync); | 1144 DeleteSyncHelper(sync); |
| 1145 return error::kNoError; | 1145 return error::kNoError; |
| 1146 } | 1146 } |
| 1147 | 1147 |
| 1148 error::Error GLES2DecoderImpl::HandleDeleteTexturesImmediate( | 1148 error::Error GLES2DecoderImpl::HandleDeleteTexturesImmediate( |
| 1149 uint32_t immediate_data_size, | 1149 uint32_t immediate_data_size, |
| (...skipping 11 matching lines...) Expand all Loading... |
| 1161 if (textures == NULL) { | 1161 if (textures == NULL) { |
| 1162 return error::kOutOfBounds; | 1162 return error::kOutOfBounds; |
| 1163 } | 1163 } |
| 1164 DeleteTexturesHelper(n, textures); | 1164 DeleteTexturesHelper(n, textures); |
| 1165 return error::kNoError; | 1165 return error::kNoError; |
| 1166 } | 1166 } |
| 1167 | 1167 |
| 1168 error::Error GLES2DecoderImpl::HandleDeleteTransformFeedbacksImmediate( | 1168 error::Error GLES2DecoderImpl::HandleDeleteTransformFeedbacksImmediate( |
| 1169 uint32_t immediate_data_size, | 1169 uint32_t immediate_data_size, |
| 1170 const volatile void* cmd_data) { | 1170 const volatile void* cmd_data) { |
| 1171 if (!unsafe_es3_apis_enabled()) | 1171 if (!feature_info_->IsWebGL2OrES3Context()) |
| 1172 return error::kUnknownCommand; | 1172 return error::kUnknownCommand; |
| 1173 const volatile gles2::cmds::DeleteTransformFeedbacksImmediate& c = | 1173 const volatile gles2::cmds::DeleteTransformFeedbacksImmediate& c = |
| 1174 *static_cast< | 1174 *static_cast< |
| 1175 const volatile gles2::cmds::DeleteTransformFeedbacksImmediate*>( | 1175 const volatile gles2::cmds::DeleteTransformFeedbacksImmediate*>( |
| 1176 cmd_data); | 1176 cmd_data); |
| 1177 GLsizei n = static_cast<GLsizei>(c.n); | 1177 GLsizei n = static_cast<GLsizei>(c.n); |
| 1178 uint32_t data_size; | 1178 uint32_t data_size; |
| 1179 if (!SafeMultiplyUint32(n, sizeof(GLuint), &data_size)) { | 1179 if (!SafeMultiplyUint32(n, sizeof(GLuint), &data_size)) { |
| 1180 return error::kOutOfBounds; | 1180 return error::kOutOfBounds; |
| 1181 } | 1181 } |
| (...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1281 const volatile gles2::cmds::EnableVertexAttribArray& c = | 1281 const volatile gles2::cmds::EnableVertexAttribArray& c = |
| 1282 *static_cast<const volatile gles2::cmds::EnableVertexAttribArray*>( | 1282 *static_cast<const volatile gles2::cmds::EnableVertexAttribArray*>( |
| 1283 cmd_data); | 1283 cmd_data); |
| 1284 GLuint index = static_cast<GLuint>(c.index); | 1284 GLuint index = static_cast<GLuint>(c.index); |
| 1285 DoEnableVertexAttribArray(index); | 1285 DoEnableVertexAttribArray(index); |
| 1286 return error::kNoError; | 1286 return error::kNoError; |
| 1287 } | 1287 } |
| 1288 | 1288 |
| 1289 error::Error GLES2DecoderImpl::HandleFenceSync(uint32_t immediate_data_size, | 1289 error::Error GLES2DecoderImpl::HandleFenceSync(uint32_t immediate_data_size, |
| 1290 const volatile void* cmd_data) { | 1290 const volatile void* cmd_data) { |
| 1291 if (!unsafe_es3_apis_enabled()) | 1291 if (!feature_info_->IsWebGL2OrES3Context()) |
| 1292 return error::kUnknownCommand; | 1292 return error::kUnknownCommand; |
| 1293 const volatile gles2::cmds::FenceSync& c = | 1293 const volatile gles2::cmds::FenceSync& c = |
| 1294 *static_cast<const volatile gles2::cmds::FenceSync*>(cmd_data); | 1294 *static_cast<const volatile gles2::cmds::FenceSync*>(cmd_data); |
| 1295 GLenum condition = static_cast<GLenum>(c.condition); | 1295 GLenum condition = static_cast<GLenum>(c.condition); |
| 1296 GLbitfield flags = static_cast<GLbitfield>(c.flags); | 1296 GLbitfield flags = static_cast<GLbitfield>(c.flags); |
| 1297 uint32_t client_id = c.client_id; | 1297 uint32_t client_id = c.client_id; |
| 1298 GLsync service_id = 0; | 1298 GLsync service_id = 0; |
| 1299 if (group_->GetSyncServiceId(client_id, &service_id)) { | 1299 if (group_->GetSyncServiceId(client_id, &service_id)) { |
| 1300 return error::kInvalidArguments; | 1300 return error::kInvalidArguments; |
| 1301 } | 1301 } |
| (...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1376 "textarget"); | 1376 "textarget"); |
| 1377 return error::kNoError; | 1377 return error::kNoError; |
| 1378 } | 1378 } |
| 1379 DoFramebufferTexture2D(target, attachment, textarget, texture, level); | 1379 DoFramebufferTexture2D(target, attachment, textarget, texture, level); |
| 1380 return error::kNoError; | 1380 return error::kNoError; |
| 1381 } | 1381 } |
| 1382 | 1382 |
| 1383 error::Error GLES2DecoderImpl::HandleFramebufferTextureLayer( | 1383 error::Error GLES2DecoderImpl::HandleFramebufferTextureLayer( |
| 1384 uint32_t immediate_data_size, | 1384 uint32_t immediate_data_size, |
| 1385 const volatile void* cmd_data) { | 1385 const volatile void* cmd_data) { |
| 1386 if (!unsafe_es3_apis_enabled()) | 1386 if (!feature_info_->IsWebGL2OrES3Context()) |
| 1387 return error::kUnknownCommand; | 1387 return error::kUnknownCommand; |
| 1388 const volatile gles2::cmds::FramebufferTextureLayer& c = | 1388 const volatile gles2::cmds::FramebufferTextureLayer& c = |
| 1389 *static_cast<const volatile gles2::cmds::FramebufferTextureLayer*>( | 1389 *static_cast<const volatile gles2::cmds::FramebufferTextureLayer*>( |
| 1390 cmd_data); | 1390 cmd_data); |
| 1391 GLenum target = static_cast<GLenum>(c.target); | 1391 GLenum target = static_cast<GLenum>(c.target); |
| 1392 GLenum attachment = static_cast<GLenum>(c.attachment); | 1392 GLenum attachment = static_cast<GLenum>(c.attachment); |
| 1393 GLuint texture = c.texture; | 1393 GLuint texture = c.texture; |
| 1394 GLint level = static_cast<GLint>(c.level); | 1394 GLint level = static_cast<GLint>(c.level); |
| 1395 GLint layer = static_cast<GLint>(c.layer); | 1395 GLint layer = static_cast<GLint>(c.layer); |
| 1396 if (!validators_->framebuffer_target.IsValid(target)) { | 1396 if (!validators_->framebuffer_target.IsValid(target)) { |
| (...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1510 if (!CheckUniqueAndNonNullIds(n, renderbuffers_safe) || | 1510 if (!CheckUniqueAndNonNullIds(n, renderbuffers_safe) || |
| 1511 !GenRenderbuffersHelper(n, renderbuffers_safe)) { | 1511 !GenRenderbuffersHelper(n, renderbuffers_safe)) { |
| 1512 return error::kInvalidArguments; | 1512 return error::kInvalidArguments; |
| 1513 } | 1513 } |
| 1514 return error::kNoError; | 1514 return error::kNoError; |
| 1515 } | 1515 } |
| 1516 | 1516 |
| 1517 error::Error GLES2DecoderImpl::HandleGenSamplersImmediate( | 1517 error::Error GLES2DecoderImpl::HandleGenSamplersImmediate( |
| 1518 uint32_t immediate_data_size, | 1518 uint32_t immediate_data_size, |
| 1519 const volatile void* cmd_data) { | 1519 const volatile void* cmd_data) { |
| 1520 if (!unsafe_es3_apis_enabled()) | 1520 if (!feature_info_->IsWebGL2OrES3Context()) |
| 1521 return error::kUnknownCommand; | 1521 return error::kUnknownCommand; |
| 1522 const volatile gles2::cmds::GenSamplersImmediate& c = | 1522 const volatile gles2::cmds::GenSamplersImmediate& c = |
| 1523 *static_cast<const volatile gles2::cmds::GenSamplersImmediate*>(cmd_data); | 1523 *static_cast<const volatile gles2::cmds::GenSamplersImmediate*>(cmd_data); |
| 1524 GLsizei n = static_cast<GLsizei>(c.n); | 1524 GLsizei n = static_cast<GLsizei>(c.n); |
| 1525 uint32_t data_size; | 1525 uint32_t data_size; |
| 1526 if (!SafeMultiplyUint32(n, sizeof(GLuint), &data_size)) { | 1526 if (!SafeMultiplyUint32(n, sizeof(GLuint), &data_size)) { |
| 1527 return error::kOutOfBounds; | 1527 return error::kOutOfBounds; |
| 1528 } | 1528 } |
| 1529 volatile GLuint* samplers = | 1529 volatile GLuint* samplers = |
| 1530 GetImmediateDataAs<volatile GLuint*>(c, data_size, immediate_data_size); | 1530 GetImmediateDataAs<volatile GLuint*>(c, data_size, immediate_data_size); |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1562 if (!CheckUniqueAndNonNullIds(n, textures_safe) || | 1562 if (!CheckUniqueAndNonNullIds(n, textures_safe) || |
| 1563 !GenTexturesHelper(n, textures_safe)) { | 1563 !GenTexturesHelper(n, textures_safe)) { |
| 1564 return error::kInvalidArguments; | 1564 return error::kInvalidArguments; |
| 1565 } | 1565 } |
| 1566 return error::kNoError; | 1566 return error::kNoError; |
| 1567 } | 1567 } |
| 1568 | 1568 |
| 1569 error::Error GLES2DecoderImpl::HandleGenTransformFeedbacksImmediate( | 1569 error::Error GLES2DecoderImpl::HandleGenTransformFeedbacksImmediate( |
| 1570 uint32_t immediate_data_size, | 1570 uint32_t immediate_data_size, |
| 1571 const volatile void* cmd_data) { | 1571 const volatile void* cmd_data) { |
| 1572 if (!unsafe_es3_apis_enabled()) | 1572 if (!feature_info_->IsWebGL2OrES3Context()) |
| 1573 return error::kUnknownCommand; | 1573 return error::kUnknownCommand; |
| 1574 const volatile gles2::cmds::GenTransformFeedbacksImmediate& c = | 1574 const volatile gles2::cmds::GenTransformFeedbacksImmediate& c = |
| 1575 *static_cast<const volatile gles2::cmds::GenTransformFeedbacksImmediate*>( | 1575 *static_cast<const volatile gles2::cmds::GenTransformFeedbacksImmediate*>( |
| 1576 cmd_data); | 1576 cmd_data); |
| 1577 GLsizei n = static_cast<GLsizei>(c.n); | 1577 GLsizei n = static_cast<GLsizei>(c.n); |
| 1578 uint32_t data_size; | 1578 uint32_t data_size; |
| 1579 if (!SafeMultiplyUint32(n, sizeof(GLuint), &data_size)) { | 1579 if (!SafeMultiplyUint32(n, sizeof(GLuint), &data_size)) { |
| 1580 return error::kOutOfBounds; | 1580 return error::kOutOfBounds; |
| 1581 } | 1581 } |
| 1582 volatile GLuint* ids = | 1582 volatile GLuint* ids = |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1625 GLenum error = LOCAL_PEEK_GL_ERROR("GetBooleanv"); | 1625 GLenum error = LOCAL_PEEK_GL_ERROR("GetBooleanv"); |
| 1626 if (error == GL_NO_ERROR) { | 1626 if (error == GL_NO_ERROR) { |
| 1627 result->SetNumResults(num_values); | 1627 result->SetNumResults(num_values); |
| 1628 } | 1628 } |
| 1629 return error::kNoError; | 1629 return error::kNoError; |
| 1630 } | 1630 } |
| 1631 | 1631 |
| 1632 error::Error GLES2DecoderImpl::HandleGetBufferParameteri64v( | 1632 error::Error GLES2DecoderImpl::HandleGetBufferParameteri64v( |
| 1633 uint32_t immediate_data_size, | 1633 uint32_t immediate_data_size, |
| 1634 const volatile void* cmd_data) { | 1634 const volatile void* cmd_data) { |
| 1635 if (!unsafe_es3_apis_enabled()) | 1635 if (!feature_info_->IsWebGL2OrES3Context()) |
| 1636 return error::kUnknownCommand; | 1636 return error::kUnknownCommand; |
| 1637 const volatile gles2::cmds::GetBufferParameteri64v& c = | 1637 const volatile gles2::cmds::GetBufferParameteri64v& c = |
| 1638 *static_cast<const volatile gles2::cmds::GetBufferParameteri64v*>( | 1638 *static_cast<const volatile gles2::cmds::GetBufferParameteri64v*>( |
| 1639 cmd_data); | 1639 cmd_data); |
| 1640 GLenum target = static_cast<GLenum>(c.target); | 1640 GLenum target = static_cast<GLenum>(c.target); |
| 1641 GLenum pname = static_cast<GLenum>(c.pname); | 1641 GLenum pname = static_cast<GLenum>(c.pname); |
| 1642 typedef cmds::GetBufferParameteri64v::Result Result; | 1642 typedef cmds::GetBufferParameteri64v::Result Result; |
| 1643 GLsizei num_values = 0; | 1643 GLsizei num_values = 0; |
| 1644 if (!GetNumValuesReturnedForGLGet(pname, &num_values)) { | 1644 if (!GetNumValuesReturnedForGLGet(pname, &num_values)) { |
| 1645 LOCAL_SET_GL_ERROR_INVALID_ENUM(":GetBufferParameteri64v", pname, "pname"); | 1645 LOCAL_SET_GL_ERROR_INVALID_ENUM(":GetBufferParameteri64v", pname, "pname"); |
| (...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1799 GLenum error = LOCAL_PEEK_GL_ERROR("GetFramebufferAttachmentParameteriv"); | 1799 GLenum error = LOCAL_PEEK_GL_ERROR("GetFramebufferAttachmentParameteriv"); |
| 1800 if (error == GL_NO_ERROR) { | 1800 if (error == GL_NO_ERROR) { |
| 1801 result->SetNumResults(num_values); | 1801 result->SetNumResults(num_values); |
| 1802 } | 1802 } |
| 1803 return error::kNoError; | 1803 return error::kNoError; |
| 1804 } | 1804 } |
| 1805 | 1805 |
| 1806 error::Error GLES2DecoderImpl::HandleGetInteger64v( | 1806 error::Error GLES2DecoderImpl::HandleGetInteger64v( |
| 1807 uint32_t immediate_data_size, | 1807 uint32_t immediate_data_size, |
| 1808 const volatile void* cmd_data) { | 1808 const volatile void* cmd_data) { |
| 1809 if (!unsafe_es3_apis_enabled()) | 1809 if (!feature_info_->IsWebGL2OrES3Context()) |
| 1810 return error::kUnknownCommand; | 1810 return error::kUnknownCommand; |
| 1811 const volatile gles2::cmds::GetInteger64v& c = | 1811 const volatile gles2::cmds::GetInteger64v& c = |
| 1812 *static_cast<const volatile gles2::cmds::GetInteger64v*>(cmd_data); | 1812 *static_cast<const volatile gles2::cmds::GetInteger64v*>(cmd_data); |
| 1813 GLenum pname = static_cast<GLenum>(c.pname); | 1813 GLenum pname = static_cast<GLenum>(c.pname); |
| 1814 typedef cmds::GetInteger64v::Result Result; | 1814 typedef cmds::GetInteger64v::Result Result; |
| 1815 GLsizei num_values = 0; | 1815 GLsizei num_values = 0; |
| 1816 if (!GetNumValuesReturnedForGLGet(pname, &num_values)) { | 1816 if (!GetNumValuesReturnedForGLGet(pname, &num_values)) { |
| 1817 LOCAL_SET_GL_ERROR_INVALID_ENUM(":GetInteger64v", pname, "pname"); | 1817 LOCAL_SET_GL_ERROR_INVALID_ENUM(":GetInteger64v", pname, "pname"); |
| 1818 return error::kNoError; | 1818 return error::kNoError; |
| 1819 } | 1819 } |
| (...skipping 16 matching lines...) Expand all Loading... |
| 1836 GLenum error = LOCAL_PEEK_GL_ERROR("GetInteger64v"); | 1836 GLenum error = LOCAL_PEEK_GL_ERROR("GetInteger64v"); |
| 1837 if (error == GL_NO_ERROR) { | 1837 if (error == GL_NO_ERROR) { |
| 1838 result->SetNumResults(num_values); | 1838 result->SetNumResults(num_values); |
| 1839 } | 1839 } |
| 1840 return error::kNoError; | 1840 return error::kNoError; |
| 1841 } | 1841 } |
| 1842 | 1842 |
| 1843 error::Error GLES2DecoderImpl::HandleGetIntegeri_v( | 1843 error::Error GLES2DecoderImpl::HandleGetIntegeri_v( |
| 1844 uint32_t immediate_data_size, | 1844 uint32_t immediate_data_size, |
| 1845 const volatile void* cmd_data) { | 1845 const volatile void* cmd_data) { |
| 1846 if (!unsafe_es3_apis_enabled()) | 1846 if (!feature_info_->IsWebGL2OrES3Context()) |
| 1847 return error::kUnknownCommand; | 1847 return error::kUnknownCommand; |
| 1848 const volatile gles2::cmds::GetIntegeri_v& c = | 1848 const volatile gles2::cmds::GetIntegeri_v& c = |
| 1849 *static_cast<const volatile gles2::cmds::GetIntegeri_v*>(cmd_data); | 1849 *static_cast<const volatile gles2::cmds::GetIntegeri_v*>(cmd_data); |
| 1850 GLenum pname = static_cast<GLenum>(c.pname); | 1850 GLenum pname = static_cast<GLenum>(c.pname); |
| 1851 GLuint index = static_cast<GLuint>(c.index); | 1851 GLuint index = static_cast<GLuint>(c.index); |
| 1852 typedef cmds::GetIntegeri_v::Result Result; | 1852 typedef cmds::GetIntegeri_v::Result Result; |
| 1853 GLsizei num_values = 0; | 1853 GLsizei num_values = 0; |
| 1854 if (!GetNumValuesReturnedForGLGet(pname, &num_values)) { | 1854 if (!GetNumValuesReturnedForGLGet(pname, &num_values)) { |
| 1855 LOCAL_SET_GL_ERROR_INVALID_ENUM(":GetIntegeri_v", pname, "pname"); | 1855 LOCAL_SET_GL_ERROR_INVALID_ENUM(":GetIntegeri_v", pname, "pname"); |
| 1856 return error::kNoError; | 1856 return error::kNoError; |
| (...skipping 12 matching lines...) Expand all Loading... |
| 1869 if (result->size != 0) { | 1869 if (result->size != 0) { |
| 1870 return error::kInvalidArguments; | 1870 return error::kInvalidArguments; |
| 1871 } | 1871 } |
| 1872 DoGetIntegeri_v(pname, index, data, num_values); | 1872 DoGetIntegeri_v(pname, index, data, num_values); |
| 1873 result->SetNumResults(num_values); | 1873 result->SetNumResults(num_values); |
| 1874 return error::kNoError; | 1874 return error::kNoError; |
| 1875 } | 1875 } |
| 1876 error::Error GLES2DecoderImpl::HandleGetInteger64i_v( | 1876 error::Error GLES2DecoderImpl::HandleGetInteger64i_v( |
| 1877 uint32_t immediate_data_size, | 1877 uint32_t immediate_data_size, |
| 1878 const volatile void* cmd_data) { | 1878 const volatile void* cmd_data) { |
| 1879 if (!unsafe_es3_apis_enabled()) | 1879 if (!feature_info_->IsWebGL2OrES3Context()) |
| 1880 return error::kUnknownCommand; | 1880 return error::kUnknownCommand; |
| 1881 const volatile gles2::cmds::GetInteger64i_v& c = | 1881 const volatile gles2::cmds::GetInteger64i_v& c = |
| 1882 *static_cast<const volatile gles2::cmds::GetInteger64i_v*>(cmd_data); | 1882 *static_cast<const volatile gles2::cmds::GetInteger64i_v*>(cmd_data); |
| 1883 GLenum pname = static_cast<GLenum>(c.pname); | 1883 GLenum pname = static_cast<GLenum>(c.pname); |
| 1884 GLuint index = static_cast<GLuint>(c.index); | 1884 GLuint index = static_cast<GLuint>(c.index); |
| 1885 typedef cmds::GetInteger64i_v::Result Result; | 1885 typedef cmds::GetInteger64i_v::Result Result; |
| 1886 GLsizei num_values = 0; | 1886 GLsizei num_values = 0; |
| 1887 if (!GetNumValuesReturnedForGLGet(pname, &num_values)) { | 1887 if (!GetNumValuesReturnedForGLGet(pname, &num_values)) { |
| 1888 LOCAL_SET_GL_ERROR_INVALID_ENUM(":GetInteger64i_v", pname, "pname"); | 1888 LOCAL_SET_GL_ERROR_INVALID_ENUM(":GetInteger64i_v", pname, "pname"); |
| 1889 return error::kNoError; | 1889 return error::kNoError; |
| (...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2017 GLenum error = LOCAL_PEEK_GL_ERROR("GetRenderbufferParameteriv"); | 2017 GLenum error = LOCAL_PEEK_GL_ERROR("GetRenderbufferParameteriv"); |
| 2018 if (error == GL_NO_ERROR) { | 2018 if (error == GL_NO_ERROR) { |
| 2019 result->SetNumResults(num_values); | 2019 result->SetNumResults(num_values); |
| 2020 } | 2020 } |
| 2021 return error::kNoError; | 2021 return error::kNoError; |
| 2022 } | 2022 } |
| 2023 | 2023 |
| 2024 error::Error GLES2DecoderImpl::HandleGetSamplerParameterfv( | 2024 error::Error GLES2DecoderImpl::HandleGetSamplerParameterfv( |
| 2025 uint32_t immediate_data_size, | 2025 uint32_t immediate_data_size, |
| 2026 const volatile void* cmd_data) { | 2026 const volatile void* cmd_data) { |
| 2027 if (!unsafe_es3_apis_enabled()) | 2027 if (!feature_info_->IsWebGL2OrES3Context()) |
| 2028 return error::kUnknownCommand; | 2028 return error::kUnknownCommand; |
| 2029 const volatile gles2::cmds::GetSamplerParameterfv& c = | 2029 const volatile gles2::cmds::GetSamplerParameterfv& c = |
| 2030 *static_cast<const volatile gles2::cmds::GetSamplerParameterfv*>( | 2030 *static_cast<const volatile gles2::cmds::GetSamplerParameterfv*>( |
| 2031 cmd_data); | 2031 cmd_data); |
| 2032 GLuint sampler = c.sampler; | 2032 GLuint sampler = c.sampler; |
| 2033 GLenum pname = static_cast<GLenum>(c.pname); | 2033 GLenum pname = static_cast<GLenum>(c.pname); |
| 2034 typedef cmds::GetSamplerParameterfv::Result Result; | 2034 typedef cmds::GetSamplerParameterfv::Result Result; |
| 2035 GLsizei num_values = 0; | 2035 GLsizei num_values = 0; |
| 2036 if (!GetNumValuesReturnedForGLGet(pname, &num_values)) { | 2036 if (!GetNumValuesReturnedForGLGet(pname, &num_values)) { |
| 2037 LOCAL_SET_GL_ERROR_INVALID_ENUM(":GetSamplerParameterfv", pname, "pname"); | 2037 LOCAL_SET_GL_ERROR_INVALID_ENUM(":GetSamplerParameterfv", pname, "pname"); |
| (...skipping 18 matching lines...) Expand all Loading... |
| 2056 GLenum error = LOCAL_PEEK_GL_ERROR("GetSamplerParameterfv"); | 2056 GLenum error = LOCAL_PEEK_GL_ERROR("GetSamplerParameterfv"); |
| 2057 if (error == GL_NO_ERROR) { | 2057 if (error == GL_NO_ERROR) { |
| 2058 result->SetNumResults(num_values); | 2058 result->SetNumResults(num_values); |
| 2059 } | 2059 } |
| 2060 return error::kNoError; | 2060 return error::kNoError; |
| 2061 } | 2061 } |
| 2062 | 2062 |
| 2063 error::Error GLES2DecoderImpl::HandleGetSamplerParameteriv( | 2063 error::Error GLES2DecoderImpl::HandleGetSamplerParameteriv( |
| 2064 uint32_t immediate_data_size, | 2064 uint32_t immediate_data_size, |
| 2065 const volatile void* cmd_data) { | 2065 const volatile void* cmd_data) { |
| 2066 if (!unsafe_es3_apis_enabled()) | 2066 if (!feature_info_->IsWebGL2OrES3Context()) |
| 2067 return error::kUnknownCommand; | 2067 return error::kUnknownCommand; |
| 2068 const volatile gles2::cmds::GetSamplerParameteriv& c = | 2068 const volatile gles2::cmds::GetSamplerParameteriv& c = |
| 2069 *static_cast<const volatile gles2::cmds::GetSamplerParameteriv*>( | 2069 *static_cast<const volatile gles2::cmds::GetSamplerParameteriv*>( |
| 2070 cmd_data); | 2070 cmd_data); |
| 2071 GLuint sampler = c.sampler; | 2071 GLuint sampler = c.sampler; |
| 2072 GLenum pname = static_cast<GLenum>(c.pname); | 2072 GLenum pname = static_cast<GLenum>(c.pname); |
| 2073 typedef cmds::GetSamplerParameteriv::Result Result; | 2073 typedef cmds::GetSamplerParameteriv::Result Result; |
| 2074 GLsizei num_values = 0; | 2074 GLsizei num_values = 0; |
| 2075 if (!GetNumValuesReturnedForGLGet(pname, &num_values)) { | 2075 if (!GetNumValuesReturnedForGLGet(pname, &num_values)) { |
| 2076 LOCAL_SET_GL_ERROR_INVALID_ENUM(":GetSamplerParameteriv", pname, "pname"); | 2076 LOCAL_SET_GL_ERROR_INVALID_ENUM(":GetSamplerParameteriv", pname, "pname"); |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2130 DoGetShaderiv(shader, pname, params, num_values); | 2130 DoGetShaderiv(shader, pname, params, num_values); |
| 2131 GLenum error = LOCAL_PEEK_GL_ERROR("GetShaderiv"); | 2131 GLenum error = LOCAL_PEEK_GL_ERROR("GetShaderiv"); |
| 2132 if (error == GL_NO_ERROR) { | 2132 if (error == GL_NO_ERROR) { |
| 2133 result->SetNumResults(num_values); | 2133 result->SetNumResults(num_values); |
| 2134 } | 2134 } |
| 2135 return error::kNoError; | 2135 return error::kNoError; |
| 2136 } | 2136 } |
| 2137 | 2137 |
| 2138 error::Error GLES2DecoderImpl::HandleGetSynciv(uint32_t immediate_data_size, | 2138 error::Error GLES2DecoderImpl::HandleGetSynciv(uint32_t immediate_data_size, |
| 2139 const volatile void* cmd_data) { | 2139 const volatile void* cmd_data) { |
| 2140 if (!unsafe_es3_apis_enabled()) | 2140 if (!feature_info_->IsWebGL2OrES3Context()) |
| 2141 return error::kUnknownCommand; | 2141 return error::kUnknownCommand; |
| 2142 const volatile gles2::cmds::GetSynciv& c = | 2142 const volatile gles2::cmds::GetSynciv& c = |
| 2143 *static_cast<const volatile gles2::cmds::GetSynciv*>(cmd_data); | 2143 *static_cast<const volatile gles2::cmds::GetSynciv*>(cmd_data); |
| 2144 GLuint sync = static_cast<GLuint>(c.sync); | 2144 GLuint sync = static_cast<GLuint>(c.sync); |
| 2145 GLenum pname = static_cast<GLenum>(c.pname); | 2145 GLenum pname = static_cast<GLenum>(c.pname); |
| 2146 typedef cmds::GetSynciv::Result Result; | 2146 typedef cmds::GetSynciv::Result Result; |
| 2147 GLsizei num_values = 0; | 2147 GLsizei num_values = 0; |
| 2148 if (!GetNumValuesReturnedForGLGet(pname, &num_values)) { | 2148 if (!GetNumValuesReturnedForGLGet(pname, &num_values)) { |
| 2149 LOCAL_SET_GL_ERROR_INVALID_ENUM(":GetSynciv", pname, "pname"); | 2149 LOCAL_SET_GL_ERROR_INVALID_ENUM(":GetSynciv", pname, "pname"); |
| 2150 return error::kNoError; | 2150 return error::kNoError; |
| (...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2325 GLenum error = LOCAL_PEEK_GL_ERROR("GetVertexAttribiv"); | 2325 GLenum error = LOCAL_PEEK_GL_ERROR("GetVertexAttribiv"); |
| 2326 if (error == GL_NO_ERROR) { | 2326 if (error == GL_NO_ERROR) { |
| 2327 result->SetNumResults(num_values); | 2327 result->SetNumResults(num_values); |
| 2328 } | 2328 } |
| 2329 return error::kNoError; | 2329 return error::kNoError; |
| 2330 } | 2330 } |
| 2331 | 2331 |
| 2332 error::Error GLES2DecoderImpl::HandleGetVertexAttribIiv( | 2332 error::Error GLES2DecoderImpl::HandleGetVertexAttribIiv( |
| 2333 uint32_t immediate_data_size, | 2333 uint32_t immediate_data_size, |
| 2334 const volatile void* cmd_data) { | 2334 const volatile void* cmd_data) { |
| 2335 if (!unsafe_es3_apis_enabled()) | 2335 if (!feature_info_->IsWebGL2OrES3Context()) |
| 2336 return error::kUnknownCommand; | 2336 return error::kUnknownCommand; |
| 2337 const volatile gles2::cmds::GetVertexAttribIiv& c = | 2337 const volatile gles2::cmds::GetVertexAttribIiv& c = |
| 2338 *static_cast<const volatile gles2::cmds::GetVertexAttribIiv*>(cmd_data); | 2338 *static_cast<const volatile gles2::cmds::GetVertexAttribIiv*>(cmd_data); |
| 2339 GLuint index = static_cast<GLuint>(c.index); | 2339 GLuint index = static_cast<GLuint>(c.index); |
| 2340 GLenum pname = static_cast<GLenum>(c.pname); | 2340 GLenum pname = static_cast<GLenum>(c.pname); |
| 2341 typedef cmds::GetVertexAttribIiv::Result Result; | 2341 typedef cmds::GetVertexAttribIiv::Result Result; |
| 2342 GLsizei num_values = 0; | 2342 GLsizei num_values = 0; |
| 2343 if (!GetNumValuesReturnedForGLGet(pname, &num_values)) { | 2343 if (!GetNumValuesReturnedForGLGet(pname, &num_values)) { |
| 2344 LOCAL_SET_GL_ERROR_INVALID_ENUM(":GetVertexAttribIiv", pname, "pname"); | 2344 LOCAL_SET_GL_ERROR_INVALID_ENUM(":GetVertexAttribIiv", pname, "pname"); |
| 2345 return error::kNoError; | 2345 return error::kNoError; |
| (...skipping 17 matching lines...) Expand all Loading... |
| 2363 GLenum error = LOCAL_PEEK_GL_ERROR("GetVertexAttribIiv"); | 2363 GLenum error = LOCAL_PEEK_GL_ERROR("GetVertexAttribIiv"); |
| 2364 if (error == GL_NO_ERROR) { | 2364 if (error == GL_NO_ERROR) { |
| 2365 result->SetNumResults(num_values); | 2365 result->SetNumResults(num_values); |
| 2366 } | 2366 } |
| 2367 return error::kNoError; | 2367 return error::kNoError; |
| 2368 } | 2368 } |
| 2369 | 2369 |
| 2370 error::Error GLES2DecoderImpl::HandleGetVertexAttribIuiv( | 2370 error::Error GLES2DecoderImpl::HandleGetVertexAttribIuiv( |
| 2371 uint32_t immediate_data_size, | 2371 uint32_t immediate_data_size, |
| 2372 const volatile void* cmd_data) { | 2372 const volatile void* cmd_data) { |
| 2373 if (!unsafe_es3_apis_enabled()) | 2373 if (!feature_info_->IsWebGL2OrES3Context()) |
| 2374 return error::kUnknownCommand; | 2374 return error::kUnknownCommand; |
| 2375 const volatile gles2::cmds::GetVertexAttribIuiv& c = | 2375 const volatile gles2::cmds::GetVertexAttribIuiv& c = |
| 2376 *static_cast<const volatile gles2::cmds::GetVertexAttribIuiv*>(cmd_data); | 2376 *static_cast<const volatile gles2::cmds::GetVertexAttribIuiv*>(cmd_data); |
| 2377 GLuint index = static_cast<GLuint>(c.index); | 2377 GLuint index = static_cast<GLuint>(c.index); |
| 2378 GLenum pname = static_cast<GLenum>(c.pname); | 2378 GLenum pname = static_cast<GLenum>(c.pname); |
| 2379 typedef cmds::GetVertexAttribIuiv::Result Result; | 2379 typedef cmds::GetVertexAttribIuiv::Result Result; |
| 2380 GLsizei num_values = 0; | 2380 GLsizei num_values = 0; |
| 2381 if (!GetNumValuesReturnedForGLGet(pname, &num_values)) { | 2381 if (!GetNumValuesReturnedForGLGet(pname, &num_values)) { |
| 2382 LOCAL_SET_GL_ERROR_INVALID_ENUM(":GetVertexAttribIuiv", pname, "pname"); | 2382 LOCAL_SET_GL_ERROR_INVALID_ENUM(":GetVertexAttribIuiv", pname, "pname"); |
| 2383 return error::kNoError; | 2383 return error::kNoError; |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2438 break; | 2438 break; |
| 2439 default: | 2439 default: |
| 2440 NOTREACHED(); | 2440 NOTREACHED(); |
| 2441 } | 2441 } |
| 2442 return error::kNoError; | 2442 return error::kNoError; |
| 2443 } | 2443 } |
| 2444 | 2444 |
| 2445 error::Error GLES2DecoderImpl::HandleInvalidateFramebufferImmediate( | 2445 error::Error GLES2DecoderImpl::HandleInvalidateFramebufferImmediate( |
| 2446 uint32_t immediate_data_size, | 2446 uint32_t immediate_data_size, |
| 2447 const volatile void* cmd_data) { | 2447 const volatile void* cmd_data) { |
| 2448 if (!unsafe_es3_apis_enabled()) | 2448 if (!feature_info_->IsWebGL2OrES3Context()) |
| 2449 return error::kUnknownCommand; | 2449 return error::kUnknownCommand; |
| 2450 const volatile gles2::cmds::InvalidateFramebufferImmediate& c = | 2450 const volatile gles2::cmds::InvalidateFramebufferImmediate& c = |
| 2451 *static_cast<const volatile gles2::cmds::InvalidateFramebufferImmediate*>( | 2451 *static_cast<const volatile gles2::cmds::InvalidateFramebufferImmediate*>( |
| 2452 cmd_data); | 2452 cmd_data); |
| 2453 GLenum target = static_cast<GLenum>(c.target); | 2453 GLenum target = static_cast<GLenum>(c.target); |
| 2454 GLsizei count = static_cast<GLsizei>(c.count); | 2454 GLsizei count = static_cast<GLsizei>(c.count); |
| 2455 uint32_t data_size = 0; | 2455 uint32_t data_size = 0; |
| 2456 if (count >= 0 && | 2456 if (count >= 0 && |
| 2457 !GLES2Util::ComputeDataSize(count, sizeof(GLenum), 1, &data_size)) { | 2457 !GLES2Util::ComputeDataSize(count, sizeof(GLenum), 1, &data_size)) { |
| 2458 return error::kOutOfBounds; | 2458 return error::kOutOfBounds; |
| (...skipping 17 matching lines...) Expand all Loading... |
| 2476 if (attachments == NULL) { | 2476 if (attachments == NULL) { |
| 2477 return error::kOutOfBounds; | 2477 return error::kOutOfBounds; |
| 2478 } | 2478 } |
| 2479 DoInvalidateFramebuffer(target, count, attachments); | 2479 DoInvalidateFramebuffer(target, count, attachments); |
| 2480 return error::kNoError; | 2480 return error::kNoError; |
| 2481 } | 2481 } |
| 2482 | 2482 |
| 2483 error::Error GLES2DecoderImpl::HandleInvalidateSubFramebufferImmediate( | 2483 error::Error GLES2DecoderImpl::HandleInvalidateSubFramebufferImmediate( |
| 2484 uint32_t immediate_data_size, | 2484 uint32_t immediate_data_size, |
| 2485 const volatile void* cmd_data) { | 2485 const volatile void* cmd_data) { |
| 2486 if (!unsafe_es3_apis_enabled()) | 2486 if (!feature_info_->IsWebGL2OrES3Context()) |
| 2487 return error::kUnknownCommand; | 2487 return error::kUnknownCommand; |
| 2488 const volatile gles2::cmds::InvalidateSubFramebufferImmediate& c = | 2488 const volatile gles2::cmds::InvalidateSubFramebufferImmediate& c = |
| 2489 *static_cast< | 2489 *static_cast< |
| 2490 const volatile gles2::cmds::InvalidateSubFramebufferImmediate*>( | 2490 const volatile gles2::cmds::InvalidateSubFramebufferImmediate*>( |
| 2491 cmd_data); | 2491 cmd_data); |
| 2492 GLenum target = static_cast<GLenum>(c.target); | 2492 GLenum target = static_cast<GLenum>(c.target); |
| 2493 GLsizei count = static_cast<GLsizei>(c.count); | 2493 GLsizei count = static_cast<GLsizei>(c.count); |
| 2494 uint32_t data_size = 0; | 2494 uint32_t data_size = 0; |
| 2495 if (count >= 0 && | 2495 if (count >= 0 && |
| 2496 !GLES2Util::ComputeDataSize(count, sizeof(GLenum), 1, &data_size)) { | 2496 !GLES2Util::ComputeDataSize(count, sizeof(GLenum), 1, &data_size)) { |
| (...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2609 c.result_shm_id, c.result_shm_offset, sizeof(*result_dst)); | 2609 c.result_shm_id, c.result_shm_offset, sizeof(*result_dst)); |
| 2610 if (!result_dst) { | 2610 if (!result_dst) { |
| 2611 return error::kOutOfBounds; | 2611 return error::kOutOfBounds; |
| 2612 } | 2612 } |
| 2613 *result_dst = DoIsRenderbuffer(renderbuffer); | 2613 *result_dst = DoIsRenderbuffer(renderbuffer); |
| 2614 return error::kNoError; | 2614 return error::kNoError; |
| 2615 } | 2615 } |
| 2616 | 2616 |
| 2617 error::Error GLES2DecoderImpl::HandleIsSampler(uint32_t immediate_data_size, | 2617 error::Error GLES2DecoderImpl::HandleIsSampler(uint32_t immediate_data_size, |
| 2618 const volatile void* cmd_data) { | 2618 const volatile void* cmd_data) { |
| 2619 if (!unsafe_es3_apis_enabled()) | 2619 if (!feature_info_->IsWebGL2OrES3Context()) |
| 2620 return error::kUnknownCommand; | 2620 return error::kUnknownCommand; |
| 2621 const volatile gles2::cmds::IsSampler& c = | 2621 const volatile gles2::cmds::IsSampler& c = |
| 2622 *static_cast<const volatile gles2::cmds::IsSampler*>(cmd_data); | 2622 *static_cast<const volatile gles2::cmds::IsSampler*>(cmd_data); |
| 2623 GLuint sampler = c.sampler; | 2623 GLuint sampler = c.sampler; |
| 2624 typedef cmds::IsSampler::Result Result; | 2624 typedef cmds::IsSampler::Result Result; |
| 2625 Result* result_dst = GetSharedMemoryAs<Result*>( | 2625 Result* result_dst = GetSharedMemoryAs<Result*>( |
| 2626 c.result_shm_id, c.result_shm_offset, sizeof(*result_dst)); | 2626 c.result_shm_id, c.result_shm_offset, sizeof(*result_dst)); |
| 2627 if (!result_dst) { | 2627 if (!result_dst) { |
| 2628 return error::kOutOfBounds; | 2628 return error::kOutOfBounds; |
| 2629 } | 2629 } |
| (...skipping 11 matching lines...) Expand all Loading... |
| 2641 c.result_shm_id, c.result_shm_offset, sizeof(*result_dst)); | 2641 c.result_shm_id, c.result_shm_offset, sizeof(*result_dst)); |
| 2642 if (!result_dst) { | 2642 if (!result_dst) { |
| 2643 return error::kOutOfBounds; | 2643 return error::kOutOfBounds; |
| 2644 } | 2644 } |
| 2645 *result_dst = DoIsShader(shader); | 2645 *result_dst = DoIsShader(shader); |
| 2646 return error::kNoError; | 2646 return error::kNoError; |
| 2647 } | 2647 } |
| 2648 | 2648 |
| 2649 error::Error GLES2DecoderImpl::HandleIsSync(uint32_t immediate_data_size, | 2649 error::Error GLES2DecoderImpl::HandleIsSync(uint32_t immediate_data_size, |
| 2650 const volatile void* cmd_data) { | 2650 const volatile void* cmd_data) { |
| 2651 if (!unsafe_es3_apis_enabled()) | 2651 if (!feature_info_->IsWebGL2OrES3Context()) |
| 2652 return error::kUnknownCommand; | 2652 return error::kUnknownCommand; |
| 2653 const volatile gles2::cmds::IsSync& c = | 2653 const volatile gles2::cmds::IsSync& c = |
| 2654 *static_cast<const volatile gles2::cmds::IsSync*>(cmd_data); | 2654 *static_cast<const volatile gles2::cmds::IsSync*>(cmd_data); |
| 2655 GLuint sync = c.sync; | 2655 GLuint sync = c.sync; |
| 2656 typedef cmds::IsSync::Result Result; | 2656 typedef cmds::IsSync::Result Result; |
| 2657 Result* result_dst = GetSharedMemoryAs<Result*>( | 2657 Result* result_dst = GetSharedMemoryAs<Result*>( |
| 2658 c.result_shm_id, c.result_shm_offset, sizeof(*result_dst)); | 2658 c.result_shm_id, c.result_shm_offset, sizeof(*result_dst)); |
| 2659 if (!result_dst) { | 2659 if (!result_dst) { |
| 2660 return error::kOutOfBounds; | 2660 return error::kOutOfBounds; |
| 2661 } | 2661 } |
| (...skipping 12 matching lines...) Expand all Loading... |
| 2674 if (!result_dst) { | 2674 if (!result_dst) { |
| 2675 return error::kOutOfBounds; | 2675 return error::kOutOfBounds; |
| 2676 } | 2676 } |
| 2677 *result_dst = DoIsTexture(texture); | 2677 *result_dst = DoIsTexture(texture); |
| 2678 return error::kNoError; | 2678 return error::kNoError; |
| 2679 } | 2679 } |
| 2680 | 2680 |
| 2681 error::Error GLES2DecoderImpl::HandleIsTransformFeedback( | 2681 error::Error GLES2DecoderImpl::HandleIsTransformFeedback( |
| 2682 uint32_t immediate_data_size, | 2682 uint32_t immediate_data_size, |
| 2683 const volatile void* cmd_data) { | 2683 const volatile void* cmd_data) { |
| 2684 if (!unsafe_es3_apis_enabled()) | 2684 if (!feature_info_->IsWebGL2OrES3Context()) |
| 2685 return error::kUnknownCommand; | 2685 return error::kUnknownCommand; |
| 2686 const volatile gles2::cmds::IsTransformFeedback& c = | 2686 const volatile gles2::cmds::IsTransformFeedback& c = |
| 2687 *static_cast<const volatile gles2::cmds::IsTransformFeedback*>(cmd_data); | 2687 *static_cast<const volatile gles2::cmds::IsTransformFeedback*>(cmd_data); |
| 2688 GLuint transformfeedback = c.transformfeedback; | 2688 GLuint transformfeedback = c.transformfeedback; |
| 2689 typedef cmds::IsTransformFeedback::Result Result; | 2689 typedef cmds::IsTransformFeedback::Result Result; |
| 2690 Result* result_dst = GetSharedMemoryAs<Result*>( | 2690 Result* result_dst = GetSharedMemoryAs<Result*>( |
| 2691 c.result_shm_id, c.result_shm_offset, sizeof(*result_dst)); | 2691 c.result_shm_id, c.result_shm_offset, sizeof(*result_dst)); |
| 2692 if (!result_dst) { | 2692 if (!result_dst) { |
| 2693 return error::kOutOfBounds; | 2693 return error::kOutOfBounds; |
| 2694 } | 2694 } |
| (...skipping 23 matching lines...) Expand all Loading... |
| 2718 const volatile gles2::cmds::LinkProgram& c = | 2718 const volatile gles2::cmds::LinkProgram& c = |
| 2719 *static_cast<const volatile gles2::cmds::LinkProgram*>(cmd_data); | 2719 *static_cast<const volatile gles2::cmds::LinkProgram*>(cmd_data); |
| 2720 GLuint program = c.program; | 2720 GLuint program = c.program; |
| 2721 DoLinkProgram(program); | 2721 DoLinkProgram(program); |
| 2722 return error::kNoError; | 2722 return error::kNoError; |
| 2723 } | 2723 } |
| 2724 | 2724 |
| 2725 error::Error GLES2DecoderImpl::HandlePauseTransformFeedback( | 2725 error::Error GLES2DecoderImpl::HandlePauseTransformFeedback( |
| 2726 uint32_t immediate_data_size, | 2726 uint32_t immediate_data_size, |
| 2727 const volatile void* cmd_data) { | 2727 const volatile void* cmd_data) { |
| 2728 if (!unsafe_es3_apis_enabled()) | 2728 if (!feature_info_->IsWebGL2OrES3Context()) |
| 2729 return error::kUnknownCommand; | 2729 return error::kUnknownCommand; |
| 2730 DoPauseTransformFeedback(); | 2730 DoPauseTransformFeedback(); |
| 2731 return error::kNoError; | 2731 return error::kNoError; |
| 2732 } | 2732 } |
| 2733 | 2733 |
| 2734 error::Error GLES2DecoderImpl::HandlePolygonOffset( | 2734 error::Error GLES2DecoderImpl::HandlePolygonOffset( |
| 2735 uint32_t immediate_data_size, | 2735 uint32_t immediate_data_size, |
| 2736 const volatile void* cmd_data) { | 2736 const volatile void* cmd_data) { |
| 2737 const volatile gles2::cmds::PolygonOffset& c = | 2737 const volatile gles2::cmds::PolygonOffset& c = |
| 2738 *static_cast<const volatile gles2::cmds::PolygonOffset*>(cmd_data); | 2738 *static_cast<const volatile gles2::cmds::PolygonOffset*>(cmd_data); |
| 2739 GLfloat factor = static_cast<GLfloat>(c.factor); | 2739 GLfloat factor = static_cast<GLfloat>(c.factor); |
| 2740 GLfloat units = static_cast<GLfloat>(c.units); | 2740 GLfloat units = static_cast<GLfloat>(c.units); |
| 2741 if (state_.polygon_offset_factor != factor || | 2741 if (state_.polygon_offset_factor != factor || |
| 2742 state_.polygon_offset_units != units) { | 2742 state_.polygon_offset_units != units) { |
| 2743 state_.polygon_offset_factor = factor; | 2743 state_.polygon_offset_factor = factor; |
| 2744 state_.polygon_offset_units = units; | 2744 state_.polygon_offset_units = units; |
| 2745 glPolygonOffset(factor, units); | 2745 glPolygonOffset(factor, units); |
| 2746 } | 2746 } |
| 2747 return error::kNoError; | 2747 return error::kNoError; |
| 2748 } | 2748 } |
| 2749 | 2749 |
| 2750 error::Error GLES2DecoderImpl::HandleReadBuffer(uint32_t immediate_data_size, | 2750 error::Error GLES2DecoderImpl::HandleReadBuffer(uint32_t immediate_data_size, |
| 2751 const volatile void* cmd_data) { | 2751 const volatile void* cmd_data) { |
| 2752 if (!unsafe_es3_apis_enabled()) | 2752 if (!feature_info_->IsWebGL2OrES3Context()) |
| 2753 return error::kUnknownCommand; | 2753 return error::kUnknownCommand; |
| 2754 const volatile gles2::cmds::ReadBuffer& c = | 2754 const volatile gles2::cmds::ReadBuffer& c = |
| 2755 *static_cast<const volatile gles2::cmds::ReadBuffer*>(cmd_data); | 2755 *static_cast<const volatile gles2::cmds::ReadBuffer*>(cmd_data); |
| 2756 GLenum src = static_cast<GLenum>(c.src); | 2756 GLenum src = static_cast<GLenum>(c.src); |
| 2757 if (!validators_->read_buffer.IsValid(src)) { | 2757 if (!validators_->read_buffer.IsValid(src)) { |
| 2758 LOCAL_SET_GL_ERROR_INVALID_ENUM("glReadBuffer", src, "src"); | 2758 LOCAL_SET_GL_ERROR_INVALID_ENUM("glReadBuffer", src, "src"); |
| 2759 return error::kNoError; | 2759 return error::kNoError; |
| 2760 } | 2760 } |
| 2761 DoReadBuffer(src); | 2761 DoReadBuffer(src); |
| 2762 return error::kNoError; | 2762 return error::kNoError; |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2795 LOCAL_SET_GL_ERROR(GL_INVALID_VALUE, "glRenderbufferStorage", "height < 0"); | 2795 LOCAL_SET_GL_ERROR(GL_INVALID_VALUE, "glRenderbufferStorage", "height < 0"); |
| 2796 return error::kNoError; | 2796 return error::kNoError; |
| 2797 } | 2797 } |
| 2798 DoRenderbufferStorage(target, internalformat, width, height); | 2798 DoRenderbufferStorage(target, internalformat, width, height); |
| 2799 return error::kNoError; | 2799 return error::kNoError; |
| 2800 } | 2800 } |
| 2801 | 2801 |
| 2802 error::Error GLES2DecoderImpl::HandleResumeTransformFeedback( | 2802 error::Error GLES2DecoderImpl::HandleResumeTransformFeedback( |
| 2803 uint32_t immediate_data_size, | 2803 uint32_t immediate_data_size, |
| 2804 const volatile void* cmd_data) { | 2804 const volatile void* cmd_data) { |
| 2805 if (!unsafe_es3_apis_enabled()) | 2805 if (!feature_info_->IsWebGL2OrES3Context()) |
| 2806 return error::kUnknownCommand; | 2806 return error::kUnknownCommand; |
| 2807 DoResumeTransformFeedback(); | 2807 DoResumeTransformFeedback(); |
| 2808 return error::kNoError; | 2808 return error::kNoError; |
| 2809 } | 2809 } |
| 2810 | 2810 |
| 2811 error::Error GLES2DecoderImpl::HandleSampleCoverage( | 2811 error::Error GLES2DecoderImpl::HandleSampleCoverage( |
| 2812 uint32_t immediate_data_size, | 2812 uint32_t immediate_data_size, |
| 2813 const volatile void* cmd_data) { | 2813 const volatile void* cmd_data) { |
| 2814 const volatile gles2::cmds::SampleCoverage& c = | 2814 const volatile gles2::cmds::SampleCoverage& c = |
| 2815 *static_cast<const volatile gles2::cmds::SampleCoverage*>(cmd_data); | 2815 *static_cast<const volatile gles2::cmds::SampleCoverage*>(cmd_data); |
| 2816 GLclampf value = static_cast<GLclampf>(c.value); | 2816 GLclampf value = static_cast<GLclampf>(c.value); |
| 2817 GLboolean invert = static_cast<GLboolean>(c.invert); | 2817 GLboolean invert = static_cast<GLboolean>(c.invert); |
| 2818 DoSampleCoverage(value, invert); | 2818 DoSampleCoverage(value, invert); |
| 2819 return error::kNoError; | 2819 return error::kNoError; |
| 2820 } | 2820 } |
| 2821 | 2821 |
| 2822 error::Error GLES2DecoderImpl::HandleSamplerParameterf( | 2822 error::Error GLES2DecoderImpl::HandleSamplerParameterf( |
| 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 (!feature_info_->IsWebGL2OrES3Context()) |
| 2826 return error::kUnknownCommand; | 2826 return error::kUnknownCommand; |
| 2827 const volatile gles2::cmds::SamplerParameterf& c = | 2827 const volatile gles2::cmds::SamplerParameterf& c = |
| 2828 *static_cast<const volatile gles2::cmds::SamplerParameterf*>(cmd_data); | 2828 *static_cast<const volatile gles2::cmds::SamplerParameterf*>(cmd_data); |
| 2829 GLuint sampler = c.sampler; | 2829 GLuint sampler = c.sampler; |
| 2830 GLenum pname = static_cast<GLenum>(c.pname); | 2830 GLenum pname = static_cast<GLenum>(c.pname); |
| 2831 GLfloat param = static_cast<GLfloat>(c.param); | 2831 GLfloat param = static_cast<GLfloat>(c.param); |
| 2832 if (!validators_->sampler_parameter.IsValid(pname)) { | 2832 if (!validators_->sampler_parameter.IsValid(pname)) { |
| 2833 LOCAL_SET_GL_ERROR_INVALID_ENUM("glSamplerParameterf", pname, "pname"); | 2833 LOCAL_SET_GL_ERROR_INVALID_ENUM("glSamplerParameterf", pname, "pname"); |
| 2834 return error::kNoError; | 2834 return error::kNoError; |
| 2835 } | 2835 } |
| 2836 DoSamplerParameterf(sampler, pname, param); | 2836 DoSamplerParameterf(sampler, pname, param); |
| 2837 return error::kNoError; | 2837 return error::kNoError; |
| 2838 } | 2838 } |
| 2839 | 2839 |
| 2840 error::Error GLES2DecoderImpl::HandleSamplerParameterfvImmediate( | 2840 error::Error GLES2DecoderImpl::HandleSamplerParameterfvImmediate( |
| 2841 uint32_t immediate_data_size, | 2841 uint32_t immediate_data_size, |
| 2842 const volatile void* cmd_data) { | 2842 const volatile void* cmd_data) { |
| 2843 if (!unsafe_es3_apis_enabled()) | 2843 if (!feature_info_->IsWebGL2OrES3Context()) |
| 2844 return error::kUnknownCommand; | 2844 return error::kUnknownCommand; |
| 2845 const volatile gles2::cmds::SamplerParameterfvImmediate& c = | 2845 const volatile gles2::cmds::SamplerParameterfvImmediate& c = |
| 2846 *static_cast<const volatile gles2::cmds::SamplerParameterfvImmediate*>( | 2846 *static_cast<const volatile gles2::cmds::SamplerParameterfvImmediate*>( |
| 2847 cmd_data); | 2847 cmd_data); |
| 2848 GLuint sampler = c.sampler; | 2848 GLuint sampler = c.sampler; |
| 2849 GLenum pname = static_cast<GLenum>(c.pname); | 2849 GLenum pname = static_cast<GLenum>(c.pname); |
| 2850 uint32_t data_size; | 2850 uint32_t data_size; |
| 2851 if (!GLES2Util::ComputeDataSize(1, sizeof(GLfloat), 1, &data_size)) { | 2851 if (!GLES2Util::ComputeDataSize(1, sizeof(GLfloat), 1, &data_size)) { |
| 2852 return error::kOutOfBounds; | 2852 return error::kOutOfBounds; |
| 2853 } | 2853 } |
| 2854 if (data_size > immediate_data_size) { | 2854 if (data_size > immediate_data_size) { |
| 2855 return error::kOutOfBounds; | 2855 return error::kOutOfBounds; |
| 2856 } | 2856 } |
| 2857 volatile const GLfloat* params = GetImmediateDataAs<volatile const GLfloat*>( | 2857 volatile const GLfloat* params = GetImmediateDataAs<volatile const GLfloat*>( |
| 2858 c, data_size, immediate_data_size); | 2858 c, data_size, immediate_data_size); |
| 2859 if (!validators_->sampler_parameter.IsValid(pname)) { | 2859 if (!validators_->sampler_parameter.IsValid(pname)) { |
| 2860 LOCAL_SET_GL_ERROR_INVALID_ENUM("glSamplerParameterfv", pname, "pname"); | 2860 LOCAL_SET_GL_ERROR_INVALID_ENUM("glSamplerParameterfv", pname, "pname"); |
| 2861 return error::kNoError; | 2861 return error::kNoError; |
| 2862 } | 2862 } |
| 2863 if (params == NULL) { | 2863 if (params == NULL) { |
| 2864 return error::kOutOfBounds; | 2864 return error::kOutOfBounds; |
| 2865 } | 2865 } |
| 2866 DoSamplerParameterfv(sampler, pname, params); | 2866 DoSamplerParameterfv(sampler, pname, params); |
| 2867 return error::kNoError; | 2867 return error::kNoError; |
| 2868 } | 2868 } |
| 2869 | 2869 |
| 2870 error::Error GLES2DecoderImpl::HandleSamplerParameteri( | 2870 error::Error GLES2DecoderImpl::HandleSamplerParameteri( |
| 2871 uint32_t immediate_data_size, | 2871 uint32_t immediate_data_size, |
| 2872 const volatile void* cmd_data) { | 2872 const volatile void* cmd_data) { |
| 2873 if (!unsafe_es3_apis_enabled()) | 2873 if (!feature_info_->IsWebGL2OrES3Context()) |
| 2874 return error::kUnknownCommand; | 2874 return error::kUnknownCommand; |
| 2875 const volatile gles2::cmds::SamplerParameteri& c = | 2875 const volatile gles2::cmds::SamplerParameteri& c = |
| 2876 *static_cast<const volatile gles2::cmds::SamplerParameteri*>(cmd_data); | 2876 *static_cast<const volatile gles2::cmds::SamplerParameteri*>(cmd_data); |
| 2877 GLuint sampler = c.sampler; | 2877 GLuint sampler = c.sampler; |
| 2878 GLenum pname = static_cast<GLenum>(c.pname); | 2878 GLenum pname = static_cast<GLenum>(c.pname); |
| 2879 GLint param = static_cast<GLint>(c.param); | 2879 GLint param = static_cast<GLint>(c.param); |
| 2880 if (!validators_->sampler_parameter.IsValid(pname)) { | 2880 if (!validators_->sampler_parameter.IsValid(pname)) { |
| 2881 LOCAL_SET_GL_ERROR_INVALID_ENUM("glSamplerParameteri", pname, "pname"); | 2881 LOCAL_SET_GL_ERROR_INVALID_ENUM("glSamplerParameteri", pname, "pname"); |
| 2882 return error::kNoError; | 2882 return error::kNoError; |
| 2883 } | 2883 } |
| 2884 DoSamplerParameteri(sampler, pname, param); | 2884 DoSamplerParameteri(sampler, pname, param); |
| 2885 return error::kNoError; | 2885 return error::kNoError; |
| 2886 } | 2886 } |
| 2887 | 2887 |
| 2888 error::Error GLES2DecoderImpl::HandleSamplerParameterivImmediate( | 2888 error::Error GLES2DecoderImpl::HandleSamplerParameterivImmediate( |
| 2889 uint32_t immediate_data_size, | 2889 uint32_t immediate_data_size, |
| 2890 const volatile void* cmd_data) { | 2890 const volatile void* cmd_data) { |
| 2891 if (!unsafe_es3_apis_enabled()) | 2891 if (!feature_info_->IsWebGL2OrES3Context()) |
| 2892 return error::kUnknownCommand; | 2892 return error::kUnknownCommand; |
| 2893 const volatile gles2::cmds::SamplerParameterivImmediate& c = | 2893 const volatile gles2::cmds::SamplerParameterivImmediate& c = |
| 2894 *static_cast<const volatile gles2::cmds::SamplerParameterivImmediate*>( | 2894 *static_cast<const volatile gles2::cmds::SamplerParameterivImmediate*>( |
| 2895 cmd_data); | 2895 cmd_data); |
| 2896 GLuint sampler = c.sampler; | 2896 GLuint sampler = c.sampler; |
| 2897 GLenum pname = static_cast<GLenum>(c.pname); | 2897 GLenum pname = static_cast<GLenum>(c.pname); |
| 2898 uint32_t data_size; | 2898 uint32_t data_size; |
| 2899 if (!GLES2Util::ComputeDataSize(1, sizeof(GLint), 1, &data_size)) { | 2899 if (!GLES2Util::ComputeDataSize(1, sizeof(GLint), 1, &data_size)) { |
| 2900 return error::kOutOfBounds; | 2900 return error::kOutOfBounds; |
| 2901 } | 2901 } |
| (...skipping 369 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3271 if (params == NULL) { | 3271 if (params == NULL) { |
| 3272 return error::kOutOfBounds; | 3272 return error::kOutOfBounds; |
| 3273 } | 3273 } |
| 3274 DoTexParameteriv(target, pname, params); | 3274 DoTexParameteriv(target, pname, params); |
| 3275 return error::kNoError; | 3275 return error::kNoError; |
| 3276 } | 3276 } |
| 3277 | 3277 |
| 3278 error::Error GLES2DecoderImpl::HandleTexStorage3D( | 3278 error::Error GLES2DecoderImpl::HandleTexStorage3D( |
| 3279 uint32_t immediate_data_size, | 3279 uint32_t immediate_data_size, |
| 3280 const volatile void* cmd_data) { | 3280 const volatile void* cmd_data) { |
| 3281 if (!unsafe_es3_apis_enabled()) | 3281 if (!feature_info_->IsWebGL2OrES3Context()) |
| 3282 return error::kUnknownCommand; | 3282 return error::kUnknownCommand; |
| 3283 const volatile gles2::cmds::TexStorage3D& c = | 3283 const volatile gles2::cmds::TexStorage3D& c = |
| 3284 *static_cast<const volatile gles2::cmds::TexStorage3D*>(cmd_data); | 3284 *static_cast<const volatile gles2::cmds::TexStorage3D*>(cmd_data); |
| 3285 GLenum target = static_cast<GLenum>(c.target); | 3285 GLenum target = static_cast<GLenum>(c.target); |
| 3286 GLsizei levels = static_cast<GLsizei>(c.levels); | 3286 GLsizei levels = static_cast<GLsizei>(c.levels); |
| 3287 GLenum internalFormat = static_cast<GLenum>(c.internalFormat); | 3287 GLenum internalFormat = static_cast<GLenum>(c.internalFormat); |
| 3288 GLsizei width = static_cast<GLsizei>(c.width); | 3288 GLsizei width = static_cast<GLsizei>(c.width); |
| 3289 GLsizei height = static_cast<GLsizei>(c.height); | 3289 GLsizei height = static_cast<GLsizei>(c.height); |
| 3290 GLsizei depth = static_cast<GLsizei>(c.depth); | 3290 GLsizei depth = static_cast<GLsizei>(c.depth); |
| 3291 if (!validators_->texture_3_d_target.IsValid(target)) { | 3291 if (!validators_->texture_3_d_target.IsValid(target)) { |
| (...skipping 21 matching lines...) Expand all Loading... |
| 3313 LOCAL_SET_GL_ERROR(GL_INVALID_VALUE, "glTexStorage3D", "depth < 0"); | 3313 LOCAL_SET_GL_ERROR(GL_INVALID_VALUE, "glTexStorage3D", "depth < 0"); |
| 3314 return error::kNoError; | 3314 return error::kNoError; |
| 3315 } | 3315 } |
| 3316 DoTexStorage3D(target, levels, internalFormat, width, height, depth); | 3316 DoTexStorage3D(target, levels, internalFormat, width, height, depth); |
| 3317 return error::kNoError; | 3317 return error::kNoError; |
| 3318 } | 3318 } |
| 3319 | 3319 |
| 3320 error::Error GLES2DecoderImpl::HandleTransformFeedbackVaryingsBucket( | 3320 error::Error GLES2DecoderImpl::HandleTransformFeedbackVaryingsBucket( |
| 3321 uint32_t immediate_data_size, | 3321 uint32_t immediate_data_size, |
| 3322 const volatile void* cmd_data) { | 3322 const volatile void* cmd_data) { |
| 3323 if (!unsafe_es3_apis_enabled()) | 3323 if (!feature_info_->IsWebGL2OrES3Context()) |
| 3324 return error::kUnknownCommand; | 3324 return error::kUnknownCommand; |
| 3325 const volatile gles2::cmds::TransformFeedbackVaryingsBucket& c = *static_cast< | 3325 const volatile gles2::cmds::TransformFeedbackVaryingsBucket& c = *static_cast< |
| 3326 const volatile gles2::cmds::TransformFeedbackVaryingsBucket*>(cmd_data); | 3326 const volatile gles2::cmds::TransformFeedbackVaryingsBucket*>(cmd_data); |
| 3327 GLuint program = static_cast<GLuint>(c.program); | 3327 GLuint program = static_cast<GLuint>(c.program); |
| 3328 | 3328 |
| 3329 Bucket* bucket = GetBucket(c.varyings_bucket_id); | 3329 Bucket* bucket = GetBucket(c.varyings_bucket_id); |
| 3330 if (!bucket) { | 3330 if (!bucket) { |
| 3331 return error::kInvalidArguments; | 3331 return error::kInvalidArguments; |
| 3332 } | 3332 } |
| 3333 GLsizei count = 0; | 3333 GLsizei count = 0; |
| (...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3425 } | 3425 } |
| 3426 if (v == NULL) { | 3426 if (v == NULL) { |
| 3427 return error::kOutOfBounds; | 3427 return error::kOutOfBounds; |
| 3428 } | 3428 } |
| 3429 DoUniform1iv(location, count, v); | 3429 DoUniform1iv(location, count, v); |
| 3430 return error::kNoError; | 3430 return error::kNoError; |
| 3431 } | 3431 } |
| 3432 | 3432 |
| 3433 error::Error GLES2DecoderImpl::HandleUniform1ui(uint32_t immediate_data_size, | 3433 error::Error GLES2DecoderImpl::HandleUniform1ui(uint32_t immediate_data_size, |
| 3434 const volatile void* cmd_data) { | 3434 const volatile void* cmd_data) { |
| 3435 if (!unsafe_es3_apis_enabled()) | 3435 if (!feature_info_->IsWebGL2OrES3Context()) |
| 3436 return error::kUnknownCommand; | 3436 return error::kUnknownCommand; |
| 3437 const volatile gles2::cmds::Uniform1ui& c = | 3437 const volatile gles2::cmds::Uniform1ui& c = |
| 3438 *static_cast<const volatile gles2::cmds::Uniform1ui*>(cmd_data); | 3438 *static_cast<const volatile gles2::cmds::Uniform1ui*>(cmd_data); |
| 3439 GLint location = static_cast<GLint>(c.location); | 3439 GLint location = static_cast<GLint>(c.location); |
| 3440 GLuint x = static_cast<GLuint>(c.x); | 3440 GLuint x = static_cast<GLuint>(c.x); |
| 3441 GLuint temp[1] = { | 3441 GLuint temp[1] = { |
| 3442 x, | 3442 x, |
| 3443 }; | 3443 }; |
| 3444 DoUniform1uiv(location, 1, &temp[0]); | 3444 DoUniform1uiv(location, 1, &temp[0]); |
| 3445 return error::kNoError; | 3445 return error::kNoError; |
| 3446 } | 3446 } |
| 3447 | 3447 |
| 3448 error::Error GLES2DecoderImpl::HandleUniform1uivImmediate( | 3448 error::Error GLES2DecoderImpl::HandleUniform1uivImmediate( |
| 3449 uint32_t immediate_data_size, | 3449 uint32_t immediate_data_size, |
| 3450 const volatile void* cmd_data) { | 3450 const volatile void* cmd_data) { |
| 3451 if (!unsafe_es3_apis_enabled()) | 3451 if (!feature_info_->IsWebGL2OrES3Context()) |
| 3452 return error::kUnknownCommand; | 3452 return error::kUnknownCommand; |
| 3453 const volatile gles2::cmds::Uniform1uivImmediate& c = | 3453 const volatile gles2::cmds::Uniform1uivImmediate& c = |
| 3454 *static_cast<const volatile gles2::cmds::Uniform1uivImmediate*>(cmd_data); | 3454 *static_cast<const volatile gles2::cmds::Uniform1uivImmediate*>(cmd_data); |
| 3455 GLint location = static_cast<GLint>(c.location); | 3455 GLint location = static_cast<GLint>(c.location); |
| 3456 GLsizei count = static_cast<GLsizei>(c.count); | 3456 GLsizei count = static_cast<GLsizei>(c.count); |
| 3457 uint32_t data_size = 0; | 3457 uint32_t data_size = 0; |
| 3458 if (count >= 0 && | 3458 if (count >= 0 && |
| 3459 !GLES2Util::ComputeDataSize(count, sizeof(GLuint), 1, &data_size)) { | 3459 !GLES2Util::ComputeDataSize(count, sizeof(GLuint), 1, &data_size)) { |
| 3460 return error::kOutOfBounds; | 3460 return error::kOutOfBounds; |
| 3461 } | 3461 } |
| (...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3554 } | 3554 } |
| 3555 if (v == NULL) { | 3555 if (v == NULL) { |
| 3556 return error::kOutOfBounds; | 3556 return error::kOutOfBounds; |
| 3557 } | 3557 } |
| 3558 DoUniform2iv(location, count, v); | 3558 DoUniform2iv(location, count, v); |
| 3559 return error::kNoError; | 3559 return error::kNoError; |
| 3560 } | 3560 } |
| 3561 | 3561 |
| 3562 error::Error GLES2DecoderImpl::HandleUniform2ui(uint32_t immediate_data_size, | 3562 error::Error GLES2DecoderImpl::HandleUniform2ui(uint32_t immediate_data_size, |
| 3563 const volatile void* cmd_data) { | 3563 const volatile void* cmd_data) { |
| 3564 if (!unsafe_es3_apis_enabled()) | 3564 if (!feature_info_->IsWebGL2OrES3Context()) |
| 3565 return error::kUnknownCommand; | 3565 return error::kUnknownCommand; |
| 3566 const volatile gles2::cmds::Uniform2ui& c = | 3566 const volatile gles2::cmds::Uniform2ui& c = |
| 3567 *static_cast<const volatile gles2::cmds::Uniform2ui*>(cmd_data); | 3567 *static_cast<const volatile gles2::cmds::Uniform2ui*>(cmd_data); |
| 3568 GLint location = static_cast<GLint>(c.location); | 3568 GLint location = static_cast<GLint>(c.location); |
| 3569 GLuint x = static_cast<GLuint>(c.x); | 3569 GLuint x = static_cast<GLuint>(c.x); |
| 3570 GLuint y = static_cast<GLuint>(c.y); | 3570 GLuint y = static_cast<GLuint>(c.y); |
| 3571 GLuint temp[2] = { | 3571 GLuint temp[2] = { |
| 3572 x, y, | 3572 x, y, |
| 3573 }; | 3573 }; |
| 3574 DoUniform2uiv(location, 1, &temp[0]); | 3574 DoUniform2uiv(location, 1, &temp[0]); |
| 3575 return error::kNoError; | 3575 return error::kNoError; |
| 3576 } | 3576 } |
| 3577 | 3577 |
| 3578 error::Error GLES2DecoderImpl::HandleUniform2uivImmediate( | 3578 error::Error GLES2DecoderImpl::HandleUniform2uivImmediate( |
| 3579 uint32_t immediate_data_size, | 3579 uint32_t immediate_data_size, |
| 3580 const volatile void* cmd_data) { | 3580 const volatile void* cmd_data) { |
| 3581 if (!unsafe_es3_apis_enabled()) | 3581 if (!feature_info_->IsWebGL2OrES3Context()) |
| 3582 return error::kUnknownCommand; | 3582 return error::kUnknownCommand; |
| 3583 const volatile gles2::cmds::Uniform2uivImmediate& c = | 3583 const volatile gles2::cmds::Uniform2uivImmediate& c = |
| 3584 *static_cast<const volatile gles2::cmds::Uniform2uivImmediate*>(cmd_data); | 3584 *static_cast<const volatile gles2::cmds::Uniform2uivImmediate*>(cmd_data); |
| 3585 GLint location = static_cast<GLint>(c.location); | 3585 GLint location = static_cast<GLint>(c.location); |
| 3586 GLsizei count = static_cast<GLsizei>(c.count); | 3586 GLsizei count = static_cast<GLsizei>(c.count); |
| 3587 uint32_t data_size = 0; | 3587 uint32_t data_size = 0; |
| 3588 if (count >= 0 && | 3588 if (count >= 0 && |
| 3589 !GLES2Util::ComputeDataSize(count, sizeof(GLuint), 2, &data_size)) { | 3589 !GLES2Util::ComputeDataSize(count, sizeof(GLuint), 2, &data_size)) { |
| 3590 return error::kOutOfBounds; | 3590 return error::kOutOfBounds; |
| 3591 } | 3591 } |
| (...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3686 } | 3686 } |
| 3687 if (v == NULL) { | 3687 if (v == NULL) { |
| 3688 return error::kOutOfBounds; | 3688 return error::kOutOfBounds; |
| 3689 } | 3689 } |
| 3690 DoUniform3iv(location, count, v); | 3690 DoUniform3iv(location, count, v); |
| 3691 return error::kNoError; | 3691 return error::kNoError; |
| 3692 } | 3692 } |
| 3693 | 3693 |
| 3694 error::Error GLES2DecoderImpl::HandleUniform3ui(uint32_t immediate_data_size, | 3694 error::Error GLES2DecoderImpl::HandleUniform3ui(uint32_t immediate_data_size, |
| 3695 const volatile void* cmd_data) { | 3695 const volatile void* cmd_data) { |
| 3696 if (!unsafe_es3_apis_enabled()) | 3696 if (!feature_info_->IsWebGL2OrES3Context()) |
| 3697 return error::kUnknownCommand; | 3697 return error::kUnknownCommand; |
| 3698 const volatile gles2::cmds::Uniform3ui& c = | 3698 const volatile gles2::cmds::Uniform3ui& c = |
| 3699 *static_cast<const volatile gles2::cmds::Uniform3ui*>(cmd_data); | 3699 *static_cast<const volatile gles2::cmds::Uniform3ui*>(cmd_data); |
| 3700 GLint location = static_cast<GLint>(c.location); | 3700 GLint location = static_cast<GLint>(c.location); |
| 3701 GLuint x = static_cast<GLuint>(c.x); | 3701 GLuint x = static_cast<GLuint>(c.x); |
| 3702 GLuint y = static_cast<GLuint>(c.y); | 3702 GLuint y = static_cast<GLuint>(c.y); |
| 3703 GLuint z = static_cast<GLuint>(c.z); | 3703 GLuint z = static_cast<GLuint>(c.z); |
| 3704 GLuint temp[3] = { | 3704 GLuint temp[3] = { |
| 3705 x, y, z, | 3705 x, y, z, |
| 3706 }; | 3706 }; |
| 3707 DoUniform3uiv(location, 1, &temp[0]); | 3707 DoUniform3uiv(location, 1, &temp[0]); |
| 3708 return error::kNoError; | 3708 return error::kNoError; |
| 3709 } | 3709 } |
| 3710 | 3710 |
| 3711 error::Error GLES2DecoderImpl::HandleUniform3uivImmediate( | 3711 error::Error GLES2DecoderImpl::HandleUniform3uivImmediate( |
| 3712 uint32_t immediate_data_size, | 3712 uint32_t immediate_data_size, |
| 3713 const volatile void* cmd_data) { | 3713 const volatile void* cmd_data) { |
| 3714 if (!unsafe_es3_apis_enabled()) | 3714 if (!feature_info_->IsWebGL2OrES3Context()) |
| 3715 return error::kUnknownCommand; | 3715 return error::kUnknownCommand; |
| 3716 const volatile gles2::cmds::Uniform3uivImmediate& c = | 3716 const volatile gles2::cmds::Uniform3uivImmediate& c = |
| 3717 *static_cast<const volatile gles2::cmds::Uniform3uivImmediate*>(cmd_data); | 3717 *static_cast<const volatile gles2::cmds::Uniform3uivImmediate*>(cmd_data); |
| 3718 GLint location = static_cast<GLint>(c.location); | 3718 GLint location = static_cast<GLint>(c.location); |
| 3719 GLsizei count = static_cast<GLsizei>(c.count); | 3719 GLsizei count = static_cast<GLsizei>(c.count); |
| 3720 uint32_t data_size = 0; | 3720 uint32_t data_size = 0; |
| 3721 if (count >= 0 && | 3721 if (count >= 0 && |
| 3722 !GLES2Util::ComputeDataSize(count, sizeof(GLuint), 3, &data_size)) { | 3722 !GLES2Util::ComputeDataSize(count, sizeof(GLuint), 3, &data_size)) { |
| 3723 return error::kOutOfBounds; | 3723 return error::kOutOfBounds; |
| 3724 } | 3724 } |
| (...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3821 } | 3821 } |
| 3822 if (v == NULL) { | 3822 if (v == NULL) { |
| 3823 return error::kOutOfBounds; | 3823 return error::kOutOfBounds; |
| 3824 } | 3824 } |
| 3825 DoUniform4iv(location, count, v); | 3825 DoUniform4iv(location, count, v); |
| 3826 return error::kNoError; | 3826 return error::kNoError; |
| 3827 } | 3827 } |
| 3828 | 3828 |
| 3829 error::Error GLES2DecoderImpl::HandleUniform4ui(uint32_t immediate_data_size, | 3829 error::Error GLES2DecoderImpl::HandleUniform4ui(uint32_t immediate_data_size, |
| 3830 const volatile void* cmd_data) { | 3830 const volatile void* cmd_data) { |
| 3831 if (!unsafe_es3_apis_enabled()) | 3831 if (!feature_info_->IsWebGL2OrES3Context()) |
| 3832 return error::kUnknownCommand; | 3832 return error::kUnknownCommand; |
| 3833 const volatile gles2::cmds::Uniform4ui& c = | 3833 const volatile gles2::cmds::Uniform4ui& c = |
| 3834 *static_cast<const volatile gles2::cmds::Uniform4ui*>(cmd_data); | 3834 *static_cast<const volatile gles2::cmds::Uniform4ui*>(cmd_data); |
| 3835 GLint location = static_cast<GLint>(c.location); | 3835 GLint location = static_cast<GLint>(c.location); |
| 3836 GLuint x = static_cast<GLuint>(c.x); | 3836 GLuint x = static_cast<GLuint>(c.x); |
| 3837 GLuint y = static_cast<GLuint>(c.y); | 3837 GLuint y = static_cast<GLuint>(c.y); |
| 3838 GLuint z = static_cast<GLuint>(c.z); | 3838 GLuint z = static_cast<GLuint>(c.z); |
| 3839 GLuint w = static_cast<GLuint>(c.w); | 3839 GLuint w = static_cast<GLuint>(c.w); |
| 3840 GLuint temp[4] = { | 3840 GLuint temp[4] = { |
| 3841 x, y, z, w, | 3841 x, y, z, w, |
| 3842 }; | 3842 }; |
| 3843 DoUniform4uiv(location, 1, &temp[0]); | 3843 DoUniform4uiv(location, 1, &temp[0]); |
| 3844 return error::kNoError; | 3844 return error::kNoError; |
| 3845 } | 3845 } |
| 3846 | 3846 |
| 3847 error::Error GLES2DecoderImpl::HandleUniform4uivImmediate( | 3847 error::Error GLES2DecoderImpl::HandleUniform4uivImmediate( |
| 3848 uint32_t immediate_data_size, | 3848 uint32_t immediate_data_size, |
| 3849 const volatile void* cmd_data) { | 3849 const volatile void* cmd_data) { |
| 3850 if (!unsafe_es3_apis_enabled()) | 3850 if (!feature_info_->IsWebGL2OrES3Context()) |
| 3851 return error::kUnknownCommand; | 3851 return error::kUnknownCommand; |
| 3852 const volatile gles2::cmds::Uniform4uivImmediate& c = | 3852 const volatile gles2::cmds::Uniform4uivImmediate& c = |
| 3853 *static_cast<const volatile gles2::cmds::Uniform4uivImmediate*>(cmd_data); | 3853 *static_cast<const volatile gles2::cmds::Uniform4uivImmediate*>(cmd_data); |
| 3854 GLint location = static_cast<GLint>(c.location); | 3854 GLint location = static_cast<GLint>(c.location); |
| 3855 GLsizei count = static_cast<GLsizei>(c.count); | 3855 GLsizei count = static_cast<GLsizei>(c.count); |
| 3856 uint32_t data_size = 0; | 3856 uint32_t data_size = 0; |
| 3857 if (count >= 0 && | 3857 if (count >= 0 && |
| 3858 !GLES2Util::ComputeDataSize(count, sizeof(GLuint), 4, &data_size)) { | 3858 !GLES2Util::ComputeDataSize(count, sizeof(GLuint), 4, &data_size)) { |
| 3859 return error::kOutOfBounds; | 3859 return error::kOutOfBounds; |
| 3860 } | 3860 } |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3900 if (value == NULL) { | 3900 if (value == NULL) { |
| 3901 return error::kOutOfBounds; | 3901 return error::kOutOfBounds; |
| 3902 } | 3902 } |
| 3903 DoUniformMatrix2fv(location, count, transpose, value); | 3903 DoUniformMatrix2fv(location, count, transpose, value); |
| 3904 return error::kNoError; | 3904 return error::kNoError; |
| 3905 } | 3905 } |
| 3906 | 3906 |
| 3907 error::Error GLES2DecoderImpl::HandleUniformMatrix2x3fvImmediate( | 3907 error::Error GLES2DecoderImpl::HandleUniformMatrix2x3fvImmediate( |
| 3908 uint32_t immediate_data_size, | 3908 uint32_t immediate_data_size, |
| 3909 const volatile void* cmd_data) { | 3909 const volatile void* cmd_data) { |
| 3910 if (!unsafe_es3_apis_enabled()) | 3910 if (!feature_info_->IsWebGL2OrES3Context()) |
| 3911 return error::kUnknownCommand; | 3911 return error::kUnknownCommand; |
| 3912 const volatile gles2::cmds::UniformMatrix2x3fvImmediate& c = | 3912 const volatile gles2::cmds::UniformMatrix2x3fvImmediate& c = |
| 3913 *static_cast<const volatile gles2::cmds::UniformMatrix2x3fvImmediate*>( | 3913 *static_cast<const volatile gles2::cmds::UniformMatrix2x3fvImmediate*>( |
| 3914 cmd_data); | 3914 cmd_data); |
| 3915 GLint location = static_cast<GLint>(c.location); | 3915 GLint location = static_cast<GLint>(c.location); |
| 3916 GLsizei count = static_cast<GLsizei>(c.count); | 3916 GLsizei count = static_cast<GLsizei>(c.count); |
| 3917 GLboolean transpose = static_cast<GLboolean>(c.transpose); | 3917 GLboolean transpose = static_cast<GLboolean>(c.transpose); |
| 3918 uint32_t data_size = 0; | 3918 uint32_t data_size = 0; |
| 3919 if (count >= 0 && | 3919 if (count >= 0 && |
| 3920 !GLES2Util::ComputeDataSize(count, sizeof(GLfloat), 6, &data_size)) { | 3920 !GLES2Util::ComputeDataSize(count, sizeof(GLfloat), 6, &data_size)) { |
| (...skipping 11 matching lines...) Expand all Loading... |
| 3932 if (value == NULL) { | 3932 if (value == NULL) { |
| 3933 return error::kOutOfBounds; | 3933 return error::kOutOfBounds; |
| 3934 } | 3934 } |
| 3935 DoUniformMatrix2x3fv(location, count, transpose, value); | 3935 DoUniformMatrix2x3fv(location, count, transpose, value); |
| 3936 return error::kNoError; | 3936 return error::kNoError; |
| 3937 } | 3937 } |
| 3938 | 3938 |
| 3939 error::Error GLES2DecoderImpl::HandleUniformMatrix2x4fvImmediate( | 3939 error::Error GLES2DecoderImpl::HandleUniformMatrix2x4fvImmediate( |
| 3940 uint32_t immediate_data_size, | 3940 uint32_t immediate_data_size, |
| 3941 const volatile void* cmd_data) { | 3941 const volatile void* cmd_data) { |
| 3942 if (!unsafe_es3_apis_enabled()) | 3942 if (!feature_info_->IsWebGL2OrES3Context()) |
| 3943 return error::kUnknownCommand; | 3943 return error::kUnknownCommand; |
| 3944 const volatile gles2::cmds::UniformMatrix2x4fvImmediate& c = | 3944 const volatile gles2::cmds::UniformMatrix2x4fvImmediate& c = |
| 3945 *static_cast<const volatile gles2::cmds::UniformMatrix2x4fvImmediate*>( | 3945 *static_cast<const volatile gles2::cmds::UniformMatrix2x4fvImmediate*>( |
| 3946 cmd_data); | 3946 cmd_data); |
| 3947 GLint location = static_cast<GLint>(c.location); | 3947 GLint location = static_cast<GLint>(c.location); |
| 3948 GLsizei count = static_cast<GLsizei>(c.count); | 3948 GLsizei count = static_cast<GLsizei>(c.count); |
| 3949 GLboolean transpose = static_cast<GLboolean>(c.transpose); | 3949 GLboolean transpose = static_cast<GLboolean>(c.transpose); |
| 3950 uint32_t data_size = 0; | 3950 uint32_t data_size = 0; |
| 3951 if (count >= 0 && | 3951 if (count >= 0 && |
| 3952 !GLES2Util::ComputeDataSize(count, sizeof(GLfloat), 8, &data_size)) { | 3952 !GLES2Util::ComputeDataSize(count, sizeof(GLfloat), 8, &data_size)) { |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3994 if (value == NULL) { | 3994 if (value == NULL) { |
| 3995 return error::kOutOfBounds; | 3995 return error::kOutOfBounds; |
| 3996 } | 3996 } |
| 3997 DoUniformMatrix3fv(location, count, transpose, value); | 3997 DoUniformMatrix3fv(location, count, transpose, value); |
| 3998 return error::kNoError; | 3998 return error::kNoError; |
| 3999 } | 3999 } |
| 4000 | 4000 |
| 4001 error::Error GLES2DecoderImpl::HandleUniformMatrix3x2fvImmediate( | 4001 error::Error GLES2DecoderImpl::HandleUniformMatrix3x2fvImmediate( |
| 4002 uint32_t immediate_data_size, | 4002 uint32_t immediate_data_size, |
| 4003 const volatile void* cmd_data) { | 4003 const volatile void* cmd_data) { |
| 4004 if (!unsafe_es3_apis_enabled()) | 4004 if (!feature_info_->IsWebGL2OrES3Context()) |
| 4005 return error::kUnknownCommand; | 4005 return error::kUnknownCommand; |
| 4006 const volatile gles2::cmds::UniformMatrix3x2fvImmediate& c = | 4006 const volatile gles2::cmds::UniformMatrix3x2fvImmediate& c = |
| 4007 *static_cast<const volatile gles2::cmds::UniformMatrix3x2fvImmediate*>( | 4007 *static_cast<const volatile gles2::cmds::UniformMatrix3x2fvImmediate*>( |
| 4008 cmd_data); | 4008 cmd_data); |
| 4009 GLint location = static_cast<GLint>(c.location); | 4009 GLint location = static_cast<GLint>(c.location); |
| 4010 GLsizei count = static_cast<GLsizei>(c.count); | 4010 GLsizei count = static_cast<GLsizei>(c.count); |
| 4011 GLboolean transpose = static_cast<GLboolean>(c.transpose); | 4011 GLboolean transpose = static_cast<GLboolean>(c.transpose); |
| 4012 uint32_t data_size = 0; | 4012 uint32_t data_size = 0; |
| 4013 if (count >= 0 && | 4013 if (count >= 0 && |
| 4014 !GLES2Util::ComputeDataSize(count, sizeof(GLfloat), 6, &data_size)) { | 4014 !GLES2Util::ComputeDataSize(count, sizeof(GLfloat), 6, &data_size)) { |
| (...skipping 11 matching lines...) Expand all Loading... |
| 4026 if (value == NULL) { | 4026 if (value == NULL) { |
| 4027 return error::kOutOfBounds; | 4027 return error::kOutOfBounds; |
| 4028 } | 4028 } |
| 4029 DoUniformMatrix3x2fv(location, count, transpose, value); | 4029 DoUniformMatrix3x2fv(location, count, transpose, value); |
| 4030 return error::kNoError; | 4030 return error::kNoError; |
| 4031 } | 4031 } |
| 4032 | 4032 |
| 4033 error::Error GLES2DecoderImpl::HandleUniformMatrix3x4fvImmediate( | 4033 error::Error GLES2DecoderImpl::HandleUniformMatrix3x4fvImmediate( |
| 4034 uint32_t immediate_data_size, | 4034 uint32_t immediate_data_size, |
| 4035 const volatile void* cmd_data) { | 4035 const volatile void* cmd_data) { |
| 4036 if (!unsafe_es3_apis_enabled()) | 4036 if (!feature_info_->IsWebGL2OrES3Context()) |
| 4037 return error::kUnknownCommand; | 4037 return error::kUnknownCommand; |
| 4038 const volatile gles2::cmds::UniformMatrix3x4fvImmediate& c = | 4038 const volatile gles2::cmds::UniformMatrix3x4fvImmediate& c = |
| 4039 *static_cast<const volatile gles2::cmds::UniformMatrix3x4fvImmediate*>( | 4039 *static_cast<const volatile gles2::cmds::UniformMatrix3x4fvImmediate*>( |
| 4040 cmd_data); | 4040 cmd_data); |
| 4041 GLint location = static_cast<GLint>(c.location); | 4041 GLint location = static_cast<GLint>(c.location); |
| 4042 GLsizei count = static_cast<GLsizei>(c.count); | 4042 GLsizei count = static_cast<GLsizei>(c.count); |
| 4043 GLboolean transpose = static_cast<GLboolean>(c.transpose); | 4043 GLboolean transpose = static_cast<GLboolean>(c.transpose); |
| 4044 uint32_t data_size = 0; | 4044 uint32_t data_size = 0; |
| 4045 if (count >= 0 && | 4045 if (count >= 0 && |
| 4046 !GLES2Util::ComputeDataSize(count, sizeof(GLfloat), 12, &data_size)) { | 4046 !GLES2Util::ComputeDataSize(count, sizeof(GLfloat), 12, &data_size)) { |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4088 if (value == NULL) { | 4088 if (value == NULL) { |
| 4089 return error::kOutOfBounds; | 4089 return error::kOutOfBounds; |
| 4090 } | 4090 } |
| 4091 DoUniformMatrix4fv(location, count, transpose, value); | 4091 DoUniformMatrix4fv(location, count, transpose, value); |
| 4092 return error::kNoError; | 4092 return error::kNoError; |
| 4093 } | 4093 } |
| 4094 | 4094 |
| 4095 error::Error GLES2DecoderImpl::HandleUniformMatrix4x2fvImmediate( | 4095 error::Error GLES2DecoderImpl::HandleUniformMatrix4x2fvImmediate( |
| 4096 uint32_t immediate_data_size, | 4096 uint32_t immediate_data_size, |
| 4097 const volatile void* cmd_data) { | 4097 const volatile void* cmd_data) { |
| 4098 if (!unsafe_es3_apis_enabled()) | 4098 if (!feature_info_->IsWebGL2OrES3Context()) |
| 4099 return error::kUnknownCommand; | 4099 return error::kUnknownCommand; |
| 4100 const volatile gles2::cmds::UniformMatrix4x2fvImmediate& c = | 4100 const volatile gles2::cmds::UniformMatrix4x2fvImmediate& c = |
| 4101 *static_cast<const volatile gles2::cmds::UniformMatrix4x2fvImmediate*>( | 4101 *static_cast<const volatile gles2::cmds::UniformMatrix4x2fvImmediate*>( |
| 4102 cmd_data); | 4102 cmd_data); |
| 4103 GLint location = static_cast<GLint>(c.location); | 4103 GLint location = static_cast<GLint>(c.location); |
| 4104 GLsizei count = static_cast<GLsizei>(c.count); | 4104 GLsizei count = static_cast<GLsizei>(c.count); |
| 4105 GLboolean transpose = static_cast<GLboolean>(c.transpose); | 4105 GLboolean transpose = static_cast<GLboolean>(c.transpose); |
| 4106 uint32_t data_size = 0; | 4106 uint32_t data_size = 0; |
| 4107 if (count >= 0 && | 4107 if (count >= 0 && |
| 4108 !GLES2Util::ComputeDataSize(count, sizeof(GLfloat), 8, &data_size)) { | 4108 !GLES2Util::ComputeDataSize(count, sizeof(GLfloat), 8, &data_size)) { |
| (...skipping 11 matching lines...) Expand all Loading... |
| 4120 if (value == NULL) { | 4120 if (value == NULL) { |
| 4121 return error::kOutOfBounds; | 4121 return error::kOutOfBounds; |
| 4122 } | 4122 } |
| 4123 DoUniformMatrix4x2fv(location, count, transpose, value); | 4123 DoUniformMatrix4x2fv(location, count, transpose, value); |
| 4124 return error::kNoError; | 4124 return error::kNoError; |
| 4125 } | 4125 } |
| 4126 | 4126 |
| 4127 error::Error GLES2DecoderImpl::HandleUniformMatrix4x3fvImmediate( | 4127 error::Error GLES2DecoderImpl::HandleUniformMatrix4x3fvImmediate( |
| 4128 uint32_t immediate_data_size, | 4128 uint32_t immediate_data_size, |
| 4129 const volatile void* cmd_data) { | 4129 const volatile void* cmd_data) { |
| 4130 if (!unsafe_es3_apis_enabled()) | 4130 if (!feature_info_->IsWebGL2OrES3Context()) |
| 4131 return error::kUnknownCommand; | 4131 return error::kUnknownCommand; |
| 4132 const volatile gles2::cmds::UniformMatrix4x3fvImmediate& c = | 4132 const volatile gles2::cmds::UniformMatrix4x3fvImmediate& c = |
| 4133 *static_cast<const volatile gles2::cmds::UniformMatrix4x3fvImmediate*>( | 4133 *static_cast<const volatile gles2::cmds::UniformMatrix4x3fvImmediate*>( |
| 4134 cmd_data); | 4134 cmd_data); |
| 4135 GLint location = static_cast<GLint>(c.location); | 4135 GLint location = static_cast<GLint>(c.location); |
| 4136 GLsizei count = static_cast<GLsizei>(c.count); | 4136 GLsizei count = static_cast<GLsizei>(c.count); |
| 4137 GLboolean transpose = static_cast<GLboolean>(c.transpose); | 4137 GLboolean transpose = static_cast<GLboolean>(c.transpose); |
| 4138 uint32_t data_size = 0; | 4138 uint32_t data_size = 0; |
| 4139 if (count >= 0 && | 4139 if (count >= 0 && |
| 4140 !GLES2Util::ComputeDataSize(count, sizeof(GLfloat), 12, &data_size)) { | 4140 !GLES2Util::ComputeDataSize(count, sizeof(GLfloat), 12, &data_size)) { |
| (...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4313 if (values == NULL) { | 4313 if (values == NULL) { |
| 4314 return error::kOutOfBounds; | 4314 return error::kOutOfBounds; |
| 4315 } | 4315 } |
| 4316 DoVertexAttrib4fv(indx, values); | 4316 DoVertexAttrib4fv(indx, values); |
| 4317 return error::kNoError; | 4317 return error::kNoError; |
| 4318 } | 4318 } |
| 4319 | 4319 |
| 4320 error::Error GLES2DecoderImpl::HandleVertexAttribI4i( | 4320 error::Error GLES2DecoderImpl::HandleVertexAttribI4i( |
| 4321 uint32_t immediate_data_size, | 4321 uint32_t immediate_data_size, |
| 4322 const volatile void* cmd_data) { | 4322 const volatile void* cmd_data) { |
| 4323 if (!unsafe_es3_apis_enabled()) | 4323 if (!feature_info_->IsWebGL2OrES3Context()) |
| 4324 return error::kUnknownCommand; | 4324 return error::kUnknownCommand; |
| 4325 const volatile gles2::cmds::VertexAttribI4i& c = | 4325 const volatile gles2::cmds::VertexAttribI4i& c = |
| 4326 *static_cast<const volatile gles2::cmds::VertexAttribI4i*>(cmd_data); | 4326 *static_cast<const volatile gles2::cmds::VertexAttribI4i*>(cmd_data); |
| 4327 GLuint indx = static_cast<GLuint>(c.indx); | 4327 GLuint indx = static_cast<GLuint>(c.indx); |
| 4328 GLint x = static_cast<GLint>(c.x); | 4328 GLint x = static_cast<GLint>(c.x); |
| 4329 GLint y = static_cast<GLint>(c.y); | 4329 GLint y = static_cast<GLint>(c.y); |
| 4330 GLint z = static_cast<GLint>(c.z); | 4330 GLint z = static_cast<GLint>(c.z); |
| 4331 GLint w = static_cast<GLint>(c.w); | 4331 GLint w = static_cast<GLint>(c.w); |
| 4332 DoVertexAttribI4i(indx, x, y, z, w); | 4332 DoVertexAttribI4i(indx, x, y, z, w); |
| 4333 return error::kNoError; | 4333 return error::kNoError; |
| 4334 } | 4334 } |
| 4335 | 4335 |
| 4336 error::Error GLES2DecoderImpl::HandleVertexAttribI4ivImmediate( | 4336 error::Error GLES2DecoderImpl::HandleVertexAttribI4ivImmediate( |
| 4337 uint32_t immediate_data_size, | 4337 uint32_t immediate_data_size, |
| 4338 const volatile void* cmd_data) { | 4338 const volatile void* cmd_data) { |
| 4339 if (!unsafe_es3_apis_enabled()) | 4339 if (!feature_info_->IsWebGL2OrES3Context()) |
| 4340 return error::kUnknownCommand; | 4340 return error::kUnknownCommand; |
| 4341 const volatile gles2::cmds::VertexAttribI4ivImmediate& c = | 4341 const volatile gles2::cmds::VertexAttribI4ivImmediate& c = |
| 4342 *static_cast<const volatile gles2::cmds::VertexAttribI4ivImmediate*>( | 4342 *static_cast<const volatile gles2::cmds::VertexAttribI4ivImmediate*>( |
| 4343 cmd_data); | 4343 cmd_data); |
| 4344 GLuint indx = static_cast<GLuint>(c.indx); | 4344 GLuint indx = static_cast<GLuint>(c.indx); |
| 4345 uint32_t data_size; | 4345 uint32_t data_size; |
| 4346 if (!GLES2Util::ComputeDataSize(1, sizeof(GLint), 4, &data_size)) { | 4346 if (!GLES2Util::ComputeDataSize(1, sizeof(GLint), 4, &data_size)) { |
| 4347 return error::kOutOfBounds; | 4347 return error::kOutOfBounds; |
| 4348 } | 4348 } |
| 4349 if (data_size > immediate_data_size) { | 4349 if (data_size > immediate_data_size) { |
| 4350 return error::kOutOfBounds; | 4350 return error::kOutOfBounds; |
| 4351 } | 4351 } |
| 4352 volatile const GLint* values = GetImmediateDataAs<volatile const GLint*>( | 4352 volatile const GLint* values = GetImmediateDataAs<volatile const GLint*>( |
| 4353 c, data_size, immediate_data_size); | 4353 c, data_size, immediate_data_size); |
| 4354 if (values == NULL) { | 4354 if (values == NULL) { |
| 4355 return error::kOutOfBounds; | 4355 return error::kOutOfBounds; |
| 4356 } | 4356 } |
| 4357 DoVertexAttribI4iv(indx, values); | 4357 DoVertexAttribI4iv(indx, values); |
| 4358 return error::kNoError; | 4358 return error::kNoError; |
| 4359 } | 4359 } |
| 4360 | 4360 |
| 4361 error::Error GLES2DecoderImpl::HandleVertexAttribI4ui( | 4361 error::Error GLES2DecoderImpl::HandleVertexAttribI4ui( |
| 4362 uint32_t immediate_data_size, | 4362 uint32_t immediate_data_size, |
| 4363 const volatile void* cmd_data) { | 4363 const volatile void* cmd_data) { |
| 4364 if (!unsafe_es3_apis_enabled()) | 4364 if (!feature_info_->IsWebGL2OrES3Context()) |
| 4365 return error::kUnknownCommand; | 4365 return error::kUnknownCommand; |
| 4366 const volatile gles2::cmds::VertexAttribI4ui& c = | 4366 const volatile gles2::cmds::VertexAttribI4ui& c = |
| 4367 *static_cast<const volatile gles2::cmds::VertexAttribI4ui*>(cmd_data); | 4367 *static_cast<const volatile gles2::cmds::VertexAttribI4ui*>(cmd_data); |
| 4368 GLuint indx = static_cast<GLuint>(c.indx); | 4368 GLuint indx = static_cast<GLuint>(c.indx); |
| 4369 GLuint x = static_cast<GLuint>(c.x); | 4369 GLuint x = static_cast<GLuint>(c.x); |
| 4370 GLuint y = static_cast<GLuint>(c.y); | 4370 GLuint y = static_cast<GLuint>(c.y); |
| 4371 GLuint z = static_cast<GLuint>(c.z); | 4371 GLuint z = static_cast<GLuint>(c.z); |
| 4372 GLuint w = static_cast<GLuint>(c.w); | 4372 GLuint w = static_cast<GLuint>(c.w); |
| 4373 DoVertexAttribI4ui(indx, x, y, z, w); | 4373 DoVertexAttribI4ui(indx, x, y, z, w); |
| 4374 return error::kNoError; | 4374 return error::kNoError; |
| 4375 } | 4375 } |
| 4376 | 4376 |
| 4377 error::Error GLES2DecoderImpl::HandleVertexAttribI4uivImmediate( | 4377 error::Error GLES2DecoderImpl::HandleVertexAttribI4uivImmediate( |
| 4378 uint32_t immediate_data_size, | 4378 uint32_t immediate_data_size, |
| 4379 const volatile void* cmd_data) { | 4379 const volatile void* cmd_data) { |
| 4380 if (!unsafe_es3_apis_enabled()) | 4380 if (!feature_info_->IsWebGL2OrES3Context()) |
| 4381 return error::kUnknownCommand; | 4381 return error::kUnknownCommand; |
| 4382 const volatile gles2::cmds::VertexAttribI4uivImmediate& c = | 4382 const volatile gles2::cmds::VertexAttribI4uivImmediate& c = |
| 4383 *static_cast<const volatile gles2::cmds::VertexAttribI4uivImmediate*>( | 4383 *static_cast<const volatile gles2::cmds::VertexAttribI4uivImmediate*>( |
| 4384 cmd_data); | 4384 cmd_data); |
| 4385 GLuint indx = static_cast<GLuint>(c.indx); | 4385 GLuint indx = static_cast<GLuint>(c.indx); |
| 4386 uint32_t data_size; | 4386 uint32_t data_size; |
| 4387 if (!GLES2Util::ComputeDataSize(1, sizeof(GLuint), 4, &data_size)) { | 4387 if (!GLES2Util::ComputeDataSize(1, sizeof(GLuint), 4, &data_size)) { |
| 4388 return error::kOutOfBounds; | 4388 return error::kOutOfBounds; |
| 4389 } | 4389 } |
| 4390 if (data_size > immediate_data_size) { | 4390 if (data_size > immediate_data_size) { |
| (...skipping 282 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4673 if (queries == NULL) { | 4673 if (queries == NULL) { |
| 4674 return error::kOutOfBounds; | 4674 return error::kOutOfBounds; |
| 4675 } | 4675 } |
| 4676 DeleteQueriesEXTHelper(n, queries); | 4676 DeleteQueriesEXTHelper(n, queries); |
| 4677 return error::kNoError; | 4677 return error::kNoError; |
| 4678 } | 4678 } |
| 4679 | 4679 |
| 4680 error::Error GLES2DecoderImpl::HandleBeginTransformFeedback( | 4680 error::Error GLES2DecoderImpl::HandleBeginTransformFeedback( |
| 4681 uint32_t immediate_data_size, | 4681 uint32_t immediate_data_size, |
| 4682 const volatile void* cmd_data) { | 4682 const volatile void* cmd_data) { |
| 4683 if (!unsafe_es3_apis_enabled()) | 4683 if (!feature_info_->IsWebGL2OrES3Context()) |
| 4684 return error::kUnknownCommand; | 4684 return error::kUnknownCommand; |
| 4685 const volatile gles2::cmds::BeginTransformFeedback& c = | 4685 const volatile gles2::cmds::BeginTransformFeedback& c = |
| 4686 *static_cast<const volatile gles2::cmds::BeginTransformFeedback*>( | 4686 *static_cast<const volatile gles2::cmds::BeginTransformFeedback*>( |
| 4687 cmd_data); | 4687 cmd_data); |
| 4688 GLenum primitivemode = static_cast<GLenum>(c.primitivemode); | 4688 GLenum primitivemode = static_cast<GLenum>(c.primitivemode); |
| 4689 if (!validators_->transform_feedback_primitive_mode.IsValid(primitivemode)) { | 4689 if (!validators_->transform_feedback_primitive_mode.IsValid(primitivemode)) { |
| 4690 LOCAL_SET_GL_ERROR_INVALID_ENUM("glBeginTransformFeedback", primitivemode, | 4690 LOCAL_SET_GL_ERROR_INVALID_ENUM("glBeginTransformFeedback", primitivemode, |
| 4691 "primitivemode"); | 4691 "primitivemode"); |
| 4692 return error::kNoError; | 4692 return error::kNoError; |
| 4693 } | 4693 } |
| 4694 DoBeginTransformFeedback(primitivemode); | 4694 DoBeginTransformFeedback(primitivemode); |
| 4695 return error::kNoError; | 4695 return error::kNoError; |
| 4696 } | 4696 } |
| 4697 | 4697 |
| 4698 error::Error GLES2DecoderImpl::HandleEndTransformFeedback( | 4698 error::Error GLES2DecoderImpl::HandleEndTransformFeedback( |
| 4699 uint32_t immediate_data_size, | 4699 uint32_t immediate_data_size, |
| 4700 const volatile void* cmd_data) { | 4700 const volatile void* cmd_data) { |
| 4701 if (!unsafe_es3_apis_enabled()) | 4701 if (!feature_info_->IsWebGL2OrES3Context()) |
| 4702 return error::kUnknownCommand; | 4702 return error::kUnknownCommand; |
| 4703 DoEndTransformFeedback(); | 4703 DoEndTransformFeedback(); |
| 4704 return error::kNoError; | 4704 return error::kNoError; |
| 4705 } | 4705 } |
| 4706 | 4706 |
| 4707 error::Error GLES2DecoderImpl::HandleInsertEventMarkerEXT( | 4707 error::Error GLES2DecoderImpl::HandleInsertEventMarkerEXT( |
| 4708 uint32_t immediate_data_size, | 4708 uint32_t immediate_data_size, |
| 4709 const volatile void* cmd_data) { | 4709 const volatile void* cmd_data) { |
| 4710 const volatile gles2::cmds::InsertEventMarkerEXT& c = | 4710 const volatile gles2::cmds::InsertEventMarkerEXT& c = |
| 4711 *static_cast<const volatile gles2::cmds::InsertEventMarkerEXT*>(cmd_data); | 4711 *static_cast<const volatile gles2::cmds::InsertEventMarkerEXT*>(cmd_data); |
| (...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4854 "type"); | 4854 "type"); |
| 4855 return error::kNoError; | 4855 return error::kNoError; |
| 4856 } | 4856 } |
| 4857 *result_dst = DoGetMaxValueInBufferCHROMIUM(buffer_id, count, type, offset); | 4857 *result_dst = DoGetMaxValueInBufferCHROMIUM(buffer_id, count, type, offset); |
| 4858 return error::kNoError; | 4858 return error::kNoError; |
| 4859 } | 4859 } |
| 4860 | 4860 |
| 4861 error::Error GLES2DecoderImpl::HandleFlushMappedBufferRange( | 4861 error::Error GLES2DecoderImpl::HandleFlushMappedBufferRange( |
| 4862 uint32_t immediate_data_size, | 4862 uint32_t immediate_data_size, |
| 4863 const volatile void* cmd_data) { | 4863 const volatile void* cmd_data) { |
| 4864 if (!unsafe_es3_apis_enabled()) | 4864 if (!feature_info_->IsWebGL2OrES3Context()) |
| 4865 return error::kUnknownCommand; | 4865 return error::kUnknownCommand; |
| 4866 const volatile gles2::cmds::FlushMappedBufferRange& c = | 4866 const volatile gles2::cmds::FlushMappedBufferRange& c = |
| 4867 *static_cast<const volatile gles2::cmds::FlushMappedBufferRange*>( | 4867 *static_cast<const volatile gles2::cmds::FlushMappedBufferRange*>( |
| 4868 cmd_data); | 4868 cmd_data); |
| 4869 GLenum target = static_cast<GLenum>(c.target); | 4869 GLenum target = static_cast<GLenum>(c.target); |
| 4870 GLintptr offset = static_cast<GLintptr>(c.offset); | 4870 GLintptr offset = static_cast<GLintptr>(c.offset); |
| 4871 GLsizeiptr size = static_cast<GLsizeiptr>(c.size); | 4871 GLsizeiptr size = static_cast<GLsizeiptr>(c.size); |
| 4872 if (!validators_->buffer_target.IsValid(target)) { | 4872 if (!validators_->buffer_target.IsValid(target)) { |
| 4873 LOCAL_SET_GL_ERROR_INVALID_ENUM("glFlushMappedBufferRange", target, | 4873 LOCAL_SET_GL_ERROR_INVALID_ENUM("glFlushMappedBufferRange", target, |
| 4874 "target"); | 4874 "target"); |
| (...skipping 649 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5524 state_.enable_flags.cached_sample_alpha_to_one_ext = enabled; | 5524 state_.enable_flags.cached_sample_alpha_to_one_ext = enabled; |
| 5525 return true; | 5525 return true; |
| 5526 } | 5526 } |
| 5527 return false; | 5527 return false; |
| 5528 default: | 5528 default: |
| 5529 NOTREACHED(); | 5529 NOTREACHED(); |
| 5530 return false; | 5530 return false; |
| 5531 } | 5531 } |
| 5532 } | 5532 } |
| 5533 #endif // GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_AUTOGEN_H_ | 5533 #endif // GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_AUTOGEN_H_ |
| OLD | NEW |