OLD | NEW |
1 #!/usr/bin/python | 1 #!/usr/bin/python |
2 # | 2 # |
3 # Copyright (c) 2011 The Chromium Authors. All rights reserved. | 3 # Copyright (c) 2011 The Chromium Authors. All rights reserved. |
4 # Use of this source code is governed by a BSD-style license that can be | 4 # Use of this source code is governed by a BSD-style license that can be |
5 # found in the LICENSE file. | 5 # found in the LICENSE file. |
6 | 6 |
7 """code generator for GLES2 command buffers.""" | 7 """code generator for GLES2 command buffers.""" |
8 | 8 |
9 import os | 9 import os |
10 import os.path | 10 import os.path |
(...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
218 GL_APICALL void GL_APIENTRY glRequestExtensionCHROMIUM (const char* exte
nsion); | 218 GL_APICALL void GL_APIENTRY glRequestExtensionCHROMIUM (const char* exte
nsion); |
219 GL_APICALL void GL_APIENTRY glRateLimitOffscreenContextCHROMIUM (void); | 219 GL_APICALL void GL_APIENTRY glRateLimitOffscreenContextCHROMIUM (void); |
220 GL_APICALL void GL_APIENTRY glGetMultipleIntegervCHROMIUM (const GLenum*
pnames, GLuint count, GLint* results, GLsizeiptr size); | 220 GL_APICALL void GL_APIENTRY glGetMultipleIntegervCHROMIUM (const GLenum*
pnames, GLuint count, GLint* results, GLsizeiptr size); |
221 GL_APICALL void GL_APIENTRY glGetProgramInfoCHROMIUM (GLidProgram progra
m, GLsizeiNotNegative bufsize, GLsizei* size, void* info); | 221 GL_APICALL void GL_APIENTRY glGetProgramInfoCHROMIUM (GLidProgram progra
m, GLsizeiNotNegative bufsize, GLsizei* size, void* info); |
222 GL_APICALL void GL_APIENTRY glPlaceholder447CHROMIUM (void); | 222 GL_APICALL void GL_APIENTRY glPlaceholder447CHROMIUM (void); |
223 GL_APICALL GLuint GL_APIENTRY glCreateStreamTextureCHROMIUM (GLuint textur
e); | 223 GL_APICALL GLuint GL_APIENTRY glCreateStreamTextureCHROMIUM (GLuint textur
e); |
224 GL_APICALL void GL_APIENTRY glDestroyStreamTextureCHROMIUM (GLuint textu
re); | 224 GL_APICALL void GL_APIENTRY glDestroyStreamTextureCHROMIUM (GLuint textu
re); |
225 GL_APICALL void GL_APIENTRY glPlaceholder453CHROMIUM (void); | 225 GL_APICALL void GL_APIENTRY glPlaceholder453CHROMIUM (void); |
226 GL_APICALL void GL_APIENTRY glGetTranslatedShaderSourceANGLE (GLidShader
shader, GLsizeiNotNegative bufsize, GLsizei* length, char* source); | 226 GL_APICALL void GL_APIENTRY glGetTranslatedShaderSourceANGLE (GLidShader
shader, GLsizeiNotNegative bufsize, GLsizei* length, char* source); |
227 GL_APICALL void GL_APIENTRY glPostSubBufferCHROMIUM (GLint x, GLint y, G
Lint width, GLint height); | 227 GL_APICALL void GL_APIENTRY glPostSubBufferCHROMIUM (GLint x, GLint y, G
Lint width, GLint height); |
| 228 GL_APICALL void GL_APIENTRY glTexImageIOSurface2DCHROMIUM (GLenumTexture
BindTarget target, GLsizei width, GLsizei height, GLuint ioSurfaceId, GLuint pla
ne); |
228 """ | 229 """ |
229 | 230 |
230 # This is the list of all commmands that will be generated and their Id. | 231 # This is the list of all commmands that will be generated and their Id. |
231 # If a command is not listed in this table it is an error. | 232 # If a command is not listed in this table it is an error. |
232 # This lets us make sure that command ids do not change as the generator | 233 # This lets us make sure that command ids do not change as the generator |
233 # generates new variations of commands. | 234 # generates new variations of commands. |
234 | 235 |
235 _CMD_ID_TABLE = { | 236 _CMD_ID_TABLE = { |
236 'ActiveTexture': 256, | 237 'ActiveTexture': 256, |
237 'AttachShader': 257, | 238 'AttachShader': 257, |
(...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
428 'ResizeCHROMIUM': 448, | 429 'ResizeCHROMIUM': 448, |
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, |
| 439 'TexImageIOSurface2DCHROMIUM': 458, |
438 } | 440 } |
439 | 441 |
440 # This is a list of enum names and their valid values. It is used to map | 442 # This is a list of enum names and their valid values. It is used to map |
441 # GLenum arguments to a specific set of valid values. | 443 # GLenum arguments to a specific set of valid values. |
442 _ENUM_LISTS = { | 444 _ENUM_LISTS = { |
443 'BlitFilter': { | 445 'BlitFilter': { |
444 'type': 'GLenum', | 446 'type': 'GLenum', |
445 'valid': [ | 447 'valid': [ |
446 'GL_NEAREST', | 448 'GL_NEAREST', |
447 'GL_LINEAR', | 449 'GL_LINEAR', |
(...skipping 1338 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1786 'impl_func': False, | 1788 'impl_func': False, |
1787 'expectation': False, | 1789 'expectation': False, |
1788 'extension': True, | 1790 'extension': True, |
1789 'chromium': True, | 1791 'chromium': True, |
1790 }, | 1792 }, |
1791 'Placeholder453CHROMIUM': { | 1793 'Placeholder453CHROMIUM': { |
1792 'type': 'UnknownCommand', | 1794 'type': 'UnknownCommand', |
1793 'extension': True, | 1795 'extension': True, |
1794 'chromium': True, | 1796 'chromium': True, |
1795 }, | 1797 }, |
| 1798 'TexImageIOSurface2DCHROMIUM': { |
| 1799 'decoder_func': 'DoTexImageIOSurface2DCHROMIUM', |
| 1800 'unit_test': False, |
| 1801 'extension': True, |
| 1802 'chromium': True, |
| 1803 }, |
1796 } | 1804 } |
1797 | 1805 |
1798 | 1806 |
1799 def SplitWords(input_string): | 1807 def SplitWords(input_string): |
1800 """Transforms a input_string into a list of lower-case components. | 1808 """Transforms a input_string into a list of lower-case components. |
1801 | 1809 |
1802 Args: | 1810 Args: |
1803 input_string: the input string. | 1811 input_string: the input string. |
1804 | 1812 |
1805 Returns: | 1813 Returns: |
(...skipping 4175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5981 | 5989 |
5982 if options.generate_docs: | 5990 if options.generate_docs: |
5983 gen.WriteDocs("docs/gles2_cmd_format_docs_autogen.h") | 5991 gen.WriteDocs("docs/gles2_cmd_format_docs_autogen.h") |
5984 | 5992 |
5985 if gen.errors > 0: | 5993 if gen.errors > 0: |
5986 print "%d errors" % gen.errors | 5994 print "%d errors" % gen.errors |
5987 sys.exit(1) | 5995 sys.exit(1) |
5988 | 5996 |
5989 if __name__ == '__main__': | 5997 if __name__ == '__main__': |
5990 main(sys.argv[1:]) | 5998 main(sys.argv[1:]) |
OLD | NEW |