| OLD | NEW |
| 1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
| 2 # Copyright (c) 2012 The Chromium Authors. All rights reserved. | 2 # Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 3 # Use of this source code is governed by a BSD-style license that can be | 3 # Use of this source code is governed by a BSD-style license that can be |
| 4 # found in the LICENSE file. | 4 # found in the LICENSE file. |
| 5 | 5 |
| 6 """code generator for GLES2 command buffers.""" | 6 """code generator for GLES2 command buffers.""" |
| 7 | 7 |
| 8 import itertools | 8 import itertools |
| 9 import os | 9 import os |
| 10 import os.path | 10 import os.path |
| (...skipping 23 matching lines...) Expand all Loading... |
| 34 | 34 |
| 35 _MOJO_EXPOSED_EXTENSIONS = ["CHROMIUM_bind_uniform_location", | 35 _MOJO_EXPOSED_EXTENSIONS = ["CHROMIUM_bind_uniform_location", |
| 36 "CHROMIUM_map_sub", | 36 "CHROMIUM_map_sub", |
| 37 "CHROMIUM_miscellaneous", | 37 "CHROMIUM_miscellaneous", |
| 38 "CHROMIUM_resize", | 38 "CHROMIUM_resize", |
| 39 "CHROMIUM_sync_point", | 39 "CHROMIUM_sync_point", |
| 40 "CHROMIUM_texture_mailbox", | 40 "CHROMIUM_texture_mailbox", |
| 41 "EXT_debug_marker", | 41 "EXT_debug_marker", |
| 42 "EXT_discard_framebuffer", | 42 "EXT_discard_framebuffer", |
| 43 "EXT_multisampled_render_to_texture", | 43 "EXT_multisampled_render_to_texture", |
| 44 "EXT_occlusion_query", |
| 44 "EXT_texture_storage", | 45 "EXT_texture_storage", |
| 45 "KHR_blend_equation_advanced", | 46 "KHR_blend_equation_advanced", |
| 46 "OES_vertex_array_object", | 47 "OES_vertex_array_object"] |
| 47 "occlusion_query_EXT"] | |
| 48 | 48 |
| 49 | 49 |
| 50 # This string is copied directly out of the gl2.h file from GLES2.0 | 50 # This string is copied directly out of the gl2.h file from GLES2.0 |
| 51 # | 51 # |
| 52 # Edits: | 52 # Edits: |
| 53 # | 53 # |
| 54 # *) Any argument that is a resourceID has been changed to GLid<Type>. | 54 # *) Any argument that is a resourceID has been changed to GLid<Type>. |
| 55 # (not pointer arguments) and if it's allowed to be zero it's GLidZero<Type> | 55 # (not pointer arguments) and if it's allowed to be zero it's GLidZero<Type> |
| 56 # If it's allowed to not exist it's GLidBind<Type> | 56 # If it's allowed to not exist it's GLidBind<Type> |
| 57 # | 57 # |
| (...skipping 3351 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3409 'pepper_interface': 'InstancedArrays', | 3409 'pepper_interface': 'InstancedArrays', |
| 3410 }, | 3410 }, |
| 3411 'GenQueriesEXT': { | 3411 'GenQueriesEXT': { |
| 3412 'type': 'GENn', | 3412 'type': 'GENn', |
| 3413 'gl_test_func': 'glGenQueriesARB', | 3413 'gl_test_func': 'glGenQueriesARB', |
| 3414 'resource_type': 'Query', | 3414 'resource_type': 'Query', |
| 3415 'resource_types': 'Queries', | 3415 'resource_types': 'Queries', |
| 3416 'unit_test': False, | 3416 'unit_test': False, |
| 3417 'pepper_interface': 'Query', | 3417 'pepper_interface': 'Query', |
| 3418 'not_shared': 'True', | 3418 'not_shared': 'True', |
| 3419 'extension': "occlusion_query_EXT", | 3419 'extension': "EXT_occlusion_query", |
| 3420 }, | 3420 }, |
| 3421 'DeleteQueriesEXT': { | 3421 'DeleteQueriesEXT': { |
| 3422 'type': 'DELn', | 3422 'type': 'DELn', |
| 3423 'gl_test_func': 'glDeleteQueriesARB', | 3423 'gl_test_func': 'glDeleteQueriesARB', |
| 3424 'resource_type': 'Query', | 3424 'resource_type': 'Query', |
| 3425 'resource_types': 'Queries', | 3425 'resource_types': 'Queries', |
| 3426 'unit_test': False, | 3426 'unit_test': False, |
| 3427 'pepper_interface': 'Query', | 3427 'pepper_interface': 'Query', |
| 3428 'extension': "occlusion_query_EXT", | 3428 'extension': "EXT_occlusion_query", |
| 3429 }, | 3429 }, |
| 3430 'IsQueryEXT': { | 3430 'IsQueryEXT': { |
| 3431 'gen_cmd': False, | 3431 'gen_cmd': False, |
| 3432 'client_test': False, | 3432 'client_test': False, |
| 3433 'pepper_interface': 'Query', | 3433 'pepper_interface': 'Query', |
| 3434 'extension': "occlusion_query_EXT", | 3434 'extension': "EXT_occlusion_query", |
| 3435 }, | 3435 }, |
| 3436 'BeginQueryEXT': { | 3436 'BeginQueryEXT': { |
| 3437 'type': 'Manual', | 3437 'type': 'Manual', |
| 3438 'cmd_args': 'GLenumQueryTarget target, GLidQuery id, void* sync_data', | 3438 'cmd_args': 'GLenumQueryTarget target, GLidQuery id, void* sync_data', |
| 3439 'data_transfer_methods': ['shm'], | 3439 'data_transfer_methods': ['shm'], |
| 3440 'gl_test_func': 'glBeginQuery', | 3440 'gl_test_func': 'glBeginQuery', |
| 3441 'pepper_interface': 'Query', | 3441 'pepper_interface': 'Query', |
| 3442 'extension': "occlusion_query_EXT", | 3442 'extension': "EXT_occlusion_query", |
| 3443 }, | 3443 }, |
| 3444 'BeginTransformFeedback': { | 3444 'BeginTransformFeedback': { |
| 3445 'unsafe': True, | 3445 'unsafe': True, |
| 3446 }, | 3446 }, |
| 3447 'EndQueryEXT': { | 3447 'EndQueryEXT': { |
| 3448 'type': 'Manual', | 3448 'type': 'Manual', |
| 3449 'cmd_args': 'GLenumQueryTarget target, GLuint submit_count', | 3449 'cmd_args': 'GLenumQueryTarget target, GLuint submit_count', |
| 3450 'gl_test_func': 'glEndnQuery', | 3450 'gl_test_func': 'glEndnQuery', |
| 3451 'client_test': False, | 3451 'client_test': False, |
| 3452 'pepper_interface': 'Query', | 3452 'pepper_interface': 'Query', |
| 3453 'extension': "occlusion_query_EXT", | 3453 'extension': "EXT_occlusion_query", |
| 3454 }, | 3454 }, |
| 3455 'EndTransformFeedback': { | 3455 'EndTransformFeedback': { |
| 3456 'unsafe': True, | 3456 'unsafe': True, |
| 3457 }, | 3457 }, |
| 3458 'GetQueryivEXT': { | 3458 'GetQueryivEXT': { |
| 3459 'gen_cmd': False, | 3459 'gen_cmd': False, |
| 3460 'client_test': False, | 3460 'client_test': False, |
| 3461 'gl_test_func': 'glGetQueryiv', | 3461 'gl_test_func': 'glGetQueryiv', |
| 3462 'pepper_interface': 'Query', | 3462 'pepper_interface': 'Query', |
| 3463 'extension': "occlusion_query_EXT", | 3463 'extension': "EXT_occlusion_query", |
| 3464 }, | 3464 }, |
| 3465 'GetQueryObjectuivEXT': { | 3465 'GetQueryObjectuivEXT': { |
| 3466 'gen_cmd': False, | 3466 'gen_cmd': False, |
| 3467 'client_test': False, | 3467 'client_test': False, |
| 3468 'gl_test_func': 'glGetQueryObjectuiv', | 3468 'gl_test_func': 'glGetQueryObjectuiv', |
| 3469 'pepper_interface': 'Query', | 3469 'pepper_interface': 'Query', |
| 3470 'extension': "occlusion_query_EXT", | 3470 'extension': "EXT_occlusion_query", |
| 3471 }, | 3471 }, |
| 3472 'BindUniformLocationCHROMIUM': { | 3472 'BindUniformLocationCHROMIUM': { |
| 3473 'type': 'GLchar', | 3473 'type': 'GLchar', |
| 3474 'extension': "CHROMIUM_bind_uniform_location", | 3474 'extension': "CHROMIUM_bind_uniform_location", |
| 3475 'data_transfer_methods': ['bucket'], | 3475 'data_transfer_methods': ['bucket'], |
| 3476 'needs_size': True, | 3476 'needs_size': True, |
| 3477 'gl_test_func': 'DoBindUniformLocationCHROMIUM', | 3477 'gl_test_func': 'DoBindUniformLocationCHROMIUM', |
| 3478 }, | 3478 }, |
| 3479 'InsertEventMarkerEXT': { | 3479 'InsertEventMarkerEXT': { |
| 3480 'type': 'GLcharN', | 3480 'type': 'GLcharN', |
| (...skipping 7263 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 10744 Format(gen.generated_cpp_filenames) | 10744 Format(gen.generated_cpp_filenames) |
| 10745 | 10745 |
| 10746 if gen.errors > 0: | 10746 if gen.errors > 0: |
| 10747 print "%d errors" % gen.errors | 10747 print "%d errors" % gen.errors |
| 10748 return 1 | 10748 return 1 |
| 10749 return 0 | 10749 return 0 |
| 10750 | 10750 |
| 10751 | 10751 |
| 10752 if __name__ == '__main__': | 10752 if __name__ == '__main__': |
| 10753 sys.exit(main(sys.argv[1:])) | 10753 sys.exit(main(sys.argv[1:])) |
| OLD | NEW |