Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(216)

Side by Side Diff: gpu/command_buffer/build_gles2_cmd_buffer.py

Issue 1000483002: Added GLES3 Capabilities to the Command Buffer (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Removing some unnecessary code from a prior CL Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 {'name': 'blend'}, 75 {'name': 'blend'},
76 {'name': 'cull_face'}, 76 {'name': 'cull_face'},
77 {'name': 'depth_test', 'state_flag': 'framebuffer_state_.clear_state_dirty'}, 77 {'name': 'depth_test', 'state_flag': 'framebuffer_state_.clear_state_dirty'},
78 {'name': 'dither', 'default': True}, 78 {'name': 'dither', 'default': True},
79 {'name': 'polygon_offset_fill'}, 79 {'name': 'polygon_offset_fill'},
80 {'name': 'sample_alpha_to_coverage'}, 80 {'name': 'sample_alpha_to_coverage'},
81 {'name': 'sample_coverage'}, 81 {'name': 'sample_coverage'},
82 {'name': 'scissor_test'}, 82 {'name': 'scissor_test'},
83 {'name': 'stencil_test', 83 {'name': 'stencil_test',
84 'state_flag': 'framebuffer_state_.clear_state_dirty'}, 84 'state_flag': 'framebuffer_state_.clear_state_dirty'},
85 {'name': 'primitive_restart_fixed_index', 'es3': True},
86 {'name': 'rasterizer_discard', 'es3': True},
85 ] 87 ]
86 88
87 _STATES = { 89 _STATES = {
88 'ClearColor': { 90 'ClearColor': {
89 'type': 'Normal', 91 'type': 'Normal',
90 'func': 'ClearColor', 92 'func': 'ClearColor',
91 'enum': 'GL_COLOR_CLEAR_VALUE', 93 'enum': 'GL_COLOR_CLEAR_VALUE',
92 'states': [ 94 'states': [
93 {'name': 'color_clear_red', 'type': 'GLfloat', 'default': '0.0f'}, 95 {'name': 'color_clear_red', 'type': 'GLfloat', 'default': '0.0f'},
94 {'name': 'color_clear_green', 'type': 'GLfloat', 'default': '0.0f'}, 96 {'name': 'color_clear_green', 'type': 'GLfloat', 'default': '0.0f'},
(...skipping 776 matching lines...) Expand 10 before | Expand all | Expand 10 after
871 'GL_DST_ALPHA', 873 'GL_DST_ALPHA',
872 'GL_ONE_MINUS_DST_ALPHA', 874 'GL_ONE_MINUS_DST_ALPHA',
873 'GL_CONSTANT_COLOR', 875 'GL_CONSTANT_COLOR',
874 'GL_ONE_MINUS_CONSTANT_COLOR', 876 'GL_ONE_MINUS_CONSTANT_COLOR',
875 'GL_CONSTANT_ALPHA', 877 'GL_CONSTANT_ALPHA',
876 'GL_ONE_MINUS_CONSTANT_ALPHA', 878 'GL_ONE_MINUS_CONSTANT_ALPHA',
877 ], 879 ],
878 }, 880 },
879 'Capability': { 881 'Capability': {
880 'type': 'GLenum', 882 'type': 'GLenum',
881 'valid': ["GL_%s" % cap['name'].upper() for cap in _CAPABILITY_FLAGS], 883 'valid': ["GL_%s" % cap['name'].upper() for cap in _CAPABILITY_FLAGS
884 if 'es3' not in cap or cap['es3'] != True],
885 'valid_es3': ["GL_%s" % cap['name'].upper() for cap in _CAPABILITY_FLAGS
886 if 'es3' in cap and cap['es3'] == True],
882 'invalid': [ 887 'invalid': [
883 'GL_CLIP_PLANE0', 888 'GL_CLIP_PLANE0',
884 'GL_POINT_SPRITE', 889 'GL_POINT_SPRITE',
885 ], 890 ],
886 }, 891 },
887 'DrawMode': { 892 'DrawMode': {
888 'type': 'GLenum', 893 'type': 'GLenum',
889 'valid': [ 894 'valid': [
890 'GL_POINTS', 895 'GL_POINTS',
891 'GL_LINE_STRIP', 896 'GL_LINE_STRIP',
(...skipping 9399 matching lines...) Expand 10 before | Expand all | Expand 10 after
10291 Format(gen.generated_cpp_filenames) 10296 Format(gen.generated_cpp_filenames)
10292 10297
10293 if gen.errors > 0: 10298 if gen.errors > 0:
10294 print "%d errors" % gen.errors 10299 print "%d errors" % gen.errors
10295 return 1 10300 return 1
10296 return 0 10301 return 0
10297 10302
10298 10303
10299 if __name__ == '__main__': 10304 if __name__ == '__main__':
10300 sys.exit(main(sys.argv[1:])) 10305 sys.exit(main(sys.argv[1:]))
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698