| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 1 // This file is auto-generated. DO NOT EDIT! | 5 // This file is auto-generated. DO NOT EDIT! |
| 2 | 6 |
| 3 // It is included by gles2_cmd_decoder.cc | 7 // It is included by gles2_cmd_decoder.cc |
| 8 #ifndef GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_AUTOGEN_H_ |
| 9 #define GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_AUTOGEN_H_ |
| 4 | 10 |
| 5 parse_error::ParseError GLES2DecoderImpl::HandleActiveTexture( | 11 parse_error::ParseError GLES2DecoderImpl::HandleActiveTexture( |
| 6 uint32 immediate_data_size, const gles2::ActiveTexture& c) { | 12 uint32 immediate_data_size, const gles2::ActiveTexture& c) { |
| 7 GLenum texture = static_cast<GLenum>(c.texture); | 13 GLenum texture = static_cast<GLenum>(c.texture); |
| 8 glActiveTexture(texture); | 14 glActiveTexture(texture); |
| 9 return parse_error::kParseNoError; | 15 return parse_error::kParseNoError; |
| 10 } | 16 } |
| 11 | 17 |
| 12 parse_error::ParseError GLES2DecoderImpl::HandleAttachShader( | 18 parse_error::ParseError GLES2DecoderImpl::HandleAttachShader( |
| 13 uint32 immediate_data_size, const gles2::AttachShader& c) { | 19 uint32 immediate_data_size, const gles2::AttachShader& c) { |
| (...skipping 312 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 326 } | 332 } |
| 327 if (data == NULL) { | 333 if (data == NULL) { |
| 328 return parse_error::kParseOutOfBounds; | 334 return parse_error::kParseOutOfBounds; |
| 329 } | 335 } |
| 330 glCompressedTexSubImage2D( | 336 glCompressedTexSubImage2D( |
| 331 target, level, xoffset, yoffset, width, height, format, imageSize, data); | 337 target, level, xoffset, yoffset, width, height, format, imageSize, data); |
| 332 return parse_error::kParseNoError; | 338 return parse_error::kParseNoError; |
| 333 } | 339 } |
| 334 | 340 |
| 335 parse_error::ParseError GLES2DecoderImpl::HandleCompressedTexSubImage2DImmediate
( | 341 parse_error::ParseError GLES2DecoderImpl::HandleCompressedTexSubImage2DImmediate
( |
| 336 | |
| 337 uint32 immediate_data_size, | 342 uint32 immediate_data_size, |
| 338 const gles2::CompressedTexSubImage2DImmediate& c) { | 343 const gles2::CompressedTexSubImage2DImmediate& c) { |
| 339 GLenum target = static_cast<GLenum>(c.target); | 344 GLenum target = static_cast<GLenum>(c.target); |
| 340 GLint level = static_cast<GLint>(c.level); | 345 GLint level = static_cast<GLint>(c.level); |
| 341 GLint xoffset = static_cast<GLint>(c.xoffset); | 346 GLint xoffset = static_cast<GLint>(c.xoffset); |
| 342 GLint yoffset = static_cast<GLint>(c.yoffset); | 347 GLint yoffset = static_cast<GLint>(c.yoffset); |
| 343 GLsizei width = static_cast<GLsizei>(c.width); | 348 GLsizei width = static_cast<GLsizei>(c.width); |
| 344 GLsizei height = static_cast<GLsizei>(c.height); | 349 GLsizei height = static_cast<GLsizei>(c.height); |
| 345 GLenum format = static_cast<GLenum>(c.format); | 350 GLenum format = static_cast<GLenum>(c.format); |
| 346 GLsizei imageSize = static_cast<GLsizei>(c.imageSize); | 351 GLsizei imageSize = static_cast<GLsizei>(c.imageSize); |
| (...skipping 352 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 699 | 704 |
| 700 parse_error::ParseError GLES2DecoderImpl::HandleGenBuffers( | 705 parse_error::ParseError GLES2DecoderImpl::HandleGenBuffers( |
| 701 uint32 immediate_data_size, const gles2::GenBuffers& c) { | 706 uint32 immediate_data_size, const gles2::GenBuffers& c) { |
| 702 GLsizei n = static_cast<GLsizei>(c.n); | 707 GLsizei n = static_cast<GLsizei>(c.n); |
| 703 uint32 data_size = n * sizeof(GLuint); | 708 uint32 data_size = n * sizeof(GLuint); |
| 704 GLuint* buffers = GetSharedMemoryAs<GLuint*>( | 709 GLuint* buffers = GetSharedMemoryAs<GLuint*>( |
| 705 c.buffers_shm_id, c.buffers_shm_offset, data_size); | 710 c.buffers_shm_id, c.buffers_shm_offset, data_size); |
| 706 if (buffers == NULL) { | 711 if (buffers == NULL) { |
| 707 return parse_error::kParseOutOfBounds; | 712 return parse_error::kParseOutOfBounds; |
| 708 } | 713 } |
| 709 GenGLObjects<GLGenBuffersHelper>(n, buffers); | 714 if (!GenGLObjects<GLGenBuffersHelper>(n, buffers)) { |
| 715 return parse_error::kParseInvalidArguments; |
| 716 } |
| 710 return parse_error::kParseNoError; | 717 return parse_error::kParseNoError; |
| 711 } | 718 } |
| 712 | 719 |
| 713 parse_error::ParseError GLES2DecoderImpl::HandleGenBuffersImmediate( | 720 parse_error::ParseError GLES2DecoderImpl::HandleGenBuffersImmediate( |
| 714 uint32 immediate_data_size, const gles2::GenBuffersImmediate& c) { | 721 uint32 immediate_data_size, const gles2::GenBuffersImmediate& c) { |
| 715 GLsizei n = static_cast<GLsizei>(c.n); | 722 GLsizei n = static_cast<GLsizei>(c.n); |
| 716 uint32 data_size = n * sizeof(GLuint); | 723 uint32 data_size = n * sizeof(GLuint); |
| 717 GLuint* buffers = GetImmediateDataAs<GLuint*>( | 724 GLuint* buffers = GetImmediateDataAs<GLuint*>( |
| 718 c, data_size, immediate_data_size); | 725 c, data_size, immediate_data_size); |
| 719 if (buffers == NULL) { | 726 if (buffers == NULL) { |
| 720 return parse_error::kParseOutOfBounds; | 727 return parse_error::kParseOutOfBounds; |
| 721 } | 728 } |
| 722 GenGLObjects<GLGenBuffersHelper>(n, buffers); | 729 if (!GenGLObjects<GLGenBuffersHelper>(n, buffers)) { |
| 730 return parse_error::kParseInvalidArguments; |
| 731 } |
| 723 return parse_error::kParseNoError; | 732 return parse_error::kParseNoError; |
| 724 } | 733 } |
| 725 | 734 |
| 726 parse_error::ParseError GLES2DecoderImpl::HandleGenerateMipmap( | 735 parse_error::ParseError GLES2DecoderImpl::HandleGenerateMipmap( |
| 727 uint32 immediate_data_size, const gles2::GenerateMipmap& c) { | 736 uint32 immediate_data_size, const gles2::GenerateMipmap& c) { |
| 728 GLenum target = static_cast<GLenum>(c.target); | 737 GLenum target = static_cast<GLenum>(c.target); |
| 729 if (!ValidateGLenumTextureBindTarget(target)) { | 738 if (!ValidateGLenumTextureBindTarget(target)) { |
| 730 SetGLError(GL_INVALID_ENUM); | 739 SetGLError(GL_INVALID_ENUM); |
| 731 return parse_error::kParseNoError; | 740 return parse_error::kParseNoError; |
| 732 } | 741 } |
| 733 glGenerateMipmapEXT(target); | 742 glGenerateMipmapEXT(target); |
| 734 return parse_error::kParseNoError; | 743 return parse_error::kParseNoError; |
| 735 } | 744 } |
| 736 | 745 |
| 737 parse_error::ParseError GLES2DecoderImpl::HandleGenFramebuffers( | 746 parse_error::ParseError GLES2DecoderImpl::HandleGenFramebuffers( |
| 738 uint32 immediate_data_size, const gles2::GenFramebuffers& c) { | 747 uint32 immediate_data_size, const gles2::GenFramebuffers& c) { |
| 739 GLsizei n = static_cast<GLsizei>(c.n); | 748 GLsizei n = static_cast<GLsizei>(c.n); |
| 740 uint32 data_size = n * sizeof(GLuint); | 749 uint32 data_size = n * sizeof(GLuint); |
| 741 GLuint* framebuffers = GetSharedMemoryAs<GLuint*>( | 750 GLuint* framebuffers = GetSharedMemoryAs<GLuint*>( |
| 742 c.framebuffers_shm_id, c.framebuffers_shm_offset, data_size); | 751 c.framebuffers_shm_id, c.framebuffers_shm_offset, data_size); |
| 743 if (framebuffers == NULL) { | 752 if (framebuffers == NULL) { |
| 744 return parse_error::kParseOutOfBounds; | 753 return parse_error::kParseOutOfBounds; |
| 745 } | 754 } |
| 746 GenGLObjects<GLGenFramebuffersHelper>(n, framebuffers); | 755 if (!GenGLObjects<GLGenFramebuffersHelper>(n, framebuffers)) { |
| 756 return parse_error::kParseInvalidArguments; |
| 757 } |
| 747 return parse_error::kParseNoError; | 758 return parse_error::kParseNoError; |
| 748 } | 759 } |
| 749 | 760 |
| 750 parse_error::ParseError GLES2DecoderImpl::HandleGenFramebuffersImmediate( | 761 parse_error::ParseError GLES2DecoderImpl::HandleGenFramebuffersImmediate( |
| 751 uint32 immediate_data_size, const gles2::GenFramebuffersImmediate& c) { | 762 uint32 immediate_data_size, const gles2::GenFramebuffersImmediate& c) { |
| 752 GLsizei n = static_cast<GLsizei>(c.n); | 763 GLsizei n = static_cast<GLsizei>(c.n); |
| 753 uint32 data_size = n * sizeof(GLuint); | 764 uint32 data_size = n * sizeof(GLuint); |
| 754 GLuint* framebuffers = GetImmediateDataAs<GLuint*>( | 765 GLuint* framebuffers = GetImmediateDataAs<GLuint*>( |
| 755 c, data_size, immediate_data_size); | 766 c, data_size, immediate_data_size); |
| 756 if (framebuffers == NULL) { | 767 if (framebuffers == NULL) { |
| 757 return parse_error::kParseOutOfBounds; | 768 return parse_error::kParseOutOfBounds; |
| 758 } | 769 } |
| 759 GenGLObjects<GLGenFramebuffersHelper>(n, framebuffers); | 770 if (!GenGLObjects<GLGenFramebuffersHelper>(n, framebuffers)) { |
| 771 return parse_error::kParseInvalidArguments; |
| 772 } |
| 760 return parse_error::kParseNoError; | 773 return parse_error::kParseNoError; |
| 761 } | 774 } |
| 762 | 775 |
| 763 parse_error::ParseError GLES2DecoderImpl::HandleGenRenderbuffers( | 776 parse_error::ParseError GLES2DecoderImpl::HandleGenRenderbuffers( |
| 764 uint32 immediate_data_size, const gles2::GenRenderbuffers& c) { | 777 uint32 immediate_data_size, const gles2::GenRenderbuffers& c) { |
| 765 GLsizei n = static_cast<GLsizei>(c.n); | 778 GLsizei n = static_cast<GLsizei>(c.n); |
| 766 uint32 data_size = n * sizeof(GLuint); | 779 uint32 data_size = n * sizeof(GLuint); |
| 767 GLuint* renderbuffers = GetSharedMemoryAs<GLuint*>( | 780 GLuint* renderbuffers = GetSharedMemoryAs<GLuint*>( |
| 768 c.renderbuffers_shm_id, c.renderbuffers_shm_offset, data_size); | 781 c.renderbuffers_shm_id, c.renderbuffers_shm_offset, data_size); |
| 769 if (renderbuffers == NULL) { | 782 if (renderbuffers == NULL) { |
| 770 return parse_error::kParseOutOfBounds; | 783 return parse_error::kParseOutOfBounds; |
| 771 } | 784 } |
| 772 GenGLObjects<GLGenRenderbuffersHelper>(n, renderbuffers); | 785 if (!GenGLObjects<GLGenRenderbuffersHelper>(n, renderbuffers)) { |
| 786 return parse_error::kParseInvalidArguments; |
| 787 } |
| 773 return parse_error::kParseNoError; | 788 return parse_error::kParseNoError; |
| 774 } | 789 } |
| 775 | 790 |
| 776 parse_error::ParseError GLES2DecoderImpl::HandleGenRenderbuffersImmediate( | 791 parse_error::ParseError GLES2DecoderImpl::HandleGenRenderbuffersImmediate( |
| 777 uint32 immediate_data_size, const gles2::GenRenderbuffersImmediate& c) { | 792 uint32 immediate_data_size, const gles2::GenRenderbuffersImmediate& c) { |
| 778 GLsizei n = static_cast<GLsizei>(c.n); | 793 GLsizei n = static_cast<GLsizei>(c.n); |
| 779 uint32 data_size = n * sizeof(GLuint); | 794 uint32 data_size = n * sizeof(GLuint); |
| 780 GLuint* renderbuffers = GetImmediateDataAs<GLuint*>( | 795 GLuint* renderbuffers = GetImmediateDataAs<GLuint*>( |
| 781 c, data_size, immediate_data_size); | 796 c, data_size, immediate_data_size); |
| 782 if (renderbuffers == NULL) { | 797 if (renderbuffers == NULL) { |
| 783 return parse_error::kParseOutOfBounds; | 798 return parse_error::kParseOutOfBounds; |
| 784 } | 799 } |
| 785 GenGLObjects<GLGenRenderbuffersHelper>(n, renderbuffers); | 800 if (!GenGLObjects<GLGenRenderbuffersHelper>(n, renderbuffers)) { |
| 801 return parse_error::kParseInvalidArguments; |
| 802 } |
| 786 return parse_error::kParseNoError; | 803 return parse_error::kParseNoError; |
| 787 } | 804 } |
| 788 | 805 |
| 789 parse_error::ParseError GLES2DecoderImpl::HandleGenTextures( | 806 parse_error::ParseError GLES2DecoderImpl::HandleGenTextures( |
| 790 uint32 immediate_data_size, const gles2::GenTextures& c) { | 807 uint32 immediate_data_size, const gles2::GenTextures& c) { |
| 791 GLsizei n = static_cast<GLsizei>(c.n); | 808 GLsizei n = static_cast<GLsizei>(c.n); |
| 792 uint32 data_size = n * sizeof(GLuint); | 809 uint32 data_size = n * sizeof(GLuint); |
| 793 GLuint* textures = GetSharedMemoryAs<GLuint*>( | 810 GLuint* textures = GetSharedMemoryAs<GLuint*>( |
| 794 c.textures_shm_id, c.textures_shm_offset, data_size); | 811 c.textures_shm_id, c.textures_shm_offset, data_size); |
| 795 if (textures == NULL) { | 812 if (textures == NULL) { |
| 796 return parse_error::kParseOutOfBounds; | 813 return parse_error::kParseOutOfBounds; |
| 797 } | 814 } |
| 798 GenGLObjects<GLGenTexturesHelper>(n, textures); | 815 if (!GenGLObjects<GLGenTexturesHelper>(n, textures)) { |
| 816 return parse_error::kParseInvalidArguments; |
| 817 } |
| 799 return parse_error::kParseNoError; | 818 return parse_error::kParseNoError; |
| 800 } | 819 } |
| 801 | 820 |
| 802 parse_error::ParseError GLES2DecoderImpl::HandleGenTexturesImmediate( | 821 parse_error::ParseError GLES2DecoderImpl::HandleGenTexturesImmediate( |
| 803 uint32 immediate_data_size, const gles2::GenTexturesImmediate& c) { | 822 uint32 immediate_data_size, const gles2::GenTexturesImmediate& c) { |
| 804 GLsizei n = static_cast<GLsizei>(c.n); | 823 GLsizei n = static_cast<GLsizei>(c.n); |
| 805 uint32 data_size = n * sizeof(GLuint); | 824 uint32 data_size = n * sizeof(GLuint); |
| 806 GLuint* textures = GetImmediateDataAs<GLuint*>( | 825 GLuint* textures = GetImmediateDataAs<GLuint*>( |
| 807 c, data_size, immediate_data_size); | 826 c, data_size, immediate_data_size); |
| 808 if (textures == NULL) { | 827 if (textures == NULL) { |
| 809 return parse_error::kParseOutOfBounds; | 828 return parse_error::kParseOutOfBounds; |
| 810 } | 829 } |
| 811 GenGLObjects<GLGenTexturesHelper>(n, textures); | 830 if (!GenGLObjects<GLGenTexturesHelper>(n, textures)) { |
| 831 return parse_error::kParseInvalidArguments; |
| 832 } |
| 812 return parse_error::kParseNoError; | 833 return parse_error::kParseNoError; |
| 813 } | 834 } |
| 814 | 835 |
| 815 parse_error::ParseError GLES2DecoderImpl::HandleGetBooleanv( | 836 parse_error::ParseError GLES2DecoderImpl::HandleGetBooleanv( |
| 816 uint32 immediate_data_size, const gles2::GetBooleanv& c) { | 837 uint32 immediate_data_size, const gles2::GetBooleanv& c) { |
| 817 GLenum pname = static_cast<GLenum>(c.pname); | 838 GLenum pname = static_cast<GLenum>(c.pname); |
| 818 GLboolean* params; | 839 GLboolean* params; |
| 819 GLsizei num_values = util_.GLGetNumValuesReturned(pname); | 840 GLsizei num_values = util_.GLGetNumValuesReturned(pname); |
| 820 uint32 params_size = num_values * sizeof(*params); | 841 uint32 params_size = num_values * sizeof(*params); |
| 821 params = GetSharedMemoryAs<GLboolean*>( | 842 params = GetSharedMemoryAs<GLboolean*>( |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 868 params = GetSharedMemoryAs<GLfloat*>( | 889 params = GetSharedMemoryAs<GLfloat*>( |
| 869 c.params_shm_id, c.params_shm_offset, params_size); | 890 c.params_shm_id, c.params_shm_offset, params_size); |
| 870 if (params == NULL) { | 891 if (params == NULL) { |
| 871 return parse_error::kParseOutOfBounds; | 892 return parse_error::kParseOutOfBounds; |
| 872 } | 893 } |
| 873 glGetFloatv(pname, params); | 894 glGetFloatv(pname, params); |
| 874 return parse_error::kParseNoError; | 895 return parse_error::kParseNoError; |
| 875 } | 896 } |
| 876 | 897 |
| 877 parse_error::ParseError GLES2DecoderImpl::HandleGetFramebufferAttachmentParamete
riv( | 898 parse_error::ParseError GLES2DecoderImpl::HandleGetFramebufferAttachmentParamete
riv( |
| 878 | |
| 879 uint32 immediate_data_size, | 899 uint32 immediate_data_size, |
| 880 const gles2::GetFramebufferAttachmentParameteriv& c) { | 900 const gles2::GetFramebufferAttachmentParameteriv& c) { |
| 881 GLenum target = static_cast<GLenum>(c.target); | 901 GLenum target = static_cast<GLenum>(c.target); |
| 882 GLenum attachment = static_cast<GLenum>(c.attachment); | 902 GLenum attachment = static_cast<GLenum>(c.attachment); |
| 883 GLenum pname = static_cast<GLenum>(c.pname); | 903 GLenum pname = static_cast<GLenum>(c.pname); |
| 884 GLint* params; | 904 GLint* params; |
| 885 GLsizei num_values = util_.GLGetNumValuesReturned(pname); | 905 GLsizei num_values = util_.GLGetNumValuesReturned(pname); |
| 886 uint32 params_size = num_values * sizeof(*params); | 906 uint32 params_size = num_values * sizeof(*params); |
| 887 params = GetSharedMemoryAs<GLint*>( | 907 params = GetSharedMemoryAs<GLint*>( |
| 888 c.params_shm_id, c.params_shm_offset, params_size); | 908 c.params_shm_id, c.params_shm_offset, params_size); |
| (...skipping 1061 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1950 | 1970 |
| 1951 parse_error::ParseError GLES2DecoderImpl::HandleUniformMatrix2fv( | 1971 parse_error::ParseError GLES2DecoderImpl::HandleUniformMatrix2fv( |
| 1952 uint32 immediate_data_size, const gles2::UniformMatrix2fv& c) { | 1972 uint32 immediate_data_size, const gles2::UniformMatrix2fv& c) { |
| 1953 GLint location = static_cast<GLint>(c.location); | 1973 GLint location = static_cast<GLint>(c.location); |
| 1954 GLsizei count = static_cast<GLsizei>(c.count); | 1974 GLsizei count = static_cast<GLsizei>(c.count); |
| 1955 GLboolean transpose = static_cast<GLboolean>(c.transpose); | 1975 GLboolean transpose = static_cast<GLboolean>(c.transpose); |
| 1956 uint32 data_size = | 1976 uint32 data_size = |
| 1957 ComputeImmediateDataSize(immediate_data_size, 1, sizeof(GLfloat), 4); | 1977 ComputeImmediateDataSize(immediate_data_size, 1, sizeof(GLfloat), 4); |
| 1958 const GLfloat* value = GetSharedMemoryAs<const GLfloat*>( | 1978 const GLfloat* value = GetSharedMemoryAs<const GLfloat*>( |
| 1959 c.value_shm_id, c.value_shm_offset, data_size); | 1979 c.value_shm_id, c.value_shm_offset, data_size); |
| 1980 if (!ValidateGLbooleanFalse(transpose)) { |
| 1981 SetGLError(GL_INVALID_VALUE); |
| 1982 return parse_error::kParseNoError; |
| 1983 } |
| 1960 if (value == NULL) { | 1984 if (value == NULL) { |
| 1961 return parse_error::kParseOutOfBounds; | 1985 return parse_error::kParseOutOfBounds; |
| 1962 } | 1986 } |
| 1963 glUniformMatrix2fv(location, count, transpose, value); | 1987 glUniformMatrix2fv(location, count, transpose, value); |
| 1964 return parse_error::kParseNoError; | 1988 return parse_error::kParseNoError; |
| 1965 } | 1989 } |
| 1966 | 1990 |
| 1967 parse_error::ParseError GLES2DecoderImpl::HandleUniformMatrix2fvImmediate( | 1991 parse_error::ParseError GLES2DecoderImpl::HandleUniformMatrix2fvImmediate( |
| 1968 uint32 immediate_data_size, const gles2::UniformMatrix2fvImmediate& c) { | 1992 uint32 immediate_data_size, const gles2::UniformMatrix2fvImmediate& c) { |
| 1969 GLint location = static_cast<GLint>(c.location); | 1993 GLint location = static_cast<GLint>(c.location); |
| 1970 GLsizei count = static_cast<GLsizei>(c.count); | 1994 GLsizei count = static_cast<GLsizei>(c.count); |
| 1971 GLboolean transpose = static_cast<GLboolean>(c.transpose); | 1995 GLboolean transpose = static_cast<GLboolean>(c.transpose); |
| 1972 uint32 data_size = | 1996 uint32 data_size = |
| 1973 ComputeImmediateDataSize(immediate_data_size, 1, sizeof(GLfloat), 4); | 1997 ComputeImmediateDataSize(immediate_data_size, 1, sizeof(GLfloat), 4); |
| 1974 const GLfloat* value = GetImmediateDataAs<const GLfloat*>( | 1998 const GLfloat* value = GetImmediateDataAs<const GLfloat*>( |
| 1975 c, data_size, immediate_data_size); | 1999 c, data_size, immediate_data_size); |
| 2000 if (!ValidateGLbooleanFalse(transpose)) { |
| 2001 SetGLError(GL_INVALID_VALUE); |
| 2002 return parse_error::kParseNoError; |
| 2003 } |
| 1976 if (value == NULL) { | 2004 if (value == NULL) { |
| 1977 return parse_error::kParseOutOfBounds; | 2005 return parse_error::kParseOutOfBounds; |
| 1978 } | 2006 } |
| 1979 glUniformMatrix2fv(location, count, transpose, value); | 2007 glUniformMatrix2fv(location, count, transpose, value); |
| 1980 return parse_error::kParseNoError; | 2008 return parse_error::kParseNoError; |
| 1981 } | 2009 } |
| 1982 | 2010 |
| 1983 parse_error::ParseError GLES2DecoderImpl::HandleUniformMatrix3fv( | 2011 parse_error::ParseError GLES2DecoderImpl::HandleUniformMatrix3fv( |
| 1984 uint32 immediate_data_size, const gles2::UniformMatrix3fv& c) { | 2012 uint32 immediate_data_size, const gles2::UniformMatrix3fv& c) { |
| 1985 GLint location = static_cast<GLint>(c.location); | 2013 GLint location = static_cast<GLint>(c.location); |
| 1986 GLsizei count = static_cast<GLsizei>(c.count); | 2014 GLsizei count = static_cast<GLsizei>(c.count); |
| 1987 GLboolean transpose = static_cast<GLboolean>(c.transpose); | 2015 GLboolean transpose = static_cast<GLboolean>(c.transpose); |
| 1988 uint32 data_size = | 2016 uint32 data_size = |
| 1989 ComputeImmediateDataSize(immediate_data_size, 1, sizeof(GLfloat), 9); | 2017 ComputeImmediateDataSize(immediate_data_size, 1, sizeof(GLfloat), 9); |
| 1990 const GLfloat* value = GetSharedMemoryAs<const GLfloat*>( | 2018 const GLfloat* value = GetSharedMemoryAs<const GLfloat*>( |
| 1991 c.value_shm_id, c.value_shm_offset, data_size); | 2019 c.value_shm_id, c.value_shm_offset, data_size); |
| 2020 if (!ValidateGLbooleanFalse(transpose)) { |
| 2021 SetGLError(GL_INVALID_VALUE); |
| 2022 return parse_error::kParseNoError; |
| 2023 } |
| 1992 if (value == NULL) { | 2024 if (value == NULL) { |
| 1993 return parse_error::kParseOutOfBounds; | 2025 return parse_error::kParseOutOfBounds; |
| 1994 } | 2026 } |
| 1995 glUniformMatrix3fv(location, count, transpose, value); | 2027 glUniformMatrix3fv(location, count, transpose, value); |
| 1996 return parse_error::kParseNoError; | 2028 return parse_error::kParseNoError; |
| 1997 } | 2029 } |
| 1998 | 2030 |
| 1999 parse_error::ParseError GLES2DecoderImpl::HandleUniformMatrix3fvImmediate( | 2031 parse_error::ParseError GLES2DecoderImpl::HandleUniformMatrix3fvImmediate( |
| 2000 uint32 immediate_data_size, const gles2::UniformMatrix3fvImmediate& c) { | 2032 uint32 immediate_data_size, const gles2::UniformMatrix3fvImmediate& c) { |
| 2001 GLint location = static_cast<GLint>(c.location); | 2033 GLint location = static_cast<GLint>(c.location); |
| 2002 GLsizei count = static_cast<GLsizei>(c.count); | 2034 GLsizei count = static_cast<GLsizei>(c.count); |
| 2003 GLboolean transpose = static_cast<GLboolean>(c.transpose); | 2035 GLboolean transpose = static_cast<GLboolean>(c.transpose); |
| 2004 uint32 data_size = | 2036 uint32 data_size = |
| 2005 ComputeImmediateDataSize(immediate_data_size, 1, sizeof(GLfloat), 9); | 2037 ComputeImmediateDataSize(immediate_data_size, 1, sizeof(GLfloat), 9); |
| 2006 const GLfloat* value = GetImmediateDataAs<const GLfloat*>( | 2038 const GLfloat* value = GetImmediateDataAs<const GLfloat*>( |
| 2007 c, data_size, immediate_data_size); | 2039 c, data_size, immediate_data_size); |
| 2040 if (!ValidateGLbooleanFalse(transpose)) { |
| 2041 SetGLError(GL_INVALID_VALUE); |
| 2042 return parse_error::kParseNoError; |
| 2043 } |
| 2008 if (value == NULL) { | 2044 if (value == NULL) { |
| 2009 return parse_error::kParseOutOfBounds; | 2045 return parse_error::kParseOutOfBounds; |
| 2010 } | 2046 } |
| 2011 glUniformMatrix3fv(location, count, transpose, value); | 2047 glUniformMatrix3fv(location, count, transpose, value); |
| 2012 return parse_error::kParseNoError; | 2048 return parse_error::kParseNoError; |
| 2013 } | 2049 } |
| 2014 | 2050 |
| 2015 parse_error::ParseError GLES2DecoderImpl::HandleUniformMatrix4fv( | 2051 parse_error::ParseError GLES2DecoderImpl::HandleUniformMatrix4fv( |
| 2016 uint32 immediate_data_size, const gles2::UniformMatrix4fv& c) { | 2052 uint32 immediate_data_size, const gles2::UniformMatrix4fv& c) { |
| 2017 GLint location = static_cast<GLint>(c.location); | 2053 GLint location = static_cast<GLint>(c.location); |
| 2018 GLsizei count = static_cast<GLsizei>(c.count); | 2054 GLsizei count = static_cast<GLsizei>(c.count); |
| 2019 GLboolean transpose = static_cast<GLboolean>(c.transpose); | 2055 GLboolean transpose = static_cast<GLboolean>(c.transpose); |
| 2020 uint32 data_size = | 2056 uint32 data_size = |
| 2021 ComputeImmediateDataSize(immediate_data_size, 1, sizeof(GLfloat), 16); | 2057 ComputeImmediateDataSize(immediate_data_size, 1, sizeof(GLfloat), 16); |
| 2022 const GLfloat* value = GetSharedMemoryAs<const GLfloat*>( | 2058 const GLfloat* value = GetSharedMemoryAs<const GLfloat*>( |
| 2023 c.value_shm_id, c.value_shm_offset, data_size); | 2059 c.value_shm_id, c.value_shm_offset, data_size); |
| 2060 if (!ValidateGLbooleanFalse(transpose)) { |
| 2061 SetGLError(GL_INVALID_VALUE); |
| 2062 return parse_error::kParseNoError; |
| 2063 } |
| 2024 if (value == NULL) { | 2064 if (value == NULL) { |
| 2025 return parse_error::kParseOutOfBounds; | 2065 return parse_error::kParseOutOfBounds; |
| 2026 } | 2066 } |
| 2027 glUniformMatrix4fv(location, count, transpose, value); | 2067 glUniformMatrix4fv(location, count, transpose, value); |
| 2028 return parse_error::kParseNoError; | 2068 return parse_error::kParseNoError; |
| 2029 } | 2069 } |
| 2030 | 2070 |
| 2031 parse_error::ParseError GLES2DecoderImpl::HandleUniformMatrix4fvImmediate( | 2071 parse_error::ParseError GLES2DecoderImpl::HandleUniformMatrix4fvImmediate( |
| 2032 uint32 immediate_data_size, const gles2::UniformMatrix4fvImmediate& c) { | 2072 uint32 immediate_data_size, const gles2::UniformMatrix4fvImmediate& c) { |
| 2033 GLint location = static_cast<GLint>(c.location); | 2073 GLint location = static_cast<GLint>(c.location); |
| 2034 GLsizei count = static_cast<GLsizei>(c.count); | 2074 GLsizei count = static_cast<GLsizei>(c.count); |
| 2035 GLboolean transpose = static_cast<GLboolean>(c.transpose); | 2075 GLboolean transpose = static_cast<GLboolean>(c.transpose); |
| 2036 uint32 data_size = | 2076 uint32 data_size = |
| 2037 ComputeImmediateDataSize(immediate_data_size, 1, sizeof(GLfloat), 16); | 2077 ComputeImmediateDataSize(immediate_data_size, 1, sizeof(GLfloat), 16); |
| 2038 const GLfloat* value = GetImmediateDataAs<const GLfloat*>( | 2078 const GLfloat* value = GetImmediateDataAs<const GLfloat*>( |
| 2039 c, data_size, immediate_data_size); | 2079 c, data_size, immediate_data_size); |
| 2080 if (!ValidateGLbooleanFalse(transpose)) { |
| 2081 SetGLError(GL_INVALID_VALUE); |
| 2082 return parse_error::kParseNoError; |
| 2083 } |
| 2040 if (value == NULL) { | 2084 if (value == NULL) { |
| 2041 return parse_error::kParseOutOfBounds; | 2085 return parse_error::kParseOutOfBounds; |
| 2042 } | 2086 } |
| 2043 glUniformMatrix4fv(location, count, transpose, value); | 2087 glUniformMatrix4fv(location, count, transpose, value); |
| 2044 return parse_error::kParseNoError; | 2088 return parse_error::kParseNoError; |
| 2045 } | 2089 } |
| 2046 | 2090 |
| 2047 parse_error::ParseError GLES2DecoderImpl::HandleUseProgram( | 2091 parse_error::ParseError GLES2DecoderImpl::HandleUseProgram( |
| 2048 uint32 immediate_data_size, const gles2::UseProgram& c) { | 2092 uint32 immediate_data_size, const gles2::UseProgram& c) { |
| 2049 GLuint program; | 2093 GLuint program; |
| (...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2225 glViewport(x, y, width, height); | 2269 glViewport(x, y, width, height); |
| 2226 return parse_error::kParseNoError; | 2270 return parse_error::kParseNoError; |
| 2227 } | 2271 } |
| 2228 | 2272 |
| 2229 parse_error::ParseError GLES2DecoderImpl::HandleSwapBuffers( | 2273 parse_error::ParseError GLES2DecoderImpl::HandleSwapBuffers( |
| 2230 uint32 immediate_data_size, const gles2::SwapBuffers& c) { | 2274 uint32 immediate_data_size, const gles2::SwapBuffers& c) { |
| 2231 DoSwapBuffers(); | 2275 DoSwapBuffers(); |
| 2232 return parse_error::kParseNoError; | 2276 return parse_error::kParseNoError; |
| 2233 } | 2277 } |
| 2234 | 2278 |
| 2279 #endif // GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_AUTOGEN_H_ |
| 2280 |
| OLD | NEW |