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

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

Issue 740083003: Add unsafe ES3 APIs to command buffer: glTexStorage3D (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@cb
Patch Set: Created 6 years 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
« no previous file with comments | « gpu/GLES2/gl2chromium_autogen.h ('k') | gpu/command_buffer/client/gles2_c_lib_autogen.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 670 matching lines...) Expand 10 before | Expand all | Expand 10 after
681 'GL_TEXTURE_CUBE_MAP_NEGATIVE_X', 681 'GL_TEXTURE_CUBE_MAP_NEGATIVE_X',
682 'GL_TEXTURE_CUBE_MAP_POSITIVE_Y', 682 'GL_TEXTURE_CUBE_MAP_POSITIVE_Y',
683 'GL_TEXTURE_CUBE_MAP_NEGATIVE_Y', 683 'GL_TEXTURE_CUBE_MAP_NEGATIVE_Y',
684 'GL_TEXTURE_CUBE_MAP_POSITIVE_Z', 684 'GL_TEXTURE_CUBE_MAP_POSITIVE_Z',
685 'GL_TEXTURE_CUBE_MAP_NEGATIVE_Z', 685 'GL_TEXTURE_CUBE_MAP_NEGATIVE_Z',
686 ], 686 ],
687 'invalid': [ 687 'invalid': [
688 'GL_PROXY_TEXTURE_CUBE_MAP', 688 'GL_PROXY_TEXTURE_CUBE_MAP',
689 ] 689 ]
690 }, 690 },
691 'Texture3DTarget': {
692 'type': 'GLenum',
693 'valid': [
694 'GL_TEXTURE_3D',
695 'GL_TEXTURE_2D_ARRAY',
696 ],
697 'invalid': [
698 'GL_TEXTURE_2D',
699 ]
700 },
691 'TextureBindTarget': { 701 'TextureBindTarget': {
692 'type': 'GLenum', 702 'type': 'GLenum',
693 'valid': [ 703 'valid': [
694 'GL_TEXTURE_2D', 704 'GL_TEXTURE_2D',
695 'GL_TEXTURE_CUBE_MAP', 705 'GL_TEXTURE_CUBE_MAP',
696 ], 706 ],
697 'invalid': [ 707 'invalid': [
698 'GL_TEXTURE_1D', 708 'GL_TEXTURE_1D',
699 'GL_TEXTURE_3D', 709 'GL_TEXTURE_3D',
700 ], 710 ],
(...skipping 1504 matching lines...) Expand 10 before | Expand all | Expand 10 after
2205 'first_element_only': True, 2215 'first_element_only': True,
2206 }, 2216 },
2207 'TexParameteriv': { 2217 'TexParameteriv': {
2208 'type': 'PUT', 2218 'type': 'PUT',
2209 'data_value': 'GL_NEAREST', 2219 'data_value': 'GL_NEAREST',
2210 'count': 1, 2220 'count': 1,
2211 'decoder_func': 'DoTexParameteriv', 2221 'decoder_func': 'DoTexParameteriv',
2212 'gl_test_func': 'glTexParameteri', 2222 'gl_test_func': 'glTexParameteri',
2213 'first_element_only': True, 2223 'first_element_only': True,
2214 }, 2224 },
2225 'TexStorage3D': {
2226 'unsafe': True,
2227 },
2215 'TexSubImage2D': { 2228 'TexSubImage2D': {
2216 'type': 'Manual', 2229 'type': 'Manual',
2217 'data_transfer_methods': ['shm'], 2230 'data_transfer_methods': ['shm'],
2218 'client_test': False, 2231 'client_test': False,
2219 'cmd_args': 'GLenumTextureTarget target, GLint level, ' 2232 'cmd_args': 'GLenumTextureTarget target, GLint level, '
2220 'GLint xoffset, GLint yoffset, ' 2233 'GLint xoffset, GLint yoffset, '
2221 'GLsizei width, GLsizei height, ' 2234 'GLsizei width, GLsizei height, '
2222 'GLenumTextureFormat format, GLenumPixelType type, ' 2235 'GLenumTextureFormat format, GLenumPixelType type, '
2223 'const void* pixels, GLboolean internal' 2236 'const void* pixels, GLboolean internal'
2224 }, 2237 },
(...skipping 6238 matching lines...) Expand 10 before | Expand all | Expand 10 after
8463 file.Write("\n") 8476 file.Write("\n")
8464 file.Close() 8477 file.Close()
8465 self.generated_cpp_filenames.append(file.filename) 8478 self.generated_cpp_filenames.append(file.filename)
8466 8479
8467 def WriteCommonUtilsImpl(self, filename): 8480 def WriteCommonUtilsImpl(self, filename):
8468 """Writes the gles2 common utility header.""" 8481 """Writes the gles2 common utility header."""
8469 enum_re = re.compile(r'\#define\s+(GL_[a-zA-Z0-9_]+)\s+([0-9A-Fa-fx]+)') 8482 enum_re = re.compile(r'\#define\s+(GL_[a-zA-Z0-9_]+)\s+([0-9A-Fa-fx]+)')
8470 dict = {} 8483 dict = {}
8471 for fname in ['third_party/khronos/GLES2/gl2.h', 8484 for fname in ['third_party/khronos/GLES2/gl2.h',
8472 'third_party/khronos/GLES2/gl2ext.h', 8485 'third_party/khronos/GLES2/gl2ext.h',
8486 'third_party/khronos/GLES3/gl3.h',
8473 'gpu/GLES2/gl2chromium.h', 8487 'gpu/GLES2/gl2chromium.h',
8474 'gpu/GLES2/gl2extchromium.h']: 8488 'gpu/GLES2/gl2extchromium.h']:
8475 lines = open(fname).readlines() 8489 lines = open(fname).readlines()
8476 for line in lines: 8490 for line in lines:
8477 m = enum_re.match(line) 8491 m = enum_re.match(line)
8478 if m: 8492 if m:
8479 name = m.group(1) 8493 name = m.group(1)
8480 value = m.group(2) 8494 value = m.group(2)
8481 if len(value) <= 10: 8495 if len(value) <= 10:
8482 if not value in dict: 8496 if not value in dict:
(...skipping 379 matching lines...) Expand 10 before | Expand all | Expand 10 after
8862 Format(gen.generated_cpp_filenames) 8876 Format(gen.generated_cpp_filenames)
8863 8877
8864 if gen.errors > 0: 8878 if gen.errors > 0:
8865 print "%d errors" % gen.errors 8879 print "%d errors" % gen.errors
8866 return 1 8880 return 1
8867 return 0 8881 return 0
8868 8882
8869 8883
8870 if __name__ == '__main__': 8884 if __name__ == '__main__':
8871 sys.exit(main(sys.argv[1:])) 8885 sys.exit(main(sys.argv[1:]))
OLDNEW
« no previous file with comments | « gpu/GLES2/gl2chromium_autogen.h ('k') | gpu/command_buffer/client/gles2_c_lib_autogen.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698