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 1160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1171 'ReleaseShaderCompiler': {'type': 'Noop'}, | 1171 'ReleaseShaderCompiler': {'type': 'Noop'}, |
1172 'ShaderBinary': {'type': 'Noop'}, | 1172 'ShaderBinary': {'type': 'Noop'}, |
1173 'ShaderSource': { | 1173 'ShaderSource': { |
1174 'type': 'Manual', | 1174 'type': 'Manual', |
1175 'immediate': True, | 1175 'immediate': True, |
1176 'bucket': True, | 1176 'bucket': True, |
1177 'needs_size': True, | 1177 'needs_size': True, |
1178 'cmd_args': | 1178 'cmd_args': |
1179 'GLuint shader, const char* data', | 1179 'GLuint shader, const char* data', |
1180 }, | 1180 }, |
| 1181 'SwapBuffers': { |
| 1182 'type': 'Custom', |
| 1183 'impl_func': False, |
| 1184 'unit_test': False, |
| 1185 }, |
1181 'TexImage2D': {'type': 'Manual', 'immediate': True}, | 1186 'TexImage2D': {'type': 'Manual', 'immediate': True}, |
1182 'TexParameterf': {'decoder_func': 'DoTexParameterf'}, | 1187 'TexParameterf': {'decoder_func': 'DoTexParameterf'}, |
1183 'TexParameteri': {'decoder_func': 'DoTexParameteri'}, | 1188 'TexParameteri': {'decoder_func': 'DoTexParameteri'}, |
1184 'TexParameterfv': { | 1189 'TexParameterfv': { |
1185 'type': 'PUT', | 1190 'type': 'PUT', |
1186 'data_type': 'GLfloat', | 1191 'data_type': 'GLfloat', |
1187 'count': 1, | 1192 'count': 1, |
1188 'decoder_func': 'DoTexParameterfv', | 1193 'decoder_func': 'DoTexParameterfv', |
1189 }, | 1194 }, |
1190 'TexParameteriv': { | 1195 'TexParameteriv': { |
(...skipping 24 matching lines...) Expand all Loading... |
1215 'UseProgram': {'decoder_func': 'DoUseProgram', 'unit_test': False}, | 1220 'UseProgram': {'decoder_func': 'DoUseProgram', 'unit_test': False}, |
1216 'VertexAttrib1fv': {'type': 'PUT', 'data_type': 'GLfloat', 'count': 1}, | 1221 'VertexAttrib1fv': {'type': 'PUT', 'data_type': 'GLfloat', 'count': 1}, |
1217 'VertexAttrib2fv': {'type': 'PUT', 'data_type': 'GLfloat', 'count': 2}, | 1222 'VertexAttrib2fv': {'type': 'PUT', 'data_type': 'GLfloat', 'count': 2}, |
1218 'VertexAttrib3fv': {'type': 'PUT', 'data_type': 'GLfloat', 'count': 3}, | 1223 'VertexAttrib3fv': {'type': 'PUT', 'data_type': 'GLfloat', 'count': 3}, |
1219 'VertexAttrib4fv': {'type': 'PUT', 'data_type': 'GLfloat', 'count': 4}, | 1224 'VertexAttrib4fv': {'type': 'PUT', 'data_type': 'GLfloat', 'count': 4}, |
1220 'VertexAttribPointer': { | 1225 'VertexAttribPointer': { |
1221 'type': 'Manual', | 1226 'type': 'Manual', |
1222 'cmd_args': 'GLuint indx, GLint size, GLenum type, GLboolean normalized, ' | 1227 'cmd_args': 'GLuint indx, GLint size, GLenum type, GLboolean normalized, ' |
1223 'GLsizei stride, GLuint offset', | 1228 'GLsizei stride, GLuint offset', |
1224 }, | 1229 }, |
1225 'SwapBuffers': { | |
1226 'impl_func': False, | |
1227 'decoder_func': 'DoSwapBuffers', | |
1228 'unit_test': False, | |
1229 }, | |
1230 } | 1230 } |
1231 | 1231 |
1232 | 1232 |
1233 class CWriter(object): | 1233 class CWriter(object): |
1234 """Writes to a file formatting it for Google's style guidelines.""" | 1234 """Writes to a file formatting it for Google's style guidelines.""" |
1235 | 1235 |
1236 def __init__(self, filename): | 1236 def __init__(self, filename): |
1237 self.filename = filename | 1237 self.filename = filename |
1238 self.file = open(filename, "wb") | 1238 self.file = open(filename, "wb") |
1239 self.file_num = 0 | 1239 self.file_num = 0 |
(...skipping 3180 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4420 | 4420 |
4421 if options.generate_command_id_tests: | 4421 if options.generate_command_id_tests: |
4422 gen.WriteCommandIdTest("common/gles2_cmd_id_test_autogen.h") | 4422 gen.WriteCommandIdTest("common/gles2_cmd_id_test_autogen.h") |
4423 | 4423 |
4424 if gen.errors > 0: | 4424 if gen.errors > 0: |
4425 print "%d errors" % gen.errors | 4425 print "%d errors" % gen.errors |
4426 sys.exit(1) | 4426 sys.exit(1) |
4427 | 4427 |
4428 if __name__ == '__main__': | 4428 if __name__ == '__main__': |
4429 main(sys.argv[1:]) | 4429 main(sys.argv[1:]) |
OLD | NEW |