Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(40)

Side by Side Diff: gpu/command_buffer/build_gles2_cmd_buffer.py

Issue 7253052: Execute all GL commands up to the put offset reported by a flush. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 199 matching lines...) Expand 10 before | Expand all | Expand 10 after
210 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);
211 GL_APICALL GLboolean GL_APIENTRY glCommandBufferEnableCHROMIUM (const char* f eature); 211 GL_APICALL GLboolean GL_APIENTRY glCommandBufferEnableCHROMIUM (const char* f eature);
212 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);
213 GL_APICALL void GL_APIENTRY glUnmapBufferSubDataCHROMIUM (const void* me m); 213 GL_APICALL void GL_APIENTRY glUnmapBufferSubDataCHROMIUM (const void* me m);
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); 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);
215 GL_APICALL void GL_APIENTRY glUnmapTexSubImage2DCHROMIUM (const void* me m); 215 GL_APICALL void GL_APIENTRY glUnmapTexSubImage2DCHROMIUM (const void* me m);
216 GL_APICALL void GL_APIENTRY glCopyTextureToParentTextureCHROMIUM (GLidBi ndTexture client_child_id, GLidBindTexture client_parent_id); 216 GL_APICALL void GL_APIENTRY glCopyTextureToParentTextureCHROMIUM (GLidBi ndTexture client_child_id, GLidBindTexture client_parent_id);
217 GL_APICALL void GL_APIENTRY glResizeCHROMIUM (GLuint width, GLuint heigh t); 217 GL_APICALL void GL_APIENTRY glResizeCHROMIUM (GLuint width, GLuint heigh t);
218 GL_APICALL const GLchar* GL_APIENTRY glGetRequestableExtensionsCHROMIUM (void); 218 GL_APICALL const GLchar* GL_APIENTRY glGetRequestableExtensionsCHROMIUM (void);
219 GL_APICALL void GL_APIENTRY glRequestExtensionCHROMIUM (const char* exte nsion); 219 GL_APICALL void GL_APIENTRY glRequestExtensionCHROMIUM (const char* exte nsion);
220 GL_APICALL void GL_APIENTRY glSetLatchCHROMIUM (GLuint latch_id);
221 GL_APICALL void GL_APIENTRY glWaitLatchCHROMIUM (GLuint latch_id);
222 GL_APICALL void GL_APIENTRY glRateLimitOffscreenContextCHROMIUM (void); 220 GL_APICALL void GL_APIENTRY glRateLimitOffscreenContextCHROMIUM (void);
223 GL_APICALL void GL_APIENTRY glSetSurfaceCHROMIUM (GLint surface_id); 221 GL_APICALL void GL_APIENTRY glSetSurfaceCHROMIUM (GLint surface_id);
224 GL_APICALL void GL_APIENTRY glGetMultipleIntegervCHROMIUM (const GLenum* pnames, GLuint count, GLint* results, GLsizeiptr size); 222 GL_APICALL void GL_APIENTRY glGetMultipleIntegervCHROMIUM (const GLenum* pnames, GLuint count, GLint* results, GLsizeiptr size);
225 """ 223 """
226 224
227 # This is the list of all commmands that will be generated and their Id. 225 # This is the list of all commmands that will be generated and their Id.
228 # If a command is not listed in this table it is an error. 226 # If a command is not listed in this table it is an error.
229 # This lets us make sure that command ids do not change as the generator 227 # This lets us make sure that command ids do not change as the generator
230 # generates new variations of commands. 228 # generates new variations of commands.
231 229
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after
418 'RegisterSharedIdsCHROMIUM': 441, 416 'RegisterSharedIdsCHROMIUM': 441,
419 'CommandBufferEnableCHROMIUM': 442, 417 'CommandBufferEnableCHROMIUM': 442,
420 'CompressedTexImage2DBucket': 443, 418 'CompressedTexImage2DBucket': 443,
421 'CompressedTexSubImage2DBucket': 444, 419 'CompressedTexSubImage2DBucket': 444,
422 'RenderbufferStorageMultisampleEXT': 445, 420 'RenderbufferStorageMultisampleEXT': 445,
423 'BlitFramebufferEXT': 446, 421 'BlitFramebufferEXT': 446,
424 'CopyTextureToParentTextureCHROMIUM': 447, 422 'CopyTextureToParentTextureCHROMIUM': 447,
425 'ResizeCHROMIUM': 448, 423 'ResizeCHROMIUM': 448,
426 'GetRequestableExtensionsCHROMIUM': 449, 424 'GetRequestableExtensionsCHROMIUM': 449,
427 'RequestExtensionCHROMIUM': 450, 425 'RequestExtensionCHROMIUM': 450,
428 'SetLatchCHROMIUM': 451,
429 'WaitLatchCHROMIUM': 452,
430 'SetSurfaceCHROMIUM': 453, 426 'SetSurfaceCHROMIUM': 453,
431 'GetMultipleIntegervCHROMIUM': 454, 427 'GetMultipleIntegervCHROMIUM': 454,
432 } 428 }
433 429
434 # This is a list of enum names and their valid values. It is used to map 430 # This is a list of enum names and their valid values. It is used to map
435 # GLenum arguments to a specific set of valid values. 431 # GLenum arguments to a specific set of valid values.
436 _ENUM_LISTS = { 432 _ENUM_LISTS = {
437 'BlitFilter': { 433 'BlitFilter': {
438 'type': 'GLenum', 434 'type': 'GLenum',
439 'valid': [ 435 'valid': [
(...skipping 1250 matching lines...) Expand 10 before | Expand all | Expand 10 after
1690 'GLsizei stride, GLuint offset', 1686 'GLsizei stride, GLuint offset',
1691 }, 1687 },
1692 'CopyTextureToParentTextureCHROMIUM': { 1688 'CopyTextureToParentTextureCHROMIUM': {
1693 'impl_func': False, 1689 'impl_func': False,
1694 'decoder_func': 'DoCopyTextureToParentTextureCHROMIUM', 1690 'decoder_func': 'DoCopyTextureToParentTextureCHROMIUM',
1695 'unit_test': False, 1691 'unit_test': False,
1696 'extension': True, 1692 'extension': True,
1697 'chromium': True, 1693 'chromium': True,
1698 }, 1694 },
1699 'ResizeCHROMIUM': { 1695 'ResizeCHROMIUM': {
1696 'impl_func': False,
1700 'decoder_func': 'DoResizeCHROMIUM', 1697 'decoder_func': 'DoResizeCHROMIUM',
1701 'unit_test': False, 1698 'unit_test': False,
1702 'extension': True, 1699 'extension': True,
1703 'chromium': True, 1700 'chromium': True,
1704 }, 1701 },
1705 'GetRequestableExtensionsCHROMIUM': { 1702 'GetRequestableExtensionsCHROMIUM': {
1706 'type': 'Custom', 1703 'type': 'Custom',
1707 'impl_func': False, 1704 'impl_func': False,
1708 'immediate': False, 1705 'immediate': False,
1709 'cmd_args': 'uint32 bucket_id', 1706 'cmd_args': 'uint32 bucket_id',
1710 'extension': True, 1707 'extension': True,
1711 'chromium': True, 1708 'chromium': True,
1712 }, 1709 },
1713 'RequestExtensionCHROMIUM': { 1710 'RequestExtensionCHROMIUM': {
1714 'type': 'Custom', 1711 'type': 'Custom',
1715 'impl_func': False, 1712 'impl_func': False,
1716 'immediate': False, 1713 'immediate': False,
1717 'cmd_args': 'uint32 bucket_id', 1714 'cmd_args': 'uint32 bucket_id',
1718 'extension': True, 1715 'extension': True,
1719 'chromium': True, 1716 'chromium': True,
1720 }, 1717 },
1721 'SetLatchCHROMIUM': {
1722 'type': 'Custom',
1723 },
1724 'WaitLatchCHROMIUM': {
1725 'type': 'Custom',
1726 },
1727 'RateLimitOffscreenContextCHROMIUM': { 1718 'RateLimitOffscreenContextCHROMIUM': {
1728 'gen_cmd': False, 1719 'gen_cmd': False,
1729 'extension': True, 1720 'extension': True,
1730 'chromium': True, 1721 'chromium': True,
1731 }, 1722 },
1732 } 1723 }
1733 1724
1734 1725
1735 def SplitWords(input_string): 1726 def SplitWords(input_string):
1736 """Transforms a input_string into a list of lower-case components. 1727 """Transforms a input_string into a list of lower-case components.
(...skipping 4281 matching lines...) Expand 10 before | Expand all | Expand 10 after
6018 6009
6019 if options.generate_docs: 6010 if options.generate_docs:
6020 gen.WriteDocs("docs/gles2_cmd_format_docs_autogen.h") 6011 gen.WriteDocs("docs/gles2_cmd_format_docs_autogen.h")
6021 6012
6022 if gen.errors > 0: 6013 if gen.errors > 0:
6023 print "%d errors" % gen.errors 6014 print "%d errors" % gen.errors
6024 sys.exit(1) 6015 sys.exit(1)
6025 6016
6026 if __name__ == '__main__': 6017 if __name__ == '__main__':
6027 main(sys.argv[1:]) 6018 main(sys.argv[1:])
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698