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 195 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
206 GL_APICALL void GL_APIENTRY glSwapBuffers (void); | 206 GL_APICALL void GL_APIENTRY glSwapBuffers (void); |
207 GL_APICALL GLuint GL_APIENTRY glGetMaxValueInBufferCHROMIUM (GLidBuffer bu
ffer_id, GLsizei count, GLenumGetMaxIndexType type, GLuint offset); | 207 GL_APICALL GLuint GL_APIENTRY glGetMaxValueInBufferCHROMIUM (GLidBuffer bu
ffer_id, GLsizei count, GLenumGetMaxIndexType type, GLuint offset); |
208 GL_APICALL void GL_APIENTRY glGenSharedIdsCHROMIUM (GLuint namespace_id,
GLuint id_offset, GLsizeiNotNegative n, GLuint* ids); | 208 GL_APICALL void GL_APIENTRY glGenSharedIdsCHROMIUM (GLuint namespace_id,
GLuint id_offset, GLsizeiNotNegative n, GLuint* ids); |
209 GL_APICALL void GL_APIENTRY glDeleteSharedIdsCHROMIUM (GLuint namespace_
id, GLsizeiNotNegative n, const GLuint* ids); | 209 GL_APICALL void GL_APIENTRY glDeleteSharedIdsCHROMIUM (GLuint namespace_
id, GLsizeiNotNegative n, const GLuint* ids); |
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); | |
217 GL_APICALL void GL_APIENTRY glResizeCHROMIUM (GLuint width, GLuint heigh
t); | 216 GL_APICALL void GL_APIENTRY glResizeCHROMIUM (GLuint width, GLuint heigh
t); |
218 GL_APICALL const GLchar* GL_APIENTRY glGetRequestableExtensionsCHROMIUM (void); | 217 GL_APICALL const GLchar* GL_APIENTRY glGetRequestableExtensionsCHROMIUM (void); |
219 GL_APICALL void GL_APIENTRY glRequestExtensionCHROMIUM (const char* exte
nsion); | 218 GL_APICALL void GL_APIENTRY glRequestExtensionCHROMIUM (const char* exte
nsion); |
220 GL_APICALL void GL_APIENTRY glRateLimitOffscreenContextCHROMIUM (void); | 219 GL_APICALL void GL_APIENTRY glRateLimitOffscreenContextCHROMIUM (void); |
221 GL_APICALL void GL_APIENTRY glSetSurfaceCHROMIUM (GLint surface_id); | 220 GL_APICALL void GL_APIENTRY glSetSurfaceCHROMIUM (GLint surface_id); |
222 GL_APICALL void GL_APIENTRY glGetMultipleIntegervCHROMIUM (const GLenum*
pnames, GLuint count, GLint* results, GLsizeiptr size); | 221 GL_APICALL void GL_APIENTRY glGetMultipleIntegervCHROMIUM (const GLenum*
pnames, GLuint count, GLint* results, GLsizeiptr size); |
223 GL_APICALL void GL_APIENTRY glGetProgramInfoCHROMIUM (GLidProgram progra
m, GLsizeiNotNegative bufsize, GLsizei* size, void* info); | 222 GL_APICALL void GL_APIENTRY glGetProgramInfoCHROMIUM (GLidProgram progra
m, GLsizeiNotNegative bufsize, GLsizei* size, void* info); |
| 223 GL_APICALL void GL_APIENTRY glPlaceholder447CHROMIUM (void); |
| 224 GL_APICALL void GL_APIENTRY glPlaceholder451CHROMIUM (void); |
| 225 GL_APICALL void GL_APIENTRY glPlaceholder452CHROMIUM (void); |
224 """ | 226 """ |
225 | 227 |
226 # This is the list of all commmands that will be generated and their Id. | 228 # This is the list of all commmands that will be generated and their Id. |
227 # If a command is not listed in this table it is an error. | 229 # If a command is not listed in this table it is an error. |
228 # This lets us make sure that command ids do not change as the generator | 230 # This lets us make sure that command ids do not change as the generator |
229 # generates new variations of commands. | 231 # generates new variations of commands. |
230 | 232 |
231 _CMD_ID_TABLE = { | 233 _CMD_ID_TABLE = { |
232 'ActiveTexture': 256, | 234 'ActiveTexture': 256, |
233 'AttachShader': 257, | 235 'AttachShader': 257, |
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
413 'ReleaseShaderCompiler': 437, | 415 'ReleaseShaderCompiler': 437, |
414 'GetMaxValueInBufferCHROMIUM': 438, | 416 'GetMaxValueInBufferCHROMIUM': 438, |
415 'GenSharedIdsCHROMIUM': 439, | 417 'GenSharedIdsCHROMIUM': 439, |
416 'DeleteSharedIdsCHROMIUM': 440, | 418 'DeleteSharedIdsCHROMIUM': 440, |
417 'RegisterSharedIdsCHROMIUM': 441, | 419 'RegisterSharedIdsCHROMIUM': 441, |
418 'CommandBufferEnableCHROMIUM': 442, | 420 'CommandBufferEnableCHROMIUM': 442, |
419 'CompressedTexImage2DBucket': 443, | 421 'CompressedTexImage2DBucket': 443, |
420 'CompressedTexSubImage2DBucket': 444, | 422 'CompressedTexSubImage2DBucket': 444, |
421 'RenderbufferStorageMultisampleEXT': 445, | 423 'RenderbufferStorageMultisampleEXT': 445, |
422 'BlitFramebufferEXT': 446, | 424 'BlitFramebufferEXT': 446, |
423 'CopyTextureToParentTextureCHROMIUM': 447, | 425 'Placeholder447CHROMIUM': 447, |
424 'ResizeCHROMIUM': 448, | 426 'ResizeCHROMIUM': 448, |
425 'GetRequestableExtensionsCHROMIUM': 449, | 427 'GetRequestableExtensionsCHROMIUM': 449, |
426 'RequestExtensionCHROMIUM': 450, | 428 'RequestExtensionCHROMIUM': 450, |
| 429 'Placeholder451CHROMIUM': 451, |
| 430 'Placeholder452CHROMIUM': 452, |
427 'SetSurfaceCHROMIUM': 453, | 431 'SetSurfaceCHROMIUM': 453, |
428 'GetMultipleIntegervCHROMIUM': 454, | 432 'GetMultipleIntegervCHROMIUM': 454, |
429 'GetProgramInfoCHROMIUM': 455, | 433 'GetProgramInfoCHROMIUM': 455, |
430 } | 434 } |
431 | 435 |
432 # This is a list of enum names and their valid values. It is used to map | 436 # This is a list of enum names and their valid values. It is used to map |
433 # GLenum arguments to a specific set of valid values. | 437 # GLenum arguments to a specific set of valid values. |
434 _ENUM_LISTS = { | 438 _ENUM_LISTS = { |
435 'BlitFilter': { | 439 'BlitFilter': { |
436 'type': 'GLenum', | 440 'type': 'GLenum', |
(...skipping 1278 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1715 'type': 'PUT', | 1719 'type': 'PUT', |
1716 'data_type': 'GLfloat', | 1720 'data_type': 'GLfloat', |
1717 'count': 4, | 1721 'count': 4, |
1718 'decoder_func': 'DoVertexAttrib4fv', | 1722 'decoder_func': 'DoVertexAttrib4fv', |
1719 }, | 1723 }, |
1720 'VertexAttribPointer': { | 1724 'VertexAttribPointer': { |
1721 'type': 'Manual', | 1725 'type': 'Manual', |
1722 'cmd_args': 'GLuint indx, GLint size, GLenum type, GLboolean normalized, ' | 1726 'cmd_args': 'GLuint indx, GLint size, GLenum type, GLboolean normalized, ' |
1723 'GLsizei stride, GLuint offset', | 1727 'GLsizei stride, GLuint offset', |
1724 }, | 1728 }, |
1725 'CopyTextureToParentTextureCHROMIUM': { | |
1726 'impl_func': False, | |
1727 'decoder_func': 'DoCopyTextureToParentTextureCHROMIUM', | |
1728 'unit_test': False, | |
1729 'extension': True, | |
1730 'chromium': True, | |
1731 }, | |
1732 'ResizeCHROMIUM': { | 1729 'ResizeCHROMIUM': { |
1733 'decoder_func': 'DoResizeCHROMIUM', | 1730 'decoder_func': 'DoResizeCHROMIUM', |
1734 'unit_test': False, | 1731 'unit_test': False, |
1735 'extension': True, | 1732 'extension': True, |
1736 'chromium': True, | 1733 'chromium': True, |
1737 }, | 1734 }, |
1738 'GetRequestableExtensionsCHROMIUM': { | 1735 'GetRequestableExtensionsCHROMIUM': { |
1739 'type': 'Custom', | 1736 'type': 'Custom', |
1740 'impl_func': False, | 1737 'impl_func': False, |
1741 'immediate': False, | 1738 'immediate': False, |
1742 'cmd_args': 'uint32 bucket_id', | 1739 'cmd_args': 'uint32 bucket_id', |
1743 'extension': True, | 1740 'extension': True, |
1744 'chromium': True, | 1741 'chromium': True, |
1745 }, | 1742 }, |
1746 'RequestExtensionCHROMIUM': { | 1743 'RequestExtensionCHROMIUM': { |
1747 'type': 'Custom', | 1744 'type': 'Custom', |
1748 'impl_func': False, | 1745 'impl_func': False, |
1749 'immediate': False, | 1746 'immediate': False, |
1750 'cmd_args': 'uint32 bucket_id', | 1747 'cmd_args': 'uint32 bucket_id', |
1751 'extension': True, | 1748 'extension': True, |
1752 'chromium': True, | 1749 'chromium': True, |
1753 }, | 1750 }, |
1754 'RateLimitOffscreenContextCHROMIUM': { | 1751 'RateLimitOffscreenContextCHROMIUM': { |
1755 'gen_cmd': False, | 1752 'gen_cmd': False, |
1756 'extension': True, | 1753 'extension': True, |
1757 'chromium': True, | 1754 'chromium': True, |
1758 }, | 1755 }, |
| 1756 'Placeholder447CHROMIUM': { |
| 1757 'type': 'UnknownCommand', |
| 1758 }, |
| 1759 'Placeholder451CHROMIUM': { |
| 1760 'type': 'UnknownCommand', |
| 1761 }, |
| 1762 'Placeholder452CHROMIUM': { |
| 1763 'type': 'UnknownCommand', |
| 1764 }, |
1759 } | 1765 } |
1760 | 1766 |
1761 | 1767 |
1762 def SplitWords(input_string): | 1768 def SplitWords(input_string): |
1763 """Transforms a input_string into a list of lower-case components. | 1769 """Transforms a input_string into a list of lower-case components. |
1764 | 1770 |
1765 Args: | 1771 Args: |
1766 input_string: the input string. | 1772 input_string: the input string. |
1767 | 1773 |
1768 Returns: | 1774 Returns: |
(...skipping 505 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2274 | 2280 |
2275 def WriteGLES2ImplementationDeclaration(self, func, file): | 2281 def WriteGLES2ImplementationDeclaration(self, func, file): |
2276 """Writes the GLES2 Implemention declaration.""" | 2282 """Writes the GLES2 Implemention declaration.""" |
2277 impl_decl = func.GetInfo('impl_decl') | 2283 impl_decl = func.GetInfo('impl_decl') |
2278 if impl_decl == None or impl_decl == True: | 2284 if impl_decl == None or impl_decl == True: |
2279 file.Write("%s %s(%s);\n" % | 2285 file.Write("%s %s(%s);\n" % |
2280 (func.return_type, func.original_name, | 2286 (func.return_type, func.original_name, |
2281 func.MakeTypedOriginalArgString(""))) | 2287 func.MakeTypedOriginalArgString(""))) |
2282 file.Write("\n") | 2288 file.Write("\n") |
2283 | 2289 |
| 2290 def WriteGLES2CLibImplementation(self, func, file): |
| 2291 file.Write("%s GLES2%s(%s) {\n" % |
| 2292 (func.return_type, func.name, |
| 2293 func.MakeTypedOriginalArgString(""))) |
| 2294 result_string = "return " |
| 2295 if func.return_type == "void": |
| 2296 result_string = "" |
| 2297 file.Write(" %sgles2::GetGLContext()->%s(%s);\n" % |
| 2298 (result_string, func.original_name, |
| 2299 func.MakeOriginalArgString(""))) |
| 2300 file.Write("}\n") |
| 2301 |
2284 def WriteClientGLCallLog(self, func, file): | 2302 def WriteClientGLCallLog(self, func, file): |
2285 """Writes a logging macro for the client side code.""" | 2303 """Writes a logging macro for the client side code.""" |
2286 comma = "" | 2304 comma = "" |
2287 if len(func.GetOriginalArgs()): | 2305 if len(func.GetOriginalArgs()): |
2288 comma = " << " | 2306 comma = " << " |
2289 file.Write( | 2307 file.Write( |
2290 ' GPU_CLIENT_LOG("[" << this << "] gl%s("%s%s << ")");\n' % | 2308 ' GPU_CLIENT_LOG("[" << this << "] gl%s("%s%s << ")");\n' % |
2291 (func.original_name, comma, func.MakeLogArgString())) | 2309 (func.original_name, comma, func.MakeLogArgString())) |
2292 | 2310 |
2293 def WriteClientGLReturnLog(self, func, file): | 2311 def WriteClientGLReturnLog(self, func, file): |
(...skipping 2007 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4301 EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); | 4319 EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); |
4302 EXPECT_EQ(GL_INVALID_VALUE, GetGLError()); | 4320 EXPECT_EQ(GL_INVALID_VALUE, GetGLError()); |
4303 } | 4321 } |
4304 """ | 4322 """ |
4305 self.WriteValidUnitTest(func, file, invalid_test) | 4323 self.WriteValidUnitTest(func, file, invalid_test) |
4306 | 4324 |
4307 def WriteServiceImplementation(self, func, file): | 4325 def WriteServiceImplementation(self, func, file): |
4308 """Overrriden from TypeHandler.""" | 4326 """Overrriden from TypeHandler.""" |
4309 pass | 4327 pass |
4310 | 4328 |
| 4329 class UnknownCommandHandler(TypeHandler): |
| 4330 """Handler for commands that always fail with kUnknownCommand.""" |
| 4331 |
| 4332 def __init__(self): |
| 4333 TypeHandler.__init__(self) |
| 4334 |
| 4335 def AddImmediateFunction(self, generator, func): |
| 4336 """Overrriden from TypeHandler.""" |
| 4337 pass |
| 4338 |
| 4339 def WriteServiceImplementation(self, func, file): |
| 4340 """Overrriden from TypeHandler.""" |
| 4341 file.Write( |
| 4342 "error::Error GLES2DecoderImpl::Handle%s(\n" % func.name) |
| 4343 file.Write( |
| 4344 " uint32 immediate_data_size, const gles2::%s& c) {\n" % func.name) |
| 4345 file.Write(" return error::kUnknownCommand;\n") |
| 4346 file.Write("}\n") |
| 4347 |
| 4348 def WriteGLES2ImplementationHeader(self, func, file): |
| 4349 """Overrriden from TypeHandler.""" |
| 4350 pass |
| 4351 |
| 4352 def WriteCmdHelper(self, func, file): |
| 4353 """Overrriden from TypeHandler.""" |
| 4354 pass |
| 4355 |
| 4356 def WriteGLES2CLibImplementation(self, func, file): |
| 4357 """Overrriden from TypeHandler.""" |
| 4358 pass; |
| 4359 |
| 4360 def WriteServiceUnitTest(self, func, file): |
| 4361 """Overrriden from TypeHandler.""" |
| 4362 pass; |
4311 | 4363 |
4312 class FunctionInfo(object): | 4364 class FunctionInfo(object): |
4313 """Holds info about a function.""" | 4365 """Holds info about a function.""" |
4314 | 4366 |
4315 def __init__(self, info, type_handler): | 4367 def __init__(self, info, type_handler): |
4316 for key in info: | 4368 for key in info: |
4317 setattr(self, key, info[key]) | 4369 setattr(self, key, info[key]) |
4318 self.type_handler = type_handler | 4370 self.type_handler = type_handler |
4319 if not 'type' in info: | 4371 if not 'type' in info: |
4320 self.type = '' | 4372 self.type = '' |
(...skipping 747 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5068 self.type_handler.WriteCmdHelper(self, file) | 5120 self.type_handler.WriteCmdHelper(self, file) |
5069 | 5121 |
5070 def WriteServiceImplementation(self, file): | 5122 def WriteServiceImplementation(self, file): |
5071 """Writes the service implementation for a command.""" | 5123 """Writes the service implementation for a command.""" |
5072 self.type_handler.WriteServiceImplementation(self, file) | 5124 self.type_handler.WriteServiceImplementation(self, file) |
5073 | 5125 |
5074 def WriteServiceUnitTest(self, file): | 5126 def WriteServiceUnitTest(self, file): |
5075 """Writes the service implementation for a command.""" | 5127 """Writes the service implementation for a command.""" |
5076 self.type_handler.WriteServiceUnitTest(self, file) | 5128 self.type_handler.WriteServiceUnitTest(self, file) |
5077 | 5129 |
| 5130 def WriteGLES2CLibImplementation(self, file): |
| 5131 """Writes the GLES2 C Lib Implemention.""" |
| 5132 self.type_handler.WriteGLES2CLibImplementation(self, file) |
| 5133 |
5078 def WriteGLES2ImplementationHeader(self, file): | 5134 def WriteGLES2ImplementationHeader(self, file): |
5079 """Writes the GLES2 Implemention declaration.""" | 5135 """Writes the GLES2 Implemention declaration.""" |
5080 self.type_handler.WriteGLES2ImplementationHeader(self, file) | 5136 self.type_handler.WriteGLES2ImplementationHeader(self, file) |
5081 | 5137 |
5082 def WriteDestinationInitalizationValidation(self, file): | 5138 def WriteDestinationInitalizationValidation(self, file): |
5083 """Writes the client side destintion initialization validation.""" | 5139 """Writes the client side destintion initialization validation.""" |
5084 self.type_handler.WriteDestinationInitalizationValidation(self, file) | 5140 self.type_handler.WriteDestinationInitalizationValidation(self, file) |
5085 | 5141 |
5086 def WriteFormatTest(self, file): | 5142 def WriteFormatTest(self, file): |
5087 """Writes the cmd's format test.""" | 5143 """Writes the cmd's format test.""" |
(...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5296 'GETn': GETnHandler(), | 5352 'GETn': GETnHandler(), |
5297 'GLchar': GLcharHandler(), | 5353 'GLchar': GLcharHandler(), |
5298 'HandWritten': HandWrittenHandler(), | 5354 'HandWritten': HandWrittenHandler(), |
5299 'Is': IsHandler(), | 5355 'Is': IsHandler(), |
5300 'Manual': ManualHandler(), | 5356 'Manual': ManualHandler(), |
5301 'PUT': PUTHandler(), | 5357 'PUT': PUTHandler(), |
5302 'PUTn': PUTnHandler(), | 5358 'PUTn': PUTnHandler(), |
5303 'PUTXn': PUTXnHandler(), | 5359 'PUTXn': PUTXnHandler(), |
5304 'STRn': STRnHandler(), | 5360 'STRn': STRnHandler(), |
5305 'Todo': TodoHandler(), | 5361 'Todo': TodoHandler(), |
| 5362 'UnknownCommand': UnknownCommandHandler(), |
5306 } | 5363 } |
5307 | 5364 |
5308 for func_name in _FUNCTION_INFO: | 5365 for func_name in _FUNCTION_INFO: |
5309 info = _FUNCTION_INFO[func_name] | 5366 info = _FUNCTION_INFO[func_name] |
5310 type = '' | 5367 type = '' |
5311 if 'type' in info: | 5368 if 'type' in info: |
5312 type = info['type'] | 5369 type = info['type'] |
5313 self._function_info[func_name] = FunctionInfo(info, | 5370 self._function_info[func_name] = FunctionInfo(info, |
5314 self.GetTypeHandler(type)) | 5371 self.GetTypeHandler(type)) |
5315 | 5372 |
(...skipping 246 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5562 file.Close() | 5619 file.Close() |
5563 | 5620 |
5564 | 5621 |
5565 def WriteGLES2CLibImplementation(self, filename): | 5622 def WriteGLES2CLibImplementation(self, filename): |
5566 """Writes the GLES2 c lib implementation.""" | 5623 """Writes the GLES2 c lib implementation.""" |
5567 file = CHeaderWriter( | 5624 file = CHeaderWriter( |
5568 filename, | 5625 filename, |
5569 "// These functions emluate GLES2 over command buffers.\n") | 5626 "// These functions emluate GLES2 over command buffers.\n") |
5570 | 5627 |
5571 for func in self.original_functions: | 5628 for func in self.original_functions: |
5572 file.Write("%s GLES2%s(%s) {\n" % | 5629 func.WriteGLES2CLibImplementation(file) |
5573 (func.return_type, func.name, | |
5574 func.MakeTypedOriginalArgString(""))) | |
5575 result_string = "return " | |
5576 if func.return_type == "void": | |
5577 result_string = "" | |
5578 file.Write(" %sgles2::GetGLContext()->%s(%s);\n" % | |
5579 (result_string, func.original_name, | |
5580 func.MakeOriginalArgString(""))) | |
5581 file.Write("}\n") | |
5582 | |
5583 file.Write("\n") | 5630 file.Write("\n") |
5584 | 5631 |
5585 file.Close() | 5632 file.Close() |
5586 | 5633 |
5587 def WriteGLES2ImplementationHeader(self, filename): | 5634 def WriteGLES2ImplementationHeader(self, filename): |
5588 """Writes the GLES2 helper header.""" | 5635 """Writes the GLES2 helper header.""" |
5589 file = CHeaderWriter( | 5636 file = CHeaderWriter( |
5590 filename, | 5637 filename, |
5591 "// This file is included by gles2_implementation.h to declare the\n" | 5638 "// This file is included by gles2_implementation.h to declare the\n" |
5592 "// GL api functions.\n") | 5639 "// GL api functions.\n") |
(...skipping 357 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5950 | 5997 |
5951 if options.generate_docs: | 5998 if options.generate_docs: |
5952 gen.WriteDocs("docs/gles2_cmd_format_docs_autogen.h") | 5999 gen.WriteDocs("docs/gles2_cmd_format_docs_autogen.h") |
5953 | 6000 |
5954 if gen.errors > 0: | 6001 if gen.errors > 0: |
5955 print "%d errors" % gen.errors | 6002 print "%d errors" % gen.errors |
5956 sys.exit(1) | 6003 sys.exit(1) |
5957 | 6004 |
5958 if __name__ == '__main__': | 6005 if __name__ == '__main__': |
5959 main(sys.argv[1:]) | 6006 main(sys.argv[1:]) |
OLD | NEW |