| Index: ui/gl/generate_bindings.py
|
| diff --git a/ui/gl/generate_bindings.py b/ui/gl/generate_bindings.py
|
| index d40be26a9178519fd7a366dd7a2c38f20dd61210..a133454a63a7af9313f04d7754dbb842cb8980ce 100755
|
| --- a/ui/gl/generate_bindings.py
|
| +++ b/ui/gl/generate_bindings.py
|
| @@ -35,9 +35,14 @@ array instead of the names array. Each version has the following keys:
|
| extensions: Extra Extensions for which the function is bound. Only needed
|
| in some cases where the extension cannot be parsed from the
|
| headers.
|
| + is_optional: Set to True if the function might be missing even if
|
| + the the extension string is present. This can happen
|
| + when the extension is updated with new functions, but
|
| + the extension string does not change.
|
|
|
| By default, the function gets its name from the first name in its names or
|
| versions array. This can be overridden by supplying a 'known_as' key.
|
| +
|
| """
|
| GL_FUNCTIONS = [
|
| { 'return_type': 'void',
|
| @@ -234,6 +239,12 @@ GL_FUNCTIONS = [
|
| 'arguments':
|
| 'GLenum target, GLint level, GLint xoffset, GLint yoffset, '
|
| 'GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height', },
|
| +{ 'return_type': 'void',
|
| + 'names': ['glCoverFillPathNV'],
|
| + 'arguments': 'GLuint path, GLenum coverMode' },
|
| +{ 'return_type': 'void',
|
| + 'names': ['glCoverStrokePathNV'],
|
| + 'arguments': 'GLuint name, GLenum coverMode' },
|
| { 'return_type': 'GLuint',
|
| 'names': ['glCreateProgram'],
|
| 'arguments': 'void', },
|
| @@ -259,6 +270,9 @@ GL_FUNCTIONS = [
|
| 'names': ['glDeleteFramebuffersEXT', 'glDeleteFramebuffers'],
|
| 'arguments': 'GLsizei n, const GLuint* framebuffers', },
|
| { 'return_type': 'void',
|
| + 'names': ['glDeletePathsNV'],
|
| + 'arguments': 'GLuint path, GLsizei range' },
|
| +{ 'return_type': 'void',
|
| 'names': ['glDeleteProgram'],
|
| 'arguments': 'GLuint program', },
|
| { 'return_type': 'void',
|
| @@ -437,6 +451,9 @@ GL_FUNCTIONS = [
|
| { 'return_type': 'void',
|
| 'names': ['glGenFramebuffersEXT', 'glGenFramebuffers'],
|
| 'arguments': 'GLsizei n, GLuint* framebuffers', },
|
| +{ 'return_type': 'GLuint',
|
| + 'names': ['glGenPathsNV'],
|
| + 'arguments': 'GLsizei range' },
|
| { 'return_type': 'void',
|
| 'versions': [{ 'name': 'glGenQueries' },
|
| { 'name': 'glGenQueriesARB', },
|
| @@ -704,6 +721,9 @@ GL_FUNCTIONS = [
|
| 'names': ['glIsFramebufferEXT', 'glIsFramebuffer'],
|
| 'arguments': 'GLuint framebuffer', },
|
| { 'return_type': 'GLboolean',
|
| + 'names': ['glIsPathNV'],
|
| + 'arguments': 'GLuint path' },
|
| +{ 'return_type': 'GLboolean',
|
| 'names': ['glIsProgram'],
|
| 'arguments': 'GLuint program', },
|
| { 'return_type': 'GLboolean',
|
| @@ -770,6 +790,19 @@ GL_FUNCTIONS = [
|
| 'GL_NV_path_rendering'] },],
|
| 'arguments': 'GLenum matrixMode' },
|
| { 'return_type': 'void',
|
| + 'names': ['glPathCommandsNV'],
|
| + 'arguments': 'GLuint path, GLsizei numCommands, const GLubyte* commands, '
|
| + 'GLsizei numCoords, GLenum coordType, const GLvoid* coords' },
|
| +{ 'return_type': 'void',
|
| + 'names': ['glPathParameterfNV'],
|
| + 'arguments': 'GLuint path, GLenum pname, GLfloat value' },
|
| +{ 'return_type': 'void',
|
| + 'names': ['glPathParameteriNV'],
|
| + 'arguments': 'GLuint path, GLenum pname, GLint value' },
|
| +{ 'return_type': 'void',
|
| + 'names': ['glPathStencilFuncNV'],
|
| + 'arguments': 'GLenum func, GLint ref, GLuint mask' },
|
| +{ 'return_type': 'void',
|
| 'versions': [{ 'name': 'glPauseTransformFeedback' }],
|
| 'arguments': 'void', },
|
| { 'return_type': 'void',
|
| @@ -888,6 +921,9 @@ GL_FUNCTIONS = [
|
| });
|
| """, },
|
| { 'return_type': 'void',
|
| + 'names': ['glStencilFillPathNV'],
|
| + 'arguments': 'GLuint path, GLenum fillMode, GLuint mask' },
|
| +{ 'return_type': 'void',
|
| 'names': ['glStencilFunc'],
|
| 'arguments': 'GLenum func, GLint ref, GLuint mask', },
|
| { 'return_type': 'void',
|
| @@ -905,6 +941,17 @@ GL_FUNCTIONS = [
|
| { 'return_type': 'void',
|
| 'names': ['glStencilOpSeparate'],
|
| 'arguments': 'GLenum face, GLenum fail, GLenum zfail, GLenum zpass', },
|
| +{ 'return_type': 'void',
|
| + 'names': ['glStencilStrokePathNV'],
|
| + 'arguments': 'GLuint path, GLint reference, GLuint mask' },
|
| +{ 'return_type': 'void',
|
| + 'names': ['glStencilThenCoverFillPathNV'],
|
| + 'arguments': 'GLuint path, GLenum fillMode, GLuint mask, GLenum coverMode',
|
| + 'is_optional': True, },
|
| +{ 'return_type': 'void',
|
| + 'names': ['glStencilThenCoverStrokePathNV'],
|
| + 'arguments': 'GLuint path, GLint reference, GLuint mask, GLenum coverMode',
|
| + 'is_optional': True, },
|
| { 'return_type': 'GLboolean',
|
| 'known_as': 'glTestFenceAPPLE',
|
| 'versions': [{ 'name': 'glTestFenceAPPLE',
|
| @@ -1892,7 +1939,8 @@ namespace gfx {
|
| file.write(' else if (%s) {\n ' % (cond))
|
|
|
| WriteFuncBinding(file, known_as, version['name'])
|
| - file.write('DCHECK(fn.%sFn);\n' % known_as)
|
| + if not 'is_optional' in func or not func['is_optional']:
|
| + file.write('DCHECK(fn.%sFn);\n' % known_as)
|
| file.write('}\n')
|
| i += 1
|
| first_version = False
|
|
|