| OLD | NEW |
| 1 #!/usr/bin/python | 1 #!/usr/bin/python |
| 2 # | 2 # |
| 3 # Copyright (c) 2006-2009 The Chromium Authors. All rights reserved. | 3 # Copyright (c) 2006-2009 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 191 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 202 GL_APICALL void GL_APIENTRY glGenSharedIdsCHROMIUM (GLuint namespace_id,
GLuint id_offset, GLsizeiNotNegative n, GLuint* ids); | 202 GL_APICALL void GL_APIENTRY glGenSharedIdsCHROMIUM (GLuint namespace_id,
GLuint id_offset, GLsizeiNotNegative n, GLuint* ids); |
| 203 GL_APICALL void GL_APIENTRY glDeleteSharedIdsCHROMIUM (GLuint namespace_
id, GLsizeiNotNegative n, const GLuint* ids); | 203 GL_APICALL void GL_APIENTRY glDeleteSharedIdsCHROMIUM (GLuint namespace_
id, GLsizeiNotNegative n, const GLuint* ids); |
| 204 GL_APICALL void GL_APIENTRY glRegisterSharedIdsCHROMIUM (GLuint namespac
e_id, GLsizeiNotNegative n, const GLuint* ids); | 204 GL_APICALL void GL_APIENTRY glRegisterSharedIdsCHROMIUM (GLuint namespac
e_id, GLsizeiNotNegative n, const GLuint* ids); |
| 205 GL_APICALL GLboolean GL_APIENTRY glCommandBufferEnableCHROMIUM (const char* f
eature); | 205 GL_APICALL GLboolean GL_APIENTRY glCommandBufferEnableCHROMIUM (const char* f
eature); |
| 206 GL_APICALL void* GL_APIENTRY glMapBufferSubDataCHROMIUM (GLuint target, G
LintptrNotNegative offset, GLsizeiptr size, GLenum access); | 206 GL_APICALL void* GL_APIENTRY glMapBufferSubDataCHROMIUM (GLuint target, G
LintptrNotNegative offset, GLsizeiptr size, GLenum access); |
| 207 GL_APICALL void GL_APIENTRY glUnmapBufferSubDataCHROMIUM (const void* me
m); | 207 GL_APICALL void GL_APIENTRY glUnmapBufferSubDataCHROMIUM (const void* me
m); |
| 208 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); | 208 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); |
| 209 GL_APICALL void GL_APIENTRY glUnmapTexSubImage2DCHROMIUM (const void* me
m); | 209 GL_APICALL void GL_APIENTRY glUnmapTexSubImage2DCHROMIUM (const void* me
m); |
| 210 GL_APICALL void GL_APIENTRY glCopyTextureToParentTextureCHROMIUM (GLidBi
ndTexture client_child_id, GLidBindTexture client_parent_id); | 210 GL_APICALL void GL_APIENTRY glCopyTextureToParentTextureCHROMIUM (GLidBi
ndTexture client_child_id, GLidBindTexture client_parent_id); |
| 211 GL_APICALL void GL_APIENTRY glResizeCHROMIUM (GLuint width, GLuint heigh
t); | 211 GL_APICALL void GL_APIENTRY glResizeCHROMIUM (GLuint width, GLuint heigh
t); |
| 212 GL_APICALL const GLchar* GL_APIENTRY glGetRequestableExtensionsCHROMIUM (void); |
| 213 GL_APICALL void GL_APIENTRY glRequestExtensionCHROMIUM (const char* exte
nsion); |
| 212 """ | 214 """ |
| 213 | 215 |
| 214 # This is the list of all commmands that will be generated and their Id. | 216 # This is the list of all commmands that will be generated and their Id. |
| 215 # If a command is not listed in this table it is an error. | 217 # If a command is not listed in this table it is an error. |
| 216 # This lets us make sure that command ids do not change as the generator | 218 # This lets us make sure that command ids do not change as the generator |
| 217 # generates new variations of commands. | 219 # generates new variations of commands. |
| 218 | 220 |
| 219 _CMD_ID_TABLE = { | 221 _CMD_ID_TABLE = { |
| 220 'ActiveTexture': 256, | 222 'ActiveTexture': 256, |
| 221 'AttachShader': 257, | 223 'AttachShader': 257, |
| (...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 403 'GenSharedIdsCHROMIUM': 439, | 405 'GenSharedIdsCHROMIUM': 439, |
| 404 'DeleteSharedIdsCHROMIUM': 440, | 406 'DeleteSharedIdsCHROMIUM': 440, |
| 405 'RegisterSharedIdsCHROMIUM': 441, | 407 'RegisterSharedIdsCHROMIUM': 441, |
| 406 'CommandBufferEnableCHROMIUM': 442, | 408 'CommandBufferEnableCHROMIUM': 442, |
| 407 'CompressedTexImage2DBucket': 443, | 409 'CompressedTexImage2DBucket': 443, |
| 408 'CompressedTexSubImage2DBucket': 444, | 410 'CompressedTexSubImage2DBucket': 444, |
| 409 'RenderbufferStorageMultisampleEXT': 445, | 411 'RenderbufferStorageMultisampleEXT': 445, |
| 410 'BlitFramebufferEXT': 446, | 412 'BlitFramebufferEXT': 446, |
| 411 'CopyTextureToParentTextureCHROMIUM': 447, | 413 'CopyTextureToParentTextureCHROMIUM': 447, |
| 412 'ResizeCHROMIUM': 448, | 414 'ResizeCHROMIUM': 448, |
| 415 'GetRequestableExtensionsCHROMIUM': 449, |
| 416 'RequestExtensionCHROMIUM': 450, |
| 413 } | 417 } |
| 414 | 418 |
| 415 # This is a list of enum names and their valid values. It is used to map | 419 # This is a list of enum names and their valid values. It is used to map |
| 416 # GLenum arguments to a specific set of valid values. | 420 # GLenum arguments to a specific set of valid values. |
| 417 _ENUM_LISTS = { | 421 _ENUM_LISTS = { |
| 418 'BlitFilter': { | 422 'BlitFilter': { |
| 419 'type': 'GLenum', | 423 'type': 'GLenum', |
| 420 'valid': [ | 424 'valid': [ |
| 421 'GL_NEAREST', | 425 'GL_NEAREST', |
| 422 'GL_LINEAR', | 426 'GL_LINEAR', |
| (...skipping 1149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1572 'unit_test': False, | 1576 'unit_test': False, |
| 1573 'extension': True, | 1577 'extension': True, |
| 1574 'chromium': True, | 1578 'chromium': True, |
| 1575 }, | 1579 }, |
| 1576 'ResizeCHROMIUM': { | 1580 'ResizeCHROMIUM': { |
| 1577 'decoder_func': 'DoResizeCHROMIUM', | 1581 'decoder_func': 'DoResizeCHROMIUM', |
| 1578 'unit_test': False, | 1582 'unit_test': False, |
| 1579 'extension': True, | 1583 'extension': True, |
| 1580 'chromium': True, | 1584 'chromium': True, |
| 1581 }, | 1585 }, |
| 1586 'GetRequestableExtensionsCHROMIUM': { |
| 1587 'type': 'Custom', |
| 1588 'impl_func': False, |
| 1589 'immediate': False, |
| 1590 'cmd_args': 'uint32 bucket_id', |
| 1591 'extension': True, |
| 1592 'chromium': True, |
| 1593 }, |
| 1594 'RequestExtensionCHROMIUM': { |
| 1595 'type': 'Custom', |
| 1596 'impl_func': False, |
| 1597 'immediate': False, |
| 1598 'cmd_args': 'uint32 bucket_id', |
| 1599 'extension': True, |
| 1600 'chromium': True, |
| 1601 }, |
| 1582 } | 1602 } |
| 1583 | 1603 |
| 1584 | 1604 |
| 1585 def SplitWords(input_string): | 1605 def SplitWords(input_string): |
| 1586 """Transforms a input_string into a list of lower-case components. | 1606 """Transforms a input_string into a list of lower-case components. |
| 1587 | 1607 |
| 1588 Args: | 1608 Args: |
| 1589 input_string: the input string. | 1609 input_string: the input string. |
| 1590 | 1610 |
| 1591 Returns: | 1611 Returns: |
| (...skipping 3730 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5322 | 5342 |
| 5323 if options.generate_docs: | 5343 if options.generate_docs: |
| 5324 gen.WriteDocs("docs/gles2_cmd_format_docs_autogen.h") | 5344 gen.WriteDocs("docs/gles2_cmd_format_docs_autogen.h") |
| 5325 | 5345 |
| 5326 if gen.errors > 0: | 5346 if gen.errors > 0: |
| 5327 print "%d errors" % gen.errors | 5347 print "%d errors" % gen.errors |
| 5328 sys.exit(1) | 5348 sys.exit(1) |
| 5329 | 5349 |
| 5330 if __name__ == '__main__': | 5350 if __name__ == '__main__': |
| 5331 main(sys.argv[1:]) | 5351 main(sys.argv[1:]) |
| OLD | NEW |