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 576 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
587 if (height < 0) { | 587 if (height < 0) { |
588 LOCAL_SET_GL_ERROR(GL_INVALID_VALUE, "glCompressedTexImage2D", | 588 LOCAL_SET_GL_ERROR(GL_INVALID_VALUE, "glCompressedTexImage2D", |
589 "height < 0"); | 589 "height < 0"); |
590 return error::kNoError; | 590 return error::kNoError; |
591 } | 591 } |
592 if (imageSize < 0) { | 592 if (imageSize < 0) { |
593 LOCAL_SET_GL_ERROR(GL_INVALID_VALUE, "glCompressedTexImage2D", | 593 LOCAL_SET_GL_ERROR(GL_INVALID_VALUE, "glCompressedTexImage2D", |
594 "imageSize < 0"); | 594 "imageSize < 0"); |
595 return error::kNoError; | 595 return error::kNoError; |
596 } | 596 } |
597 DoCompressedTexImage2D(target, level, internalformat, width, height, border, | 597 error::Error error = DoCompressedTexImage2D( |
598 imageSize, data); | 598 target, level, internalformat, width, height, border, imageSize, data); |
| 599 if (error != error::kNoError) |
| 600 return error; |
599 return error::kNoError; | 601 return error::kNoError; |
600 } | 602 } |
601 | 603 |
602 error::Error GLES2DecoderImpl::HandleCompressedTexImage2D( | 604 error::Error GLES2DecoderImpl::HandleCompressedTexImage2D( |
603 uint32_t immediate_data_size, | 605 uint32_t immediate_data_size, |
604 const void* cmd_data) { | 606 const void* cmd_data) { |
605 const gles2::cmds::CompressedTexImage2D& c = | 607 const gles2::cmds::CompressedTexImage2D& c = |
606 *static_cast<const gles2::cmds::CompressedTexImage2D*>(cmd_data); | 608 *static_cast<const gles2::cmds::CompressedTexImage2D*>(cmd_data); |
607 (void)c; | 609 (void)c; |
608 GLenum target = static_cast<GLenum>(c.target); | 610 GLenum target = static_cast<GLenum>(c.target); |
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
682 if (!validators_->compressed_texture_format.IsValid(format)) { | 684 if (!validators_->compressed_texture_format.IsValid(format)) { |
683 LOCAL_SET_GL_ERROR_INVALID_ENUM("glCompressedTexSubImage2D", format, | 685 LOCAL_SET_GL_ERROR_INVALID_ENUM("glCompressedTexSubImage2D", format, |
684 "format"); | 686 "format"); |
685 return error::kNoError; | 687 return error::kNoError; |
686 } | 688 } |
687 if (imageSize < 0) { | 689 if (imageSize < 0) { |
688 LOCAL_SET_GL_ERROR(GL_INVALID_VALUE, "glCompressedTexSubImage2D", | 690 LOCAL_SET_GL_ERROR(GL_INVALID_VALUE, "glCompressedTexSubImage2D", |
689 "imageSize < 0"); | 691 "imageSize < 0"); |
690 return error::kNoError; | 692 return error::kNoError; |
691 } | 693 } |
692 DoCompressedTexSubImage2D(target, level, xoffset, yoffset, width, height, | 694 error::Error error = DoCompressedTexSubImage2D( |
693 format, imageSize, data); | 695 target, level, xoffset, yoffset, width, height, format, imageSize, data); |
| 696 if (error != error::kNoError) |
| 697 return error; |
694 return error::kNoError; | 698 return error::kNoError; |
695 } | 699 } |
696 | 700 |
697 error::Error GLES2DecoderImpl::HandleCompressedTexSubImage2D( | 701 error::Error GLES2DecoderImpl::HandleCompressedTexSubImage2D( |
698 uint32_t immediate_data_size, | 702 uint32_t immediate_data_size, |
699 const void* cmd_data) { | 703 const void* cmd_data) { |
700 const gles2::cmds::CompressedTexSubImage2D& c = | 704 const gles2::cmds::CompressedTexSubImage2D& c = |
701 *static_cast<const gles2::cmds::CompressedTexSubImage2D*>(cmd_data); | 705 *static_cast<const gles2::cmds::CompressedTexSubImage2D*>(cmd_data); |
702 (void)c; | 706 (void)c; |
703 GLenum target = static_cast<GLenum>(c.target); | 707 GLenum target = static_cast<GLenum>(c.target); |
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
787 } | 791 } |
788 if (depth < 0) { | 792 if (depth < 0) { |
789 LOCAL_SET_GL_ERROR(GL_INVALID_VALUE, "glCompressedTexImage3D", "depth < 0"); | 793 LOCAL_SET_GL_ERROR(GL_INVALID_VALUE, "glCompressedTexImage3D", "depth < 0"); |
790 return error::kNoError; | 794 return error::kNoError; |
791 } | 795 } |
792 if (imageSize < 0) { | 796 if (imageSize < 0) { |
793 LOCAL_SET_GL_ERROR(GL_INVALID_VALUE, "glCompressedTexImage3D", | 797 LOCAL_SET_GL_ERROR(GL_INVALID_VALUE, "glCompressedTexImage3D", |
794 "imageSize < 0"); | 798 "imageSize < 0"); |
795 return error::kNoError; | 799 return error::kNoError; |
796 } | 800 } |
797 DoCompressedTexImage3D(target, level, internalformat, width, height, depth, | 801 error::Error error = |
798 border, imageSize, data); | 802 DoCompressedTexImage3D(target, level, internalformat, width, height, |
| 803 depth, border, imageSize, data); |
| 804 if (error != error::kNoError) |
| 805 return error; |
799 return error::kNoError; | 806 return error::kNoError; |
800 } | 807 } |
801 | 808 |
802 error::Error GLES2DecoderImpl::HandleCompressedTexImage3D( | 809 error::Error GLES2DecoderImpl::HandleCompressedTexImage3D( |
803 uint32_t immediate_data_size, | 810 uint32_t immediate_data_size, |
804 const void* cmd_data) { | 811 const void* cmd_data) { |
805 if (!unsafe_es3_apis_enabled()) | 812 if (!unsafe_es3_apis_enabled()) |
806 return error::kUnknownCommand; | 813 return error::kUnknownCommand; |
807 const gles2::cmds::CompressedTexImage3D& c = | 814 const gles2::cmds::CompressedTexImage3D& c = |
808 *static_cast<const gles2::cmds::CompressedTexImage3D*>(cmd_data); | 815 *static_cast<const gles2::cmds::CompressedTexImage3D*>(cmd_data); |
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
898 if (!validators_->compressed_texture_format.IsValid(format)) { | 905 if (!validators_->compressed_texture_format.IsValid(format)) { |
899 LOCAL_SET_GL_ERROR_INVALID_ENUM("glCompressedTexSubImage3D", format, | 906 LOCAL_SET_GL_ERROR_INVALID_ENUM("glCompressedTexSubImage3D", format, |
900 "format"); | 907 "format"); |
901 return error::kNoError; | 908 return error::kNoError; |
902 } | 909 } |
903 if (imageSize < 0) { | 910 if (imageSize < 0) { |
904 LOCAL_SET_GL_ERROR(GL_INVALID_VALUE, "glCompressedTexSubImage3D", | 911 LOCAL_SET_GL_ERROR(GL_INVALID_VALUE, "glCompressedTexSubImage3D", |
905 "imageSize < 0"); | 912 "imageSize < 0"); |
906 return error::kNoError; | 913 return error::kNoError; |
907 } | 914 } |
908 DoCompressedTexSubImage3D(target, level, xoffset, yoffset, zoffset, width, | 915 error::Error error = |
909 height, depth, format, imageSize, data); | 916 DoCompressedTexSubImage3D(target, level, xoffset, yoffset, zoffset, width, |
| 917 height, depth, format, imageSize, data); |
| 918 if (error != error::kNoError) |
| 919 return error; |
910 return error::kNoError; | 920 return error::kNoError; |
911 } | 921 } |
912 | 922 |
913 error::Error GLES2DecoderImpl::HandleCompressedTexSubImage3D( | 923 error::Error GLES2DecoderImpl::HandleCompressedTexSubImage3D( |
914 uint32_t immediate_data_size, | 924 uint32_t immediate_data_size, |
915 const void* cmd_data) { | 925 const void* cmd_data) { |
916 if (!unsafe_es3_apis_enabled()) | 926 if (!unsafe_es3_apis_enabled()) |
917 return error::kUnknownCommand; | 927 return error::kUnknownCommand; |
918 const gles2::cmds::CompressedTexSubImage3D& c = | 928 const gles2::cmds::CompressedTexSubImage3D& c = |
919 *static_cast<const gles2::cmds::CompressedTexSubImage3D*>(cmd_data); | 929 *static_cast<const gles2::cmds::CompressedTexSubImage3D*>(cmd_data); |
(...skipping 4705 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5625 state_.enable_flags.cached_sample_alpha_to_one_ext = enabled; | 5635 state_.enable_flags.cached_sample_alpha_to_one_ext = enabled; |
5626 return true; | 5636 return true; |
5627 } | 5637 } |
5628 return false; | 5638 return false; |
5629 default: | 5639 default: |
5630 NOTREACHED(); | 5640 NOTREACHED(); |
5631 return false; | 5641 return false; |
5632 } | 5642 } |
5633 } | 5643 } |
5634 #endif // GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_AUTOGEN_H_ | 5644 #endif // GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_AUTOGEN_H_ |
OLD | NEW |