opengl: Update headers and registry and regenerate *api.in
- Update the registry xml files and python scripts in glgen2. Took
r32166 from:
https://cvs.khronos.org/svn/repos/ogl/trunk/doc/registry/public/api/
- Update the GLES headers (and add gl32.h). Took r32166 from:
https://cvs.khronos.org/svn/repos/registry/trunk/public/gles/api/
- Include gl32.h in libs/hooks.h
- Update glgen2/glgen.py to properly handle glPathGlyphIndexRangeNV
which uses an explicit array parameter (and is the only GL extension
that does this). This modification also fixes a bunch of whitespace
issues in the *.in files.
- Get rid of the remaining bits of glTrace code in glgen2/glgen.py
- Regenerate the *.in files with glgen2
- The official glext.h hasn't been updated and differs from the
registry in the second to last argument to glMultiDrawElementsEXT.
This file was previously modified to match the registry and this
modification has been carried forward in this commit.
- getProcAddress.cpp was failing to compile for ARM because the
inline assembly for loading the function pointer now exceeds the
limit of 4095 for an immediate offset to the ldr instruction on ARM.
Modify it to instead load the offset into a register and add it with
an add instruction before the ldr instruction.
- Khronos has added #ifdef GL_GLEXT_PROTOTYPES guards to the function
prototypes in gl2/3.h. In order to keep existing code compiling add
#define GL_GLEXT_PROTOTYPES to include/KHR/khrplatform.h for now.
This should be fixed upstream and when it is this can be removed.
Change-Id: I952ace43879557d7c363810b83d65159ad2ad1e3
diff --git a/opengl/tools/glgen2/registry/genheaders.py b/opengl/tools/glgen2/registry/genheaders.py
index 78a4a43..fef79ea 100755
--- a/opengl/tools/glgen2/registry/genheaders.py
+++ b/opengl/tools/glgen2/registry/genheaders.py
@@ -1,6 +1,6 @@
#!/usr/bin/env python
#
-# Copyright (c) 2013-2014 The Khronos Group Inc.
+# Copyright (c) 2013-2015 The Khronos Group Inc.
#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and/or associated documentation files (the
@@ -140,7 +140,7 @@
# Copyright text prefixing all headers (list of strings).
prefixStrings = [
'/*',
- '** Copyright (c) 2013-2014 The Khronos Group Inc.',
+ '** Copyright (c) 2013-2015 The Khronos Group Inc.',
'**',
'** Permission is hereby granted, free of charge, to any person obtaining a',
'** copy of this software and/or associated documentation files (the',
@@ -225,8 +225,8 @@
gles3PlatformStrings = [ '#include <GLES3/gl3platform.h>', '' ]
eglPlatformStrings = [ '#include <EGL/eglplatform.h>', '' ]
-# GLES 1/2 extension .h have small addition to calling convention headers
-gles1ExtPlatformStrings = gles2ExtPlatformStrings = [
+# GLES headers have a small addition to calling convention headers for function pointer typedefs
+apiEntryPrefixStrings = [
'#ifndef GL_APIENTRYP',
'#define GL_APIENTRYP GL_APIENTRY*',
'#endif',
@@ -333,7 +333,7 @@
defaultExtensions = 'gles1', # Default extensions for GLES 1
addExtensions = None,
removeExtensions = es1CorePat, # Remove mandatory ES1 extensions in GLES1/glext.h
- prefixText = prefixStrings + gles1ExtPlatformStrings + genDateCommentString,
+ prefixText = prefixStrings + apiEntryPrefixStrings + genDateCommentString,
genFuncPointers = True,
protectFile = protectFile,
protectFeature = protectFeature,
@@ -342,7 +342,7 @@
apicall = 'GL_API ',
apientry = 'GL_APIENTRY ',
apientryp = 'GL_APIENTRYP '),
- # GLES 2.0 API - GLES2/gl2.h (no function pointers)
+ # GLES 2.0 API - GLES2/gl2.h (now with function pointers)
CGeneratorOptions(
filename = 'GLES2/gl2.h',
apiname = 'gles2',
@@ -352,11 +352,11 @@
defaultExtensions = None, # No default extensions
addExtensions = None,
removeExtensions = None,
- prefixText = prefixStrings + gles2PlatformStrings + genDateCommentString,
- genFuncPointers = False,
+ prefixText = prefixStrings + gles2PlatformStrings + apiEntryPrefixStrings + genDateCommentString,
+ genFuncPointers = True,
protectFile = protectFile,
protectFeature = protectFeature,
- protectProto = False, # Core ES API functions are in the static link libraries
+ protectProto = protectProto, # Core ES API functions are in the static link libraries
protectProtoStr = 'GL_GLEXT_PROTOTYPES',
apicall = 'GL_APICALL ',
apientry = 'GL_APIENTRY ',
@@ -371,7 +371,7 @@
defaultExtensions = 'gles2', # Default extensions for GLES 2
addExtensions = None,
removeExtensions = None,
- prefixText = prefixStrings + gles2ExtPlatformStrings + genDateCommentString,
+ prefixText = prefixStrings + apiEntryPrefixStrings + genDateCommentString,
genFuncPointers = True,
protectFile = protectFile,
protectFeature = protectFeature,
@@ -380,7 +380,7 @@
apicall = 'GL_APICALL ',
apientry = 'GL_APIENTRY ',
apientryp = 'GL_APIENTRYP '),
- # GLES 3.1 API - GLES3/gl31.h (no function pointers)
+ # GLES 3.1 API - GLES3/gl31.h (now with function pointers)
CGeneratorOptions(
filename = 'GLES3/gl31.h',
apiname = 'gles2',
@@ -390,16 +390,16 @@
defaultExtensions = None, # No default extensions
addExtensions = None,
removeExtensions = None,
- prefixText = prefixStrings + gles3PlatformStrings + genDateCommentString,
- genFuncPointers = False,
+ prefixText = prefixStrings + gles3PlatformStrings + apiEntryPrefixStrings + genDateCommentString,
+ genFuncPointers = True,
protectFile = protectFile,
protectFeature = protectFeature,
- protectProto = False, # Core ES API functions are in the static link libraries
+ protectProto = protectProto, # Core ES API functions are in the static link libraries
protectProtoStr = 'GL_GLEXT_PROTOTYPES',
apicall = 'GL_APICALL ',
apientry = 'GL_APIENTRY ',
apientryp = 'GL_APIENTRYP '),
- # GLES 3.0 API - GLES3/gl3.h (no function pointers)
+ # GLES 3.0 API - GLES3/gl3.h (now with function pointers)
CGeneratorOptions(
filename = 'GLES3/gl3.h',
apiname = 'gles2',
@@ -409,11 +409,11 @@
defaultExtensions = None, # No default extensions
addExtensions = None,
removeExtensions = None,
- prefixText = prefixStrings + gles3PlatformStrings + genDateCommentString,
- genFuncPointers = False,
+ prefixText = prefixStrings + gles3PlatformStrings + apiEntryPrefixStrings + genDateCommentString,
+ genFuncPointers = True,
protectFile = protectFile,
protectFeature = protectFeature,
- protectProto = False, # Core ES API functions are in the static link libraries
+ protectProto = protectProto, # Core ES API functions are in the static link libraries
protectProtoStr = 'GL_GLEXT_PROTOTYPES',
apicall = 'GL_APICALL ',
apientry = 'GL_APIENTRY ',