| 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 glPostSubBufferCHROMIUM (GLint x, GLint y, G
Lint width, GLint height); |
| 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 'PostSubBufferCHROMIUM': 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 1064 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1510 'gen_cmd': False, | 1512 'gen_cmd': False, |
| 1511 'extension': True, | 1513 'extension': True, |
| 1512 'chromium': True, | 1514 'chromium': True, |
| 1513 }, | 1515 }, |
| 1514 'MapTexSubImage2DCHROMIUM': { | 1516 'MapTexSubImage2DCHROMIUM': { |
| 1515 'gen_cmd': False, | 1517 'gen_cmd': False, |
| 1516 'extension': True, | 1518 'extension': True, |
| 1517 'chromium': True, | 1519 'chromium': True, |
| 1518 }, | 1520 }, |
| 1519 'PixelStorei': {'type': 'Manual'}, | 1521 'PixelStorei': {'type': 'Manual'}, |
| 1522 'PostSubBufferCHROMIUM': { |
| 1523 'type': 'Custom', |
| 1524 'impl_func': False, |
| 1525 'unit_test': False, |
| 1526 'extension': True, |
| 1527 'chromium': True, |
| 1528 }, |
| 1520 'RenderbufferStorage': { | 1529 'RenderbufferStorage': { |
| 1521 'decoder_func': 'DoRenderbufferStorage', | 1530 'decoder_func': 'DoRenderbufferStorage', |
| 1522 'gl_test_func': 'glRenderbufferStorageEXT', | 1531 'gl_test_func': 'glRenderbufferStorageEXT', |
| 1523 'expectation': False, | 1532 'expectation': False, |
| 1524 }, | 1533 }, |
| 1525 'RenderbufferStorageMultisampleEXT': { | 1534 'RenderbufferStorageMultisampleEXT': { |
| 1526 'decoder_func': 'DoRenderbufferStorageMultisample', | 1535 'decoder_func': 'DoRenderbufferStorageMultisample', |
| 1527 'gl_test_func': 'glRenderbufferStorageMultisampleEXT', | 1536 'gl_test_func': 'glRenderbufferStorageMultisampleEXT', |
| 1528 'expectation': False, | 1537 'expectation': False, |
| 1529 'unit_test': False, | 1538 'unit_test': False, |
| (...skipping 4442 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5972 | 5981 |
| 5973 if options.generate_docs: | 5982 if options.generate_docs: |
| 5974 gen.WriteDocs("docs/gles2_cmd_format_docs_autogen.h") | 5983 gen.WriteDocs("docs/gles2_cmd_format_docs_autogen.h") |
| 5975 | 5984 |
| 5976 if gen.errors > 0: | 5985 if gen.errors > 0: |
| 5977 print "%d errors" % gen.errors | 5986 print "%d errors" % gen.errors |
| 5978 sys.exit(1) | 5987 sys.exit(1) |
| 5979 | 5988 |
| 5980 if __name__ == '__main__': | 5989 if __name__ == '__main__': |
| 5981 main(sys.argv[1:]) | 5990 main(sys.argv[1:]) |
| OLD | NEW |