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/libs/EGL/getProcAddress.cpp b/opengl/libs/EGL/getProcAddress.cpp
index 660af33..bdfd21c 100644
--- a/opengl/libs/EGL/getProcAddress.cpp
+++ b/opengl/libs/EGL/getProcAddress.cpp
@@ -45,13 +45,14 @@
GET_TLS(r12) \
"ldr r12, [r12, %[tls]] \n" \
"cmp r12, #0 \n" \
- "ldrne r12, [r12, %[api]] \n" \
+ "addne r12, %[api] \n" \
+ "ldrne r12, [r12] \n" \
"cmpne r12, #0 \n" \
"bxne r12 \n" \
"bx lr \n" \
: \
: [tls] "J"(TLS_SLOT_OPENGL_API*4), \
- [api] "J"(__builtin_offsetof(gl_hooks_t, \
+ [api] "r"(__builtin_offsetof(gl_hooks_t, \
ext.extensions[_api])) \
: "r12" \
);