| 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 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 143 'state_flag': 'framebuffer_state_.clear_state_dirty', | 143 'state_flag': 'framebuffer_state_.clear_state_dirty', |
| 144 }, | 144 }, |
| 145 'ClearStencil': { | 145 'ClearStencil': { |
| 146 'type': 'Normal', | 146 'type': 'Normal', |
| 147 'func': 'ClearStencil', | 147 'func': 'ClearStencil', |
| 148 'enum': 'GL_STENCIL_CLEAR_VALUE', | 148 'enum': 'GL_STENCIL_CLEAR_VALUE', |
| 149 'states': [ | 149 'states': [ |
| 150 {'name': 'stencil_clear', 'type': 'GLint', 'default': '0'}, | 150 {'name': 'stencil_clear', 'type': 'GLint', 'default': '0'}, |
| 151 ], | 151 ], |
| 152 }, | 152 }, |
| 153 'CoverageModulationCHROMIUM': { |
| 154 'type': 'Normal', |
| 155 'func': 'CoverageModulationNV', |
| 156 'extension_flag': 'chromium_framebuffer_mixed_samples', |
| 157 'states': [ |
| 158 { 'enum': 'GL_COVERAGE_MODULATION_CHROMIUM', |
| 159 'name': 'coverage_modulation', |
| 160 'type': 'GLenum', |
| 161 'default': 'GL_NONE', |
| 162 }, |
| 163 ] |
| 164 }, |
| 153 'BlendColor': { | 165 'BlendColor': { |
| 154 'type': 'Normal', | 166 'type': 'Normal', |
| 155 'func': 'BlendColor', | 167 'func': 'BlendColor', |
| 156 'enum': 'GL_BLEND_COLOR', | 168 'enum': 'GL_BLEND_COLOR', |
| 157 'states': [ | 169 'states': [ |
| 158 {'name': 'blend_color_red', 'type': 'GLfloat', 'default': '0.0f'}, | 170 {'name': 'blend_color_red', 'type': 'GLfloat', 'default': '0.0f'}, |
| 159 {'name': 'blend_color_green', 'type': 'GLfloat', 'default': '0.0f'}, | 171 {'name': 'blend_color_green', 'type': 'GLfloat', 'default': '0.0f'}, |
| 160 {'name': 'blend_color_blue', 'type': 'GLfloat', 'default': '0.0f'}, | 172 {'name': 'blend_color_blue', 'type': 'GLfloat', 'default': '0.0f'}, |
| 161 {'name': 'blend_color_alpha', 'type': 'GLfloat', 'default': '0.0f'}, | 173 {'name': 'blend_color_alpha', 'type': 'GLfloat', 'default': '0.0f'}, |
| 162 ], | 174 ], |
| (...skipping 483 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 646 'type': 'GLenum', | 658 'type': 'GLenum', |
| 647 'is_complete': True, | 659 'is_complete': True, |
| 648 'valid': [ | 660 'valid': [ |
| 649 'GL_NEAREST', | 661 'GL_NEAREST', |
| 650 'GL_LINEAR', | 662 'GL_LINEAR', |
| 651 ], | 663 ], |
| 652 'invalid': [ | 664 'invalid': [ |
| 653 'GL_LINEAR_MIPMAP_LINEAR', | 665 'GL_LINEAR_MIPMAP_LINEAR', |
| 654 ], | 666 ], |
| 655 }, | 667 }, |
| 668 'CoverageModulationComponents': { |
| 669 'type': 'GLenum', |
| 670 'valid': [ |
| 671 'GL_RGB', 'GL_RGBA', 'GL_ALPHA', 'GL_NONE' |
| 672 ], |
| 673 }, |
| 656 'FrameBufferTarget': { | 674 'FrameBufferTarget': { |
| 657 'type': 'GLenum', | 675 'type': 'GLenum', |
| 658 'valid': [ | 676 'valid': [ |
| 659 'GL_FRAMEBUFFER', | 677 'GL_FRAMEBUFFER', |
| 660 ], | 678 ], |
| 661 'valid_es3': [ | 679 'valid_es3': [ |
| 662 'GL_DRAW_FRAMEBUFFER' , | 680 'GL_DRAW_FRAMEBUFFER' , |
| 663 'GL_READ_FRAMEBUFFER' , | 681 'GL_READ_FRAMEBUFFER' , |
| 664 ], | 682 ], |
| 665 'invalid': [ | 683 'invalid': [ |
| (...skipping 1772 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2438 'count': 64, # GL_MAILBOX_SIZE_CHROMIUM | 2456 'count': 64, # GL_MAILBOX_SIZE_CHROMIUM |
| 2439 'unit_test': False, | 2457 'unit_test': False, |
| 2440 'client_test': False, | 2458 'client_test': False, |
| 2441 'extension': "CHROMIUM_texture_mailbox", | 2459 'extension': "CHROMIUM_texture_mailbox", |
| 2442 'chromium': True, | 2460 'chromium': True, |
| 2443 'trace_level': 2, | 2461 'trace_level': 2, |
| 2444 }, | 2462 }, |
| 2445 'CopyBufferSubData': { | 2463 'CopyBufferSubData': { |
| 2446 'unsafe': True, | 2464 'unsafe': True, |
| 2447 }, | 2465 }, |
| 2466 'CoverageModulationCHROMIUM': { |
| 2467 'type': 'StateSet', |
| 2468 'state': 'CoverageModulationCHROMIUM', |
| 2469 'decoder_func': 'glCoverageModulationNV', |
| 2470 'chromium': True, |
| 2471 'extension': 'CHROMIUM_framebuffer_mixed_samples', |
| 2472 'extension_flag': 'chromium_framebuffer_mixed_samples', |
| 2473 }, |
| 2448 'CreateAndConsumeTextureCHROMIUM': { | 2474 'CreateAndConsumeTextureCHROMIUM': { |
| 2449 'decoder_func': 'DoCreateAndConsumeTextureCHROMIUM', | 2475 'decoder_func': 'DoCreateAndConsumeTextureCHROMIUM', |
| 2450 'impl_func': False, | 2476 'impl_func': False, |
| 2451 'type': 'HandWritten', | 2477 'type': 'HandWritten', |
| 2452 'data_transfer_methods': ['immediate'], | 2478 'data_transfer_methods': ['immediate'], |
| 2453 'unit_test': False, | 2479 'unit_test': False, |
| 2454 'client_test': False, | 2480 'client_test': False, |
| 2455 'extension': "CHROMIUM_texture_mailbox", | 2481 'extension': "CHROMIUM_texture_mailbox", |
| 2456 'chromium': True, | 2482 'chromium': True, |
| 2457 'trace_level': 2, | 2483 'trace_level': 2, |
| (...skipping 8977 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 11435 Format(gen.generated_cpp_filenames) | 11461 Format(gen.generated_cpp_filenames) |
| 11436 | 11462 |
| 11437 if gen.errors > 0: | 11463 if gen.errors > 0: |
| 11438 print "%d errors" % gen.errors | 11464 print "%d errors" % gen.errors |
| 11439 return 1 | 11465 return 1 |
| 11440 return 0 | 11466 return 0 |
| 11441 | 11467 |
| 11442 | 11468 |
| 11443 if __name__ == '__main__': | 11469 if __name__ == '__main__': |
| 11444 sys.exit(main(sys.argv[1:])) | 11470 sys.exit(main(sys.argv[1:])) |
| OLD | NEW |