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 206 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
217 GL_APICALL const GLchar* GL_APIENTRY glGetRequestableExtensionsCHROMIUM (void); | 217 GL_APICALL const GLchar* GL_APIENTRY glGetRequestableExtensionsCHROMIUM (void); |
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 glSetSurfaceVisibleCHROMIUM (GLboolean visib
le); |
227 """ | 228 """ |
228 | 229 |
229 # This is the list of all commmands that will be generated and their Id. | 230 # This is the list of all commmands that will be generated and their Id. |
230 # If a command is not listed in this table it is an error. | 231 # If a command is not listed in this table it is an error. |
231 # This lets us make sure that command ids do not change as the generator | 232 # This lets us make sure that command ids do not change as the generator |
232 # generates new variations of commands. | 233 # generates new variations of commands. |
233 | 234 |
234 _CMD_ID_TABLE = { | 235 _CMD_ID_TABLE = { |
235 'ActiveTexture': 256, | 236 'ActiveTexture': 256, |
236 'AttachShader': 257, | 237 'AttachShader': 257, |
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
426 'Placeholder447CHROMIUM': 447, | 427 'Placeholder447CHROMIUM': 447, |
427 'ResizeCHROMIUM': 448, | 428 'ResizeCHROMIUM': 448, |
428 'GetRequestableExtensionsCHROMIUM': 449, | 429 'GetRequestableExtensionsCHROMIUM': 449, |
429 'RequestExtensionCHROMIUM': 450, | 430 'RequestExtensionCHROMIUM': 450, |
430 'CreateStreamTextureCHROMIUM': 451, | 431 'CreateStreamTextureCHROMIUM': 451, |
431 'DestroyStreamTextureCHROMIUM': 452, | 432 'DestroyStreamTextureCHROMIUM': 452, |
432 'Placeholder453CHROMIUM': 453, | 433 'Placeholder453CHROMIUM': 453, |
433 'GetMultipleIntegervCHROMIUM': 454, | 434 'GetMultipleIntegervCHROMIUM': 454, |
434 'GetProgramInfoCHROMIUM': 455, | 435 'GetProgramInfoCHROMIUM': 455, |
435 'GetTranslatedShaderSourceANGLE': 456, | 436 'GetTranslatedShaderSourceANGLE': 456, |
| 437 'SetSurfaceVisibleCHROMIUM': 457, |
436 } | 438 } |
437 | 439 |
438 # This is a list of enum names and their valid values. It is used to map | 440 # This is a list of enum names and their valid values. It is used to map |
439 # GLenum arguments to a specific set of valid values. | 441 # GLenum arguments to a specific set of valid values. |
440 _ENUM_LISTS = { | 442 _ENUM_LISTS = { |
441 'BlitFilter': { | 443 'BlitFilter': { |
442 'type': 'GLenum', | 444 'type': 'GLenum', |
443 'valid': [ | 445 'valid': [ |
444 'GL_NEAREST', | 446 'GL_NEAREST', |
445 'GL_LINEAR', | 447 'GL_LINEAR', |
(...skipping 1331 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1777 'impl_func': False, | 1779 'impl_func': False, |
1778 'expectation': False, | 1780 'expectation': False, |
1779 'extension': True, | 1781 'extension': True, |
1780 'chromium': True, | 1782 'chromium': True, |
1781 }, | 1783 }, |
1782 'Placeholder453CHROMIUM': { | 1784 'Placeholder453CHROMIUM': { |
1783 'type': 'UnknownCommand', | 1785 'type': 'UnknownCommand', |
1784 'extension': True, | 1786 'extension': True, |
1785 'chromium': True, | 1787 'chromium': True, |
1786 }, | 1788 }, |
| 1789 'SetSurfaceVisibleCHROMIUM': { |
| 1790 'type': 'Custom', |
| 1791 'impl_func': False, |
| 1792 'unit_test': False, |
| 1793 'extension': True, |
| 1794 'chromium': True, |
| 1795 }, |
1787 } | 1796 } |
1788 | 1797 |
1789 | 1798 |
1790 def SplitWords(input_string): | 1799 def SplitWords(input_string): |
1791 """Transforms a input_string into a list of lower-case components. | 1800 """Transforms a input_string into a list of lower-case components. |
1792 | 1801 |
1793 Args: | 1802 Args: |
1794 input_string: the input string. | 1803 input_string: the input string. |
1795 | 1804 |
1796 Returns: | 1805 Returns: |
(...skipping 4173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5970 | 5979 |
5971 if options.generate_docs: | 5980 if options.generate_docs: |
5972 gen.WriteDocs("docs/gles2_cmd_format_docs_autogen.h") | 5981 gen.WriteDocs("docs/gles2_cmd_format_docs_autogen.h") |
5973 | 5982 |
5974 if gen.errors > 0: | 5983 if gen.errors > 0: |
5975 print "%d errors" % gen.errors | 5984 print "%d errors" % gen.errors |
5976 sys.exit(1) | 5985 sys.exit(1) |
5977 | 5986 |
5978 if __name__ == '__main__': | 5987 if __name__ == '__main__': |
5979 main(sys.argv[1:]) | 5988 main(sys.argv[1:]) |
OLD | NEW |