 Chromium Code Reviews
 Chromium Code Reviews Issue 8772033:
  Adds support for the GL_ANGLE_texture_usage and GL_EXT_texture_storage  (Closed) 
  Base URL: svn://chrome-svn/chrome/trunk/src/
    
  
    Issue 8772033:
  Adds support for the GL_ANGLE_texture_usage and GL_EXT_texture_storage  (Closed) 
  Base URL: svn://chrome-svn/chrome/trunk/src/| OLD | NEW | 
|---|---|
| 1 #!/usr/bin/env python | 1 #!/usr/bin/env python | 
| 2 # Copyright (c) 2011 The Chromium Authors. All rights reserved. | 2 # Copyright (c) 2011 The Chromium Authors. All rights reserved. | 
| 3 # Use of this source code is governed by a BSD-style license that can be | 3 # Use of this source code is governed by a BSD-style license that can be | 
| 4 # found in the LICENSE file. | 4 # found in the LICENSE file. | 
| 5 | 5 | 
| 6 """code generator for GLES2 command buffers.""" | 6 """code generator for GLES2 command buffers.""" | 
| 7 | 7 | 
| 8 import os | 8 import os | 
| 9 import os.path | 9 import os.path | 
| 10 import sys | 10 import sys | 
| (...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 194 GL_APICALL void GL_APIENTRY glVertexAttrib2f (GLuint indx, GLfloat x, GL float y); | 194 GL_APICALL void GL_APIENTRY glVertexAttrib2f (GLuint indx, GLfloat x, GL float y); | 
| 195 GL_APICALL void GL_APIENTRY glVertexAttrib2fv (GLuint indx, const GLfloa t* values); | 195 GL_APICALL void GL_APIENTRY glVertexAttrib2fv (GLuint indx, const GLfloa t* values); | 
| 196 GL_APICALL void GL_APIENTRY glVertexAttrib3f (GLuint indx, GLfloat x, GL float y, GLfloat z); | 196 GL_APICALL void GL_APIENTRY glVertexAttrib3f (GLuint indx, GLfloat x, GL float y, GLfloat z); | 
| 197 GL_APICALL void GL_APIENTRY glVertexAttrib3fv (GLuint indx, const GLfloa t* values); | 197 GL_APICALL void GL_APIENTRY glVertexAttrib3fv (GLuint indx, const GLfloa t* values); | 
| 198 GL_APICALL void GL_APIENTRY glVertexAttrib4f (GLuint indx, GLfloat x, GL float y, GLfloat z, GLfloat w); | 198 GL_APICALL void GL_APIENTRY glVertexAttrib4f (GLuint indx, GLfloat x, GL float y, GLfloat z, GLfloat w); | 
| 199 GL_APICALL void GL_APIENTRY glVertexAttrib4fv (GLuint indx, const GLfloa t* values); | 199 GL_APICALL void GL_APIENTRY glVertexAttrib4fv (GLuint indx, const GLfloa t* values); | 
| 200 GL_APICALL void GL_APIENTRY glVertexAttribPointer (GLuint indx, GLintVer texAttribSize size, GLenumVertexAttribType type, GLboolean normalized, GLsizei s tride, const void* ptr); | 200 GL_APICALL void GL_APIENTRY glVertexAttribPointer (GLuint indx, GLintVer texAttribSize size, GLenumVertexAttribType type, GLboolean normalized, GLsizei s tride, const void* ptr); | 
| 201 GL_APICALL void GL_APIENTRY glViewport (GLint x, GLint y, GLsizei width, GLsizei height); | 201 GL_APICALL void GL_APIENTRY glViewport (GLint x, GLint y, GLsizei width, GLsizei height); | 
| 202 GL_APICALL void GL_APIENTRY glBlitFramebufferEXT (GLint srcX0, GLint src Y0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1 , GLbitfield mask, GLenumBlitFilter filter); | 202 GL_APICALL void GL_APIENTRY glBlitFramebufferEXT (GLint srcX0, GLint src Y0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1 , GLbitfield mask, GLenumBlitFilter filter); | 
| 203 GL_APICALL void GL_APIENTRY glRenderbufferStorageMultisampleEXT (GLenumR enderBufferTarget target, GLsizei samples, GLenumRenderBufferFormat internalform at, GLsizei width, GLsizei height); | 203 GL_APICALL void GL_APIENTRY glRenderbufferStorageMultisampleEXT (GLenumR enderBufferTarget target, GLsizei samples, GLenumRenderBufferFormat internalform at, GLsizei width, GLsizei height); | 
| 204 GL_APICALL void GL_APIENTRY glTexStorage2DEXT (GLenumTextureTarget targe t, GLsizei levels, GLintTextureInternalFormatStorage internalFormat, GLsizei wid th, GLsizei height); | |
| 204 // Non-GL commands. | 205 // Non-GL commands. | 
| 205 GL_APICALL void GL_APIENTRY glSwapBuffers (void); | 206 GL_APICALL void GL_APIENTRY glSwapBuffers (void); | 
| 206 GL_APICALL GLuint GL_APIENTRY glGetMaxValueInBufferCHROMIUM (GLidBuffer bu ffer_id, GLsizei count, GLenumGetMaxIndexType type, GLuint offset); | 207 GL_APICALL GLuint GL_APIENTRY glGetMaxValueInBufferCHROMIUM (GLidBuffer bu ffer_id, GLsizei count, GLenumGetMaxIndexType type, GLuint offset); | 
| 207 GL_APICALL void GL_APIENTRY glGenSharedIdsCHROMIUM (GLuint namespace_id, GLuint id_offset, GLsizeiNotNegative n, GLuint* ids); | 208 GL_APICALL void GL_APIENTRY glGenSharedIdsCHROMIUM (GLuint namespace_id, GLuint id_offset, GLsizeiNotNegative n, GLuint* ids); | 
| 208 GL_APICALL void GL_APIENTRY glDeleteSharedIdsCHROMIUM (GLuint namespace_ id, GLsizeiNotNegative n, const GLuint* ids); | 209 GL_APICALL void GL_APIENTRY glDeleteSharedIdsCHROMIUM (GLuint namespace_ id, GLsizeiNotNegative n, const GLuint* ids); | 
| 209 GL_APICALL void GL_APIENTRY glRegisterSharedIdsCHROMIUM (GLuint namespac e_id, GLsizeiNotNegative n, const GLuint* ids); | 210 GL_APICALL void GL_APIENTRY glRegisterSharedIdsCHROMIUM (GLuint namespac e_id, GLsizeiNotNegative n, const GLuint* ids); | 
| 210 GL_APICALL GLboolean GL_APIENTRY glEnableFeatureCHROMIUM (const char* feature ); | 211 GL_APICALL GLboolean GL_APIENTRY glEnableFeatureCHROMIUM (const char* feature ); | 
| 211 GL_APICALL void* GL_APIENTRY glMapBufferSubDataCHROMIUM (GLuint target, G LintptrNotNegative offset, GLsizeiptr size, GLenum access); | 212 GL_APICALL void* GL_APIENTRY glMapBufferSubDataCHROMIUM (GLuint target, G LintptrNotNegative offset, GLsizeiptr size, GLenum access); | 
| 212 GL_APICALL void GL_APIENTRY glUnmapBufferSubDataCHROMIUM (const void* me m); | 213 GL_APICALL void GL_APIENTRY glUnmapBufferSubDataCHROMIUM (const void* me m); | 
| 213 GL_APICALL void* GL_APIENTRY glMapTexSubImage2DCHROMIUM (GLenum target, G Lint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, GLenum access); | 214 GL_APICALL void* GL_APIENTRY glMapTexSubImage2DCHROMIUM (GLenum target, G Lint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, GLenum access); | 
| (...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 429 'GetRequestableExtensionsCHROMIUM': 449, | 430 'GetRequestableExtensionsCHROMIUM': 449, | 
| 430 'RequestExtensionCHROMIUM': 450, | 431 'RequestExtensionCHROMIUM': 450, | 
| 431 'CreateStreamTextureCHROMIUM': 451, | 432 'CreateStreamTextureCHROMIUM': 451, | 
| 432 'DestroyStreamTextureCHROMIUM': 452, | 433 'DestroyStreamTextureCHROMIUM': 452, | 
| 433 'Placeholder453CHROMIUM': 453, | 434 'Placeholder453CHROMIUM': 453, | 
| 434 'GetMultipleIntegervCHROMIUM': 454, | 435 'GetMultipleIntegervCHROMIUM': 454, | 
| 435 'GetProgramInfoCHROMIUM': 455, | 436 'GetProgramInfoCHROMIUM': 455, | 
| 436 'GetTranslatedShaderSourceANGLE': 456, | 437 'GetTranslatedShaderSourceANGLE': 456, | 
| 437 'PostSubBufferCHROMIUM': 457, | 438 'PostSubBufferCHROMIUM': 457, | 
| 438 'TexImageIOSurface2DCHROMIUM': 458, | 439 'TexImageIOSurface2DCHROMIUM': 458, | 
| 440 'TexStorage2DEXT': 459, | |
| 439 } | 441 } | 
| 440 | 442 | 
| 441 # This is a list of enum names and their valid values. It is used to map | 443 # This is a list of enum names and their valid values. It is used to map | 
| 442 # GLenum arguments to a specific set of valid values. | 444 # GLenum arguments to a specific set of valid values. | 
| 443 _ENUM_LISTS = { | 445 _ENUM_LISTS = { | 
| 444 'BlitFilter': { | 446 'BlitFilter': { | 
| 445 'type': 'GLenum', | 447 'type': 'GLenum', | 
| 446 'valid': [ | 448 'valid': [ | 
| 447 'GL_NEAREST', | 449 'GL_NEAREST', | 
| 448 'GL_LINEAR', | 450 'GL_LINEAR', | 
| (...skipping 442 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 891 'GL_LINEAR_MIPMAP_LINEAR', | 893 'GL_LINEAR_MIPMAP_LINEAR', | 
| 892 ], | 894 ], | 
| 893 }, | 895 }, | 
| 894 'TextureMagFilterMode': { | 896 'TextureMagFilterMode': { | 
| 895 'type': 'GLenum', | 897 'type': 'GLenum', | 
| 896 'valid': [ | 898 'valid': [ | 
| 897 'GL_NEAREST', | 899 'GL_NEAREST', | 
| 898 'GL_LINEAR', | 900 'GL_LINEAR', | 
| 899 ], | 901 ], | 
| 900 }, | 902 }, | 
| 903 'TextureUsage': { | |
| 904 'type': 'GLenum', | |
| 905 'valid': [ | |
| 906 'GL_NONE', | |
| 907 'GL_FRAMEBUFFER_ATTACHMENT_ANGLE', | |
| 908 ], | |
| 909 }, | |
| 901 'VertexAttribute': { | 910 'VertexAttribute': { | 
| 902 'type': 'GLenum', | 911 'type': 'GLenum', | 
| 903 'valid': [ | 912 'valid': [ | 
| 904 # some enum that the decoder actually passes through to GL needs | 913 # some enum that the decoder actually passes through to GL needs | 
| 905 # to be the first listed here since it's used in unit tests. | 914 # to be the first listed here since it's used in unit tests. | 
| 906 'GL_VERTEX_ATTRIB_ARRAY_NORMALIZED', | 915 'GL_VERTEX_ATTRIB_ARRAY_NORMALIZED', | 
| 907 'GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING', | 916 'GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING', | 
| 908 'GL_VERTEX_ATTRIB_ARRAY_ENABLED', | 917 'GL_VERTEX_ATTRIB_ARRAY_ENABLED', | 
| 909 'GL_VERTEX_ATTRIB_ARRAY_SIZE', | 918 'GL_VERTEX_ATTRIB_ARRAY_SIZE', | 
| 910 'GL_VERTEX_ATTRIB_ARRAY_STRIDE', | 919 'GL_VERTEX_ATTRIB_ARRAY_STRIDE', | 
| (...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1029 'GL_LUMINANCE', | 1038 'GL_LUMINANCE', | 
| 1030 'GL_LUMINANCE_ALPHA', | 1039 'GL_LUMINANCE_ALPHA', | 
| 1031 'GL_RGB', | 1040 'GL_RGB', | 
| 1032 'GL_RGBA', | 1041 'GL_RGBA', | 
| 1033 ], | 1042 ], | 
| 1034 'invalid': [ | 1043 'invalid': [ | 
| 1035 'GL_BGRA', | 1044 'GL_BGRA', | 
| 1036 'GL_BGR', | 1045 'GL_BGR', | 
| 1037 ], | 1046 ], | 
| 1038 }, | 1047 }, | 
| 1048 'TextureInternalFormatStorage': { | |
| 1049 'type': 'GLenum', | |
| 1050 'valid': [ | |
| 1051 'GL_RGB565', | |
| 1052 'GL_RGBA4', | |
| 1053 'GL_RGB5_A1', | |
| 1054 'GL_ALPHA8_EXT', | |
| 1055 'GL_LUMINANCE8_EXT', | |
| 1056 'GL_LUMINANCE8_ALPHA8_EXT', | |
| 1057 'GL_RGB8_OES', | |
| 1058 'GL_RGBA8_OES', | |
| 
greggman
2011/12/02 18:33:24
these formats probably need to be added to src/gpu
 
vangelis
2011/12/03 00:19:53
These enums are only valid when supplying them to
 
greggman
2011/12/03 01:41:01
I see. Hmm, well, I guess it's fine. That seems to
 | |
| 1059 ], | |
| 1060 }, | |
| 1039 'VertexAttribType': { | 1061 'VertexAttribType': { | 
| 1040 'type': 'GLenum', | 1062 'type': 'GLenum', | 
| 1041 'valid': [ | 1063 'valid': [ | 
| 1042 'GL_BYTE', | 1064 'GL_BYTE', | 
| 1043 'GL_UNSIGNED_BYTE', | 1065 'GL_UNSIGNED_BYTE', | 
| 1044 'GL_SHORT', | 1066 'GL_SHORT', | 
| 1045 'GL_UNSIGNED_SHORT', | 1067 'GL_UNSIGNED_SHORT', | 
| 1046 # 'GL_FIXED', // This is not available on Desktop GL. | 1068 # 'GL_FIXED', // This is not available on Desktop GL. | 
| 1047 'GL_FLOAT', | 1069 'GL_FLOAT', | 
| 1048 ], | 1070 ], | 
| (...skipping 745 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1794 'type': 'UnknownCommand', | 1816 'type': 'UnknownCommand', | 
| 1795 'extension': True, | 1817 'extension': True, | 
| 1796 'chromium': True, | 1818 'chromium': True, | 
| 1797 }, | 1819 }, | 
| 1798 'TexImageIOSurface2DCHROMIUM': { | 1820 'TexImageIOSurface2DCHROMIUM': { | 
| 1799 'decoder_func': 'DoTexImageIOSurface2DCHROMIUM', | 1821 'decoder_func': 'DoTexImageIOSurface2DCHROMIUM', | 
| 1800 'unit_test': False, | 1822 'unit_test': False, | 
| 1801 'extension': True, | 1823 'extension': True, | 
| 1802 'chromium': True, | 1824 'chromium': True, | 
| 1803 }, | 1825 }, | 
| 1826 'TexStorage2DEXT': { | |
| 1827 'unit_test': False, | |
| 1828 'extension': True, | |
| 1829 'decoder_func': 'DoTexStorage2DEXT', | |
| 1830 }, | |
| 1831 | |
| 1804 } | 1832 } | 
| 1805 | 1833 | 
| 1806 | 1834 | 
| 1807 def SplitWords(input_string): | 1835 def SplitWords(input_string): | 
| 1808 """Transforms a input_string into a list of lower-case components. | 1836 """Transforms a input_string into a list of lower-case components. | 
| 1809 | 1837 | 
| 1810 Args: | 1838 Args: | 
| 1811 input_string: the input string. | 1839 input_string: the input string. | 
| 1812 | 1840 | 
| 1813 Returns: | 1841 Returns: | 
| (...skipping 4176 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 5990 gen.WriteDocs("docs/gles2_cmd_format_docs_autogen.h") | 6018 gen.WriteDocs("docs/gles2_cmd_format_docs_autogen.h") | 
| 5991 | 6019 | 
| 5992 if gen.errors > 0: | 6020 if gen.errors > 0: | 
| 5993 print "%d errors" % gen.errors | 6021 print "%d errors" % gen.errors | 
| 5994 return 1 | 6022 return 1 | 
| 5995 return 0 | 6023 return 0 | 
| 5996 | 6024 | 
| 5997 | 6025 | 
| 5998 if __name__ == '__main__': | 6026 if __name__ == '__main__': | 
| 5999 sys.exit(main(sys.argv[1:])) | 6027 sys.exit(main(sys.argv[1:])) | 
| OLD | NEW |