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

Side by Side Diff: ui/gl/generate_bindings.py

Issue 887113003: Fix incorrect binding spec for multisampled_render_to_texture APIs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 10 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
« no previous file with comments | « no previous file | ui/gl/gl_bindings_autogen_gl.cc » ('j') | ui/gl/gl_bindings_autogen_gl.cc » ('J')
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 GL/GLES extension wrangler.""" 6 """code generator for GL/GLES extension wrangler."""
7 7
8 import optparse 8 import optparse
9 import os 9 import os
10 import collections 10 import collections
(...skipping 799 matching lines...) Expand 10 before | Expand all | Expand 10 after
810 'names': ['glReadBuffer'], 810 'names': ['glReadBuffer'],
811 'arguments': 'GLenum src', }, 811 'arguments': 'GLenum src', },
812 { 'return_type': 'void', 812 { 'return_type': 'void',
813 'names': ['glReadPixels'], 813 'names': ['glReadPixels'],
814 'arguments': 814 'arguments':
815 'GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, ' 815 'GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, '
816 'GLenum type, void* pixels', }, 816 'GLenum type, void* pixels', },
817 { 'return_type': 'void', 817 { 'return_type': 'void',
818 'names': ['glReleaseShaderCompiler'], 818 'names': ['glReleaseShaderCompiler'],
819 'arguments': 'void', }, 819 'arguments': 'void', },
820 # Multisampling API is different in different GL versions, some require an
821 # explicit resolve step for renderbuffers and/or FBO texture attachments and
822 # some do not. Multiple alternatives might be present in a single
823 # implementation, which require different use of the API and may have
824 # different performance (explicit resolve performing worse, for example).
825 # So even though the function signature is the same across versions, we split
826 # their definitions so that the function to use can be chosen correctly at a
827 # higher level.
828 # TODO(oetuaho@nvidia.com): Some of these might still be possible to combine.
829 # This could also fix weirdness in the mock bindings that's caused by the same
830 # function name appearing multiple times.
831 # This is the ES3 function, which requires explicit resolve:
832 { 'return_type': 'void', 820 { 'return_type': 'void',
833 'names': ['glRenderbufferStorageEXT', 'glRenderbufferStorage'], 821 'names': ['glRenderbufferStorageEXT', 'glRenderbufferStorage'],
834 'arguments': 822 'arguments':
835 'GLenum target, GLenum internalformat, GLsizei width, GLsizei height', }, 823 'GLenum target, GLenum internalformat, GLsizei width, GLsizei height', },
836 { 'return_type': 'void', 824 { 'return_type': 'void',
837 'names': ['glRenderbufferStorageMultisample'], 825 'names': ['glRenderbufferStorageMultisample'],
838 'arguments': 'GLenum target, GLsizei samples, GLenum internalformat, ' 826 'arguments': 'GLenum target, GLsizei samples, GLenum internalformat, '
839 'GLsizei width, GLsizei height', }, 827 'GLsizei width, GLsizei height', },
840 { 'return_type': 'void', 828 { 'return_type': 'void',
841 'names': ['glRenderbufferStorageMultisampleANGLE', 829 'names': ['glRenderbufferStorageMultisampleANGLE'],
842 'glRenderbufferStorageMultisample'],
843 'arguments': 'GLenum target, GLsizei samples, GLenum internalformat, '
844 'GLsizei width, GLsizei height', },
845 # In desktop GL, EXT and core versions both have an explicit resolve step,
846 # though desktop core GL implicitly resolves when drawing to a window.
847 # TODO(oetuaho@nvidia.com): Right now this function also doubles as ES2 EXT
848 # function, which has implicit resolve, and for which the fallback is wrong.
849 # Fix this.
850 { 'return_type': 'void',
851 'names': ['glRenderbufferStorageMultisampleEXT',
852 'glRenderbufferStorageMultisample'],
853 'arguments': 'GLenum target, GLsizei samples, GLenum internalformat, ' 830 'arguments': 'GLenum target, GLsizei samples, GLenum internalformat, '
854 'GLsizei width, GLsizei height', }, 831 'GLsizei width, GLsizei height', },
855 { 'return_type': 'void', 832 { 'return_type': 'void',
833 'names': ['glRenderbufferStorageMultisampleEXT'],
834 'arguments': 'GLenum target, GLsizei samples, GLenum internalformat, '
835 'GLsizei width, GLsizei height', },
836 { 'return_type': 'void',
856 'names': ['glRenderbufferStorageMultisampleIMG'], 837 'names': ['glRenderbufferStorageMultisampleIMG'],
857 'arguments': 'GLenum target, GLsizei samples, GLenum internalformat, ' 838 'arguments': 'GLenum target, GLsizei samples, GLenum internalformat, '
858 'GLsizei width, GLsizei height', }, 839 'GLsizei width, GLsizei height', },
859 { 'return_type': 'void', 840 { 'return_type': 'void',
860 'versions': [{ 'name': 'glResumeTransformFeedback' }], 841 'versions': [{ 'name': 'glResumeTransformFeedback' }],
861 'arguments': 'void', }, 842 'arguments': 'void', },
862 { 'return_type': 'void', 843 { 'return_type': 'void',
863 'names': ['glSampleCoverage'], 844 'names': ['glSampleCoverage'],
864 'arguments': 'GLclampf value, GLboolean invert', }, 845 'arguments': 'GLclampf value, GLboolean invert', },
865 { 'return_type': 'void', 846 { 'return_type': 'void',
(...skipping 1703 matching lines...) Expand 10 before | Expand all | Expand 10 after
2569 'gl_enums_implementation_autogen.h'), 2550 'gl_enums_implementation_autogen.h'),
2570 'wb') 2551 'wb')
2571 GenerateEnumUtils(header_file, enum_header_filenames) 2552 GenerateEnumUtils(header_file, enum_header_filenames)
2572 header_file.close() 2553 header_file.close()
2573 ClangFormat(header_file.name) 2554 ClangFormat(header_file.name)
2574 return 0 2555 return 0
2575 2556
2576 2557
2577 if __name__ == '__main__': 2558 if __name__ == '__main__':
2578 sys.exit(main(sys.argv[1:])) 2559 sys.exit(main(sys.argv[1:]))
OLDNEW
« no previous file with comments | « no previous file | ui/gl/gl_bindings_autogen_gl.cc » ('j') | ui/gl/gl_bindings_autogen_gl.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698