| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 // DO NOT EDIT! | 7 // DO NOT EDIT! |
| 8 | 8 |
| 9 // It is included by gles2_cmd_decoder.cc | 9 // It is included by gles2_cmd_decoder.cc |
| 10 #ifndef GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_AUTOGEN_H_ | 10 #ifndef GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_AUTOGEN_H_ |
| (...skipping 382 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 393 return error::kNoError; | 393 return error::kNoError; |
| 394 } | 394 } |
| 395 if (data == NULL) { | 395 if (data == NULL) { |
| 396 return error::kOutOfBounds; | 396 return error::kOutOfBounds; |
| 397 } | 397 } |
| 398 DoCompressedTexSubImage2D( | 398 DoCompressedTexSubImage2D( |
| 399 target, level, xoffset, yoffset, width, height, format, imageSize, data); | 399 target, level, xoffset, yoffset, width, height, format, imageSize, data); |
| 400 return error::kNoError; | 400 return error::kNoError; |
| 401 } | 401 } |
| 402 | 402 |
| 403 error::Error GLES2DecoderImpl::HandleCopyTexImage2D( | |
| 404 uint32 immediate_data_size, const gles2::CopyTexImage2D& c) { | |
| 405 GLenum target = static_cast<GLenum>(c.target); | |
| 406 GLint level = static_cast<GLint>(c.level); | |
| 407 GLenum internalformat = static_cast<GLenum>(c.internalformat); | |
| 408 GLint x = static_cast<GLint>(c.x); | |
| 409 GLint y = static_cast<GLint>(c.y); | |
| 410 GLsizei width = static_cast<GLsizei>(c.width); | |
| 411 GLsizei height = static_cast<GLsizei>(c.height); | |
| 412 GLint border = static_cast<GLint>(c.border); | |
| 413 if (!validators_->texture_target.IsValid(target)) { | |
| 414 SetGLErrorInvalidEnum("glCopyTexImage2D", target, "target"); | |
| 415 return error::kNoError; | |
| 416 } | |
| 417 if (!validators_->texture_internal_format.IsValid(internalformat)) { | |
| 418 SetGLErrorInvalidEnum("glCopyTexImage2D", internalformat, | |
| 419 "internalformat"); | |
| 420 return error::kNoError; | |
| 421 } | |
| 422 if (width < 0) { | |
| 423 SetGLError(GL_INVALID_VALUE, "glCopyTexImage2D", "width < 0"); | |
| 424 return error::kNoError; | |
| 425 } | |
| 426 if (height < 0) { | |
| 427 SetGLError(GL_INVALID_VALUE, "glCopyTexImage2D", "height < 0"); | |
| 428 return error::kNoError; | |
| 429 } | |
| 430 if (!validators_->texture_border.IsValid(border)) { | |
| 431 SetGLError( | |
| 432 GL_INVALID_VALUE, "glCopyTexImage2D", "border GL_INVALID_VALUE"); | |
| 433 return error::kNoError; | |
| 434 } | |
| 435 DoCopyTexImage2D(target, level, internalformat, x, y, width, height, border); | |
| 436 return error::kNoError; | |
| 437 } | |
| 438 | |
| 439 error::Error GLES2DecoderImpl::HandleCopyTexSubImage2D( | |
| 440 uint32 immediate_data_size, const gles2::CopyTexSubImage2D& c) { | |
| 441 GLenum target = static_cast<GLenum>(c.target); | |
| 442 GLint level = static_cast<GLint>(c.level); | |
| 443 GLint xoffset = static_cast<GLint>(c.xoffset); | |
| 444 GLint yoffset = static_cast<GLint>(c.yoffset); | |
| 445 GLint x = static_cast<GLint>(c.x); | |
| 446 GLint y = static_cast<GLint>(c.y); | |
| 447 GLsizei width = static_cast<GLsizei>(c.width); | |
| 448 GLsizei height = static_cast<GLsizei>(c.height); | |
| 449 if (!validators_->texture_target.IsValid(target)) { | |
| 450 SetGLErrorInvalidEnum("glCopyTexSubImage2D", target, "target"); | |
| 451 return error::kNoError; | |
| 452 } | |
| 453 if (width < 0) { | |
| 454 SetGLError(GL_INVALID_VALUE, "glCopyTexSubImage2D", "width < 0"); | |
| 455 return error::kNoError; | |
| 456 } | |
| 457 if (height < 0) { | |
| 458 SetGLError(GL_INVALID_VALUE, "glCopyTexSubImage2D", "height < 0"); | |
| 459 return error::kNoError; | |
| 460 } | |
| 461 DoCopyTexSubImage2D(target, level, xoffset, yoffset, x, y, width, height); | |
| 462 return error::kNoError; | |
| 463 } | |
| 464 | |
| 465 error::Error GLES2DecoderImpl::HandleCreateProgram( | 403 error::Error GLES2DecoderImpl::HandleCreateProgram( |
| 466 uint32 immediate_data_size, const gles2::CreateProgram& c) { | 404 uint32 immediate_data_size, const gles2::CreateProgram& c) { |
| 467 uint32 client_id = c.client_id; | 405 uint32 client_id = c.client_id; |
| 468 if (!CreateProgramHelper(client_id)) { | 406 if (!CreateProgramHelper(client_id)) { |
| 469 return error::kInvalidArguments; | 407 return error::kInvalidArguments; |
| 470 } | 408 } |
| 471 return error::kNoError; | 409 return error::kNoError; |
| 472 } | 410 } |
| 473 | 411 |
| 474 error::Error GLES2DecoderImpl::HandleCreateShader( | 412 error::Error GLES2DecoderImpl::HandleCreateShader( |
| (...skipping 2151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2626 return error::kNoError; | 2564 return error::kNoError; |
| 2627 } | 2565 } |
| 2628 if (height < 0) { | 2566 if (height < 0) { |
| 2629 SetGLError(GL_INVALID_VALUE, "glViewport", "height < 0"); | 2567 SetGLError(GL_INVALID_VALUE, "glViewport", "height < 0"); |
| 2630 return error::kNoError; | 2568 return error::kNoError; |
| 2631 } | 2569 } |
| 2632 DoViewport(x, y, width, height); | 2570 DoViewport(x, y, width, height); |
| 2633 return error::kNoError; | 2571 return error::kNoError; |
| 2634 } | 2572 } |
| 2635 | 2573 |
| 2636 error::Error GLES2DecoderImpl::HandleBlitFramebufferEXT( | |
| 2637 uint32 immediate_data_size, const gles2::BlitFramebufferEXT& c) { | |
| 2638 GLint srcX0 = static_cast<GLint>(c.srcX0); | |
| 2639 GLint srcY0 = static_cast<GLint>(c.srcY0); | |
| 2640 GLint srcX1 = static_cast<GLint>(c.srcX1); | |
| 2641 GLint srcY1 = static_cast<GLint>(c.srcY1); | |
| 2642 GLint dstX0 = static_cast<GLint>(c.dstX0); | |
| 2643 GLint dstY0 = static_cast<GLint>(c.dstY0); | |
| 2644 GLint dstX1 = static_cast<GLint>(c.dstX1); | |
| 2645 GLint dstY1 = static_cast<GLint>(c.dstY1); | |
| 2646 GLbitfield mask = static_cast<GLbitfield>(c.mask); | |
| 2647 GLenum filter = static_cast<GLenum>(c.filter); | |
| 2648 if (!validators_->blit_filter.IsValid(filter)) { | |
| 2649 SetGLErrorInvalidEnum("glBlitFramebufferEXT", filter, "filter"); | |
| 2650 return error::kNoError; | |
| 2651 } | |
| 2652 DoBlitFramebufferEXT( | |
| 2653 srcX0, srcY0, srcX1, srcY1, dstX0, dstY0, dstX1, dstY1, mask, filter); | |
| 2654 return error::kNoError; | |
| 2655 } | |
| 2656 | |
| 2657 error::Error GLES2DecoderImpl::HandleRenderbufferStorageMultisampleEXT( | 2574 error::Error GLES2DecoderImpl::HandleRenderbufferStorageMultisampleEXT( |
| 2658 uint32 immediate_data_size, | 2575 uint32 immediate_data_size, |
| 2659 const gles2::RenderbufferStorageMultisampleEXT& c) { | 2576 const gles2::RenderbufferStorageMultisampleEXT& c) { |
| 2660 GLenum target = static_cast<GLenum>(c.target); | 2577 GLenum target = static_cast<GLenum>(c.target); |
| 2661 GLsizei samples = static_cast<GLsizei>(c.samples); | 2578 GLsizei samples = static_cast<GLsizei>(c.samples); |
| 2662 GLenum internalformat = static_cast<GLenum>(c.internalformat); | 2579 GLenum internalformat = static_cast<GLenum>(c.internalformat); |
| 2663 GLsizei width = static_cast<GLsizei>(c.width); | 2580 GLsizei width = static_cast<GLsizei>(c.width); |
| 2664 GLsizei height = static_cast<GLsizei>(c.height); | 2581 GLsizei height = static_cast<GLsizei>(c.height); |
| 2665 if (!validators_->render_buffer_target.IsValid(target)) { | 2582 if (!validators_->render_buffer_target.IsValid(target)) { |
| 2666 SetGLErrorInvalidEnum("glRenderbufferStorageMultisampleEXT", target, | 2583 SetGLErrorInvalidEnum("glRenderbufferStorageMultisampleEXT", target, |
| (...skipping 471 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3138 clear_state_dirty_ = true; | 3055 clear_state_dirty_ = true; |
| 3139 } | 3056 } |
| 3140 return false; | 3057 return false; |
| 3141 default: | 3058 default: |
| 3142 NOTREACHED(); | 3059 NOTREACHED(); |
| 3143 return false; | 3060 return false; |
| 3144 } | 3061 } |
| 3145 } | 3062 } |
| 3146 #endif // GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_AUTOGEN_H_ | 3063 #endif // GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_AUTOGEN_H_ |
| 3147 | 3064 |
| OLD | NEW |