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 1490 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1501 'BindBufferBase': { | 1501 'BindBufferBase': { |
1502 'type': 'Bind', | 1502 'type': 'Bind', |
1503 'id_mapping': [ 'Buffer' ], | 1503 'id_mapping': [ 'Buffer' ], |
1504 'gen_func': 'GenBuffersARB', | 1504 'gen_func': 'GenBuffersARB', |
1505 'unsafe': True, | 1505 'unsafe': True, |
1506 }, | 1506 }, |
1507 'BindBufferRange': { | 1507 'BindBufferRange': { |
1508 'type': 'Bind', | 1508 'type': 'Bind', |
1509 'id_mapping': [ 'Buffer' ], | 1509 'id_mapping': [ 'Buffer' ], |
1510 'gen_func': 'GenBuffersARB', | 1510 'gen_func': 'GenBuffersARB', |
| 1511 'valid_args': { |
| 1512 '3': '4', |
| 1513 '4': '4' |
| 1514 }, |
1511 'unsafe': True, | 1515 'unsafe': True, |
1512 }, | 1516 }, |
1513 'BindFramebuffer': { | 1517 'BindFramebuffer': { |
1514 'type': 'Bind', | 1518 'type': 'Bind', |
1515 'decoder_func': 'DoBindFramebuffer', | 1519 'decoder_func': 'DoBindFramebuffer', |
1516 'gl_test_func': 'glBindFramebufferEXT', | 1520 'gl_test_func': 'glBindFramebufferEXT', |
1517 'gen_func': 'GenFramebuffersEXT', | 1521 'gen_func': 'GenFramebuffersEXT', |
1518 'trace_level': 1, | 1522 'trace_level': 1, |
1519 }, | 1523 }, |
1520 'BindRenderbuffer': { | 1524 'BindRenderbuffer': { |
(...skipping 502 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2023 'data_transfer_methods': ['shm'], | 2027 'data_transfer_methods': ['shm'], |
2024 'cmd_args': | 2028 'cmd_args': |
2025 'GLidProgram program, GLuint index, uint32_t name_bucket_id, ' | 2029 'GLidProgram program, GLuint index, uint32_t name_bucket_id, ' |
2026 'void* result', | 2030 'void* result', |
2027 'result': [ | 2031 'result': [ |
2028 'int32_t success', | 2032 'int32_t success', |
2029 'int32_t size', | 2033 'int32_t size', |
2030 'uint32_t type', | 2034 'uint32_t type', |
2031 ], | 2035 ], |
2032 }, | 2036 }, |
| 2037 'GetActiveUniformBlockName': { |
| 2038 'type': 'Custom', |
| 2039 'data_transfer_methods': ['shm'], |
| 2040 'cmd_args': |
| 2041 'GLidProgram program, GLuint index, uint32_t name_bucket_id, ' |
| 2042 'void* result', |
| 2043 'result': ['int32_t'], |
| 2044 'unsafe': True, |
| 2045 }, |
2033 'GetAttachedShaders': { | 2046 'GetAttachedShaders': { |
2034 'type': 'Custom', | 2047 'type': 'Custom', |
2035 'data_transfer_methods': ['shm'], | 2048 'data_transfer_methods': ['shm'], |
2036 'cmd_args': 'GLidProgram program, void* result, uint32_t result_size', | 2049 'cmd_args': 'GLidProgram program, void* result, uint32_t result_size', |
2037 'result': ['SizedResult<GLuint>'], | 2050 'result': ['SizedResult<GLuint>'], |
2038 }, | 2051 }, |
2039 'GetAttribLocation': { | 2052 'GetAttribLocation': { |
2040 'type': 'Custom', | 2053 'type': 'Custom', |
2041 'data_transfer_methods': ['shm'], | 2054 'data_transfer_methods': ['shm'], |
2042 'cmd_args': | 2055 'cmd_args': |
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2193 'type': 'GETn', | 2206 'type': 'GETn', |
2194 'decoder_func': 'DoGetTexParameteriv', | 2207 'decoder_func': 'DoGetTexParameteriv', |
2195 'result': ['SizedResult<GLint>'] | 2208 'result': ['SizedResult<GLint>'] |
2196 }, | 2209 }, |
2197 'GetTranslatedShaderSourceANGLE': { | 2210 'GetTranslatedShaderSourceANGLE': { |
2198 'type': 'STRn', | 2211 'type': 'STRn', |
2199 'get_len_func': 'DoGetShaderiv', | 2212 'get_len_func': 'DoGetShaderiv', |
2200 'get_len_enum': 'GL_TRANSLATED_SHADER_SOURCE_LENGTH_ANGLE', | 2213 'get_len_enum': 'GL_TRANSLATED_SHADER_SOURCE_LENGTH_ANGLE', |
2201 'unit_test': False, | 2214 'unit_test': False, |
2202 'extension': True, | 2215 'extension': True, |
2203 }, | 2216 }, |
| 2217 'GetUniformBlockIndex': { |
| 2218 'type': 'Custom', |
| 2219 'data_transfer_methods': ['shm'], |
| 2220 'cmd_args': |
| 2221 'GLidProgram program, uint32_t name_bucket_id, GLuint* index', |
| 2222 'result': ['GLuint'], |
| 2223 'error_return': 'GL_INVALID_INDEX', |
| 2224 'unsafe': True, |
| 2225 }, |
| 2226 'GetUniformBlocksCHROMIUM': { |
| 2227 'type': 'Custom', |
| 2228 'expectation': False, |
| 2229 'impl_func': False, |
| 2230 'extension': True, |
| 2231 'chromium': True, |
| 2232 'client_test': False, |
| 2233 'cmd_args': 'GLidProgram program, uint32_t bucket_id', |
| 2234 'result': ['uint32_t'], |
| 2235 'unsafe': True, |
| 2236 }, |
2204 'GetUniformfv': { | 2237 'GetUniformfv': { |
2205 'type': 'Custom', | 2238 'type': 'Custom', |
2206 'data_transfer_methods': ['shm'], | 2239 'data_transfer_methods': ['shm'], |
2207 'result': ['SizedResult<GLfloat>'], | 2240 'result': ['SizedResult<GLfloat>'], |
2208 }, | 2241 }, |
2209 'GetUniformiv': { | 2242 'GetUniformiv': { |
2210 'type': 'Custom', | 2243 'type': 'Custom', |
2211 'data_transfer_methods': ['shm'], | 2244 'data_transfer_methods': ['shm'], |
2212 'result': ['SizedResult<GLint>'], | 2245 'result': ['SizedResult<GLint>'], |
2213 }, | 2246 }, |
(...skipping 800 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3014 'chromium': True, | 3047 'chromium': True, |
3015 'client_test': False, | 3048 'client_test': False, |
3016 }, | 3049 }, |
3017 'ShallowFlushCHROMIUM': { | 3050 'ShallowFlushCHROMIUM': { |
3018 'impl_func': False, | 3051 'impl_func': False, |
3019 'gen_cmd': False, | 3052 'gen_cmd': False, |
3020 'extension': True, | 3053 'extension': True, |
3021 'chromium': True, | 3054 'chromium': True, |
3022 'client_test': False, | 3055 'client_test': False, |
3023 }, | 3056 }, |
| 3057 'OrderingBarrierCHROMIUM': { |
| 3058 'impl_func': False, |
| 3059 'gen_cmd': False, |
| 3060 'extension': True, |
| 3061 'chromium': True, |
| 3062 'client_test': False, |
| 3063 }, |
3024 'TraceBeginCHROMIUM': { | 3064 'TraceBeginCHROMIUM': { |
3025 'type': 'Custom', | 3065 'type': 'Custom', |
3026 'impl_func': False, | 3066 'impl_func': False, |
3027 'client_test': False, | 3067 'client_test': False, |
3028 'cmd_args': 'GLuint category_bucket_id, GLuint name_bucket_id', | 3068 'cmd_args': 'GLuint category_bucket_id, GLuint name_bucket_id', |
3029 'extension': True, | 3069 'extension': True, |
3030 'chromium': True, | 3070 'chromium': True, |
3031 }, | 3071 }, |
3032 'TraceEndCHROMIUM': { | 3072 'TraceEndCHROMIUM': { |
3033 'impl_func': False, | 3073 'impl_func': False, |
(...skipping 7064 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
10098 Format(gen.generated_cpp_filenames) | 10138 Format(gen.generated_cpp_filenames) |
10099 | 10139 |
10100 if gen.errors > 0: | 10140 if gen.errors > 0: |
10101 print "%d errors" % gen.errors | 10141 print "%d errors" % gen.errors |
10102 return 1 | 10142 return 1 |
10103 return 0 | 10143 return 0 |
10104 | 10144 |
10105 | 10145 |
10106 if __name__ == '__main__': | 10146 if __name__ == '__main__': |
10107 sys.exit(main(sys.argv[1:])) | 10147 sys.exit(main(sys.argv[1:])) |
OLD | NEW |