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 2395 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2406 'type': 'Bind', | 2406 'type': 'Bind', |
2407 'decoder_func': 'DoBindBufferBase', | 2407 'decoder_func': 'DoBindBufferBase', |
2408 'gen_func': 'GenBuffersARB', | 2408 'gen_func': 'GenBuffersARB', |
2409 'unit_test': False, | 2409 'unit_test': False, |
2410 'unsafe': True, | 2410 'unsafe': True, |
2411 }, | 2411 }, |
2412 'BindBufferRange': { | 2412 'BindBufferRange': { |
2413 'type': 'Bind', | 2413 'type': 'Bind', |
2414 'decoder_func': 'DoBindBufferRange', | 2414 'decoder_func': 'DoBindBufferRange', |
2415 'gen_func': 'GenBuffersARB', | 2415 'gen_func': 'GenBuffersARB', |
| 2416 'unit_test': False, |
2416 'valid_args': { | 2417 'valid_args': { |
2417 '3': '4', | 2418 '3': '4', |
2418 '4': '4' | 2419 '4': '4' |
2419 }, | 2420 }, |
2420 'unsafe': True, | 2421 'unsafe': True, |
2421 }, | 2422 }, |
2422 'BindFramebuffer': { | 2423 'BindFramebuffer': { |
2423 'type': 'Bind', | 2424 'type': 'Bind', |
2424 'decoder_func': 'DoBindFramebuffer', | 2425 'decoder_func': 'DoBindFramebuffer', |
2425 'gl_test_func': 'glBindFramebufferEXT', | 2426 'gl_test_func': 'glBindFramebufferEXT', |
(...skipping 15 matching lines...) Expand all Loading... |
2441 'BindTexture': { | 2442 'BindTexture': { |
2442 'type': 'Bind', | 2443 'type': 'Bind', |
2443 'decoder_func': 'DoBindTexture', | 2444 'decoder_func': 'DoBindTexture', |
2444 'gen_func': 'GenTextures', | 2445 'gen_func': 'GenTextures', |
2445 # TODO: remove this once client side caching works. | 2446 # TODO: remove this once client side caching works. |
2446 'client_test': False, | 2447 'client_test': False, |
2447 'trace_level': 2, | 2448 'trace_level': 2, |
2448 }, | 2449 }, |
2449 'BindTransformFeedback': { | 2450 'BindTransformFeedback': { |
2450 'type': 'Bind', | 2451 'type': 'Bind', |
2451 'id_mapping': [ 'TransformFeedback' ], | 2452 'decoder_func': 'DoBindTransformFeedback', |
2452 'unsafe': True, | 2453 'unsafe': True, |
| 2454 'use_helper': True, |
| 2455 'unit_test': False, |
2453 }, | 2456 }, |
2454 'BlitFramebufferCHROMIUM': { | 2457 'BlitFramebufferCHROMIUM': { |
2455 'decoder_func': 'DoBlitFramebufferCHROMIUM', | 2458 'decoder_func': 'DoBlitFramebufferCHROMIUM', |
2456 'unit_test': False, | 2459 'unit_test': False, |
2457 'extension': 'chromium_framebuffer_multisample', | 2460 'extension': 'chromium_framebuffer_multisample', |
2458 'extension_flag': 'chromium_framebuffer_multisample', | 2461 'extension_flag': 'chromium_framebuffer_multisample', |
2459 'pepper_interface': 'FramebufferBlit', | 2462 'pepper_interface': 'FramebufferBlit', |
2460 'pepper_name': 'BlitFramebufferEXT', | 2463 'pepper_name': 'BlitFramebufferEXT', |
2461 'defer_reads': True, | 2464 'defer_reads': True, |
2462 'defer_draws': True, | 2465 'defer_draws': True, |
(...skipping 326 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2789 'DeleteTextures': { | 2792 'DeleteTextures': { |
2790 'type': 'DELn', | 2793 'type': 'DELn', |
2791 'resource_type': 'Texture', | 2794 'resource_type': 'Texture', |
2792 'resource_types': 'Textures', | 2795 'resource_types': 'Textures', |
2793 }, | 2796 }, |
2794 'DeleteTransformFeedbacks': { | 2797 'DeleteTransformFeedbacks': { |
2795 'type': 'DELn', | 2798 'type': 'DELn', |
2796 'resource_type': 'TransformFeedback', | 2799 'resource_type': 'TransformFeedback', |
2797 'resource_types': 'TransformFeedbacks', | 2800 'resource_types': 'TransformFeedbacks', |
2798 'unsafe': True, | 2801 'unsafe': True, |
| 2802 'use_helper': True, |
| 2803 'unit_test': False, |
2799 }, | 2804 }, |
2800 'DepthRangef': { | 2805 'DepthRangef': { |
2801 'decoder_func': 'DoDepthRangef', | 2806 'decoder_func': 'DoDepthRangef', |
2802 'gl_test_func': 'glDepthRange', | 2807 'gl_test_func': 'glDepthRange', |
2803 }, | 2808 }, |
2804 'DepthMask': { | 2809 'DepthMask': { |
2805 'type': 'StateSet', | 2810 'type': 'StateSet', |
2806 'state': 'DepthMask', | 2811 'state': 'DepthMask', |
2807 'no_gl': True, | 2812 'no_gl': True, |
2808 'expectation': False, | 2813 'expectation': False, |
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2929 'gl_test_func': 'glGenTextures', | 2934 'gl_test_func': 'glGenTextures', |
2930 'resource_type': 'Texture', | 2935 'resource_type': 'Texture', |
2931 'resource_types': 'Textures', | 2936 'resource_types': 'Textures', |
2932 }, | 2937 }, |
2933 'GenTransformFeedbacks': { | 2938 'GenTransformFeedbacks': { |
2934 'type': 'GENn', | 2939 'type': 'GENn', |
2935 'gl_test_func': 'glGenTransformFeedbacks', | 2940 'gl_test_func': 'glGenTransformFeedbacks', |
2936 'resource_type': 'TransformFeedback', | 2941 'resource_type': 'TransformFeedback', |
2937 'resource_types': 'TransformFeedbacks', | 2942 'resource_types': 'TransformFeedbacks', |
2938 'unsafe': True, | 2943 'unsafe': True, |
| 2944 'use_helper': True, |
| 2945 'unit_test': False, |
2939 }, | 2946 }, |
2940 'GetActiveAttrib': { | 2947 'GetActiveAttrib': { |
2941 'type': 'Custom', | 2948 'type': 'Custom', |
2942 'data_transfer_methods': ['shm'], | 2949 'data_transfer_methods': ['shm'], |
2943 'cmd_args': | 2950 'cmd_args': |
2944 'GLidProgram program, GLuint index, uint32_t name_bucket_id, ' | 2951 'GLidProgram program, GLuint index, uint32_t name_bucket_id, ' |
2945 'void* result', | 2952 'void* result', |
2946 'result': [ | 2953 'result': [ |
2947 'int32_t success', | 2954 'int32_t success', |
2948 'int32_t size', | 2955 'int32_t size', |
(...skipping 458 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3407 'expectation': False, | 3414 'expectation': False, |
3408 'unsafe': True, | 3415 'unsafe': True, |
3409 }, | 3416 }, |
3410 'IsTexture': { | 3417 'IsTexture': { |
3411 'type': 'Is', | 3418 'type': 'Is', |
3412 'decoder_func': 'DoIsTexture', | 3419 'decoder_func': 'DoIsTexture', |
3413 'expectation': False, | 3420 'expectation': False, |
3414 }, | 3421 }, |
3415 'IsTransformFeedback': { | 3422 'IsTransformFeedback': { |
3416 'type': 'Is', | 3423 'type': 'Is', |
3417 'id_mapping': [ 'TransformFeedback' ], | 3424 'decoder_func': 'DoIsTransformFeedback', |
3418 'expectation': False, | 3425 'expectation': False, |
3419 'unsafe': True, | 3426 'unsafe': True, |
| 3427 'use_helper': True, |
3420 }, | 3428 }, |
3421 'GetLastFlushIdCHROMIUM': { | 3429 'GetLastFlushIdCHROMIUM': { |
3422 'gen_cmd': False, | 3430 'gen_cmd': False, |
3423 'impl_func': 'False', | 3431 'impl_func': 'False', |
3424 'result': ['GLuint'], | 3432 'result': ['GLuint'], |
3425 'extension': True, | 3433 'extension': True, |
3426 }, | 3434 }, |
3427 'LinkProgram': { | 3435 'LinkProgram': { |
3428 'decoder_func': 'DoLinkProgram', | 3436 'decoder_func': 'DoLinkProgram', |
3429 'impl_func': False, | 3437 'impl_func': False, |
(...skipping 27 matching lines...) Expand all Loading... |
3457 'data_transfer_methods': ['shm'], | 3465 'data_transfer_methods': ['shm'], |
3458 'cmd_args': 'GLenumBufferTarget target, GLintptrNotNegative offset, ' | 3466 'cmd_args': 'GLenumBufferTarget target, GLintptrNotNegative offset, ' |
3459 'GLsizeiptr size, GLbitfieldMapBufferAccess access, ' | 3467 'GLsizeiptr size, GLbitfieldMapBufferAccess access, ' |
3460 'uint32_t data_shm_id, uint32_t data_shm_offset, ' | 3468 'uint32_t data_shm_id, uint32_t data_shm_offset, ' |
3461 'uint32_t result_shm_id, uint32_t result_shm_offset', | 3469 'uint32_t result_shm_id, uint32_t result_shm_offset', |
3462 'unsafe': True, | 3470 'unsafe': True, |
3463 'result': ['uint32_t'], | 3471 'result': ['uint32_t'], |
3464 'trace_level': 1, | 3472 'trace_level': 1, |
3465 }, | 3473 }, |
3466 'PauseTransformFeedback': { | 3474 'PauseTransformFeedback': { |
| 3475 'decoder_func': 'DoPauseTransformFeedback', |
| 3476 'unit_test': False, |
3467 'unsafe': True, | 3477 'unsafe': True, |
3468 }, | 3478 }, |
3469 'PixelStorei': {'type': 'Manual'}, | 3479 'PixelStorei': {'type': 'Manual'}, |
3470 'PostSubBufferCHROMIUM': { | 3480 'PostSubBufferCHROMIUM': { |
3471 'type': 'Custom', | 3481 'type': 'Custom', |
3472 'impl_func': False, | 3482 'impl_func': False, |
3473 'unit_test': False, | 3483 'unit_test': False, |
3474 'client_test': False, | 3484 'client_test': False, |
3475 'extension': True, | 3485 'extension': True, |
3476 'chromium': True, | 3486 'chromium': True, |
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3554 'int32_t num_rows', | 3564 'int32_t num_rows', |
3555 ], | 3565 ], |
3556 'defer_reads': True, | 3566 'defer_reads': True, |
3557 'trace_level': 1, | 3567 'trace_level': 1, |
3558 }, | 3568 }, |
3559 'ReleaseShaderCompiler': { | 3569 'ReleaseShaderCompiler': { |
3560 'decoder_func': 'DoReleaseShaderCompiler', | 3570 'decoder_func': 'DoReleaseShaderCompiler', |
3561 'unit_test': False, | 3571 'unit_test': False, |
3562 }, | 3572 }, |
3563 'ResumeTransformFeedback': { | 3573 'ResumeTransformFeedback': { |
| 3574 'decoder_func': 'DoResumeTransformFeedback', |
| 3575 'unit_test': False, |
3564 'unsafe': True, | 3576 'unsafe': True, |
3565 }, | 3577 }, |
3566 'SamplerParameterf': { | 3578 'SamplerParameterf': { |
3567 'valid_args': { | 3579 'valid_args': { |
3568 '2': 'GL_NEAREST' | 3580 '2': 'GL_NEAREST' |
3569 }, | 3581 }, |
3570 'decoder_func': 'DoSamplerParameterf', | 3582 'decoder_func': 'DoSamplerParameterf', |
3571 'unsafe': True, | 3583 'unsafe': True, |
3572 'use_helper': True, | 3584 'use_helper': True, |
3573 }, | 3585 }, |
(...skipping 545 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4119 }, | 4131 }, |
4120 'BeginQueryEXT': { | 4132 'BeginQueryEXT': { |
4121 'type': 'Manual', | 4133 'type': 'Manual', |
4122 'cmd_args': 'GLenumQueryTarget target, GLidQuery id, void* sync_data', | 4134 'cmd_args': 'GLenumQueryTarget target, GLidQuery id, void* sync_data', |
4123 'data_transfer_methods': ['shm'], | 4135 'data_transfer_methods': ['shm'], |
4124 'gl_test_func': 'glBeginQuery', | 4136 'gl_test_func': 'glBeginQuery', |
4125 'pepper_interface': 'Query', | 4137 'pepper_interface': 'Query', |
4126 'extension': "occlusion_query_EXT", | 4138 'extension': "occlusion_query_EXT", |
4127 }, | 4139 }, |
4128 'BeginTransformFeedback': { | 4140 'BeginTransformFeedback': { |
| 4141 'decoder_func': 'DoBeginTransformFeedback', |
| 4142 'unit_test': False, |
4129 'unsafe': True, | 4143 'unsafe': True, |
4130 }, | 4144 }, |
4131 'EndQueryEXT': { | 4145 'EndQueryEXT': { |
4132 'type': 'Manual', | 4146 'type': 'Manual', |
4133 'cmd_args': 'GLenumQueryTarget target, GLuint submit_count', | 4147 'cmd_args': 'GLenumQueryTarget target, GLuint submit_count', |
4134 'gl_test_func': 'glEndnQuery', | 4148 'gl_test_func': 'glEndnQuery', |
4135 'client_test': False, | 4149 'client_test': False, |
4136 'pepper_interface': 'Query', | 4150 'pepper_interface': 'Query', |
4137 'extension': "occlusion_query_EXT", | 4151 'extension': "occlusion_query_EXT", |
4138 }, | 4152 }, |
4139 'EndTransformFeedback': { | 4153 'EndTransformFeedback': { |
| 4154 'decoder_func': 'DoEndTransformFeedback', |
| 4155 'unit_test': False, |
4140 'unsafe': True, | 4156 'unsafe': True, |
4141 }, | 4157 }, |
4142 'FlushDriverCachesCHROMIUM': { | 4158 'FlushDriverCachesCHROMIUM': { |
4143 'decoder_func': 'DoFlushDriverCachesCHROMIUM', | 4159 'decoder_func': 'DoFlushDriverCachesCHROMIUM', |
4144 'unit_test': False, | 4160 'unit_test': False, |
4145 'extension': True, | 4161 'extension': True, |
4146 'chromium': True, | 4162 'chromium': True, |
4147 'trace_level': 1, | 4163 'trace_level': 1, |
4148 }, | 4164 }, |
4149 'GetQueryivEXT': { | 4165 'GetQueryivEXT': { |
(...skipping 7366 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
11516 Format(gen.generated_cpp_filenames) | 11532 Format(gen.generated_cpp_filenames) |
11517 | 11533 |
11518 if gen.errors > 0: | 11534 if gen.errors > 0: |
11519 print "%d errors" % gen.errors | 11535 print "%d errors" % gen.errors |
11520 return 1 | 11536 return 1 |
11521 return 0 | 11537 return 0 |
11522 | 11538 |
11523 | 11539 |
11524 if __name__ == '__main__': | 11540 if __name__ == '__main__': |
11525 sys.exit(main(sys.argv[1:])) | 11541 sys.exit(main(sys.argv[1:])) |
OLD | NEW |