summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorluliuhui <liuhui.lu@intel.com>2012-08-30 11:15:36 +0800
committerGerrit Code Review <gerrit@cyanogenmod.org>2013-04-21 01:05:21 -0700
commit6eebd8b63762e7515ca1953e0bd23d15557cb621 (patch)
treec8d1e87b68e2532a4256817229bff781cfabc3ac
parentb64d6704a6cd1b5aee1431d7d4b77c8cab8c780b (diff)
downloadframeworks_native-6eebd8b63762e7515ca1953e0bd23d15557cb621.zip
frameworks_native-6eebd8b63762e7515ca1953e0bd23d15557cb621.tar.gz
frameworks_native-6eebd8b63762e7515ca1953e0bd23d15557cb621.tar.bz2
Gfx-3d: fix GetProcAddress in egl extention
This patch can fix issue when Proc address return NULL. Glbench10, egl-ext and conformance test need this patch to run pass. Change-Id: I275c7cb6f77cb334c3ee7fa23cd696bba1c5a458 Author: Liuhui Lu <liuhui.lu@intel.com> Signed-off-by: Shuo Gao <shuo.gao@intel.com> Signed-off-by: Bruce Beare <bruce.j.beare@intel.com> Signed-off-by: Jack Ren <jack.ren@intel.com> Author-tracking-BZ: 52622
-rw-r--r--opengl/libs/EGL/eglApi.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/opengl/libs/EGL/eglApi.cpp b/opengl/libs/EGL/eglApi.cpp
index 23e89da..ed1b472 100644
--- a/opengl/libs/EGL/eglApi.cpp
+++ b/opengl/libs/EGL/eglApi.cpp
@@ -760,8 +760,8 @@ __eglMustCastToProperFunctionPointerType eglGetProcAddress(const char *procname)
egl_connection_t* const cnx = &gEGLImpl;
if (cnx->dso && cnx->egl.eglGetProcAddress) {
- found = true;
// Extensions are independent of the bound context
+ addr =
cnx->hooks[egl_connection_t::GLESv1_INDEX]->ext.extensions[slot] =
cnx->hooks[egl_connection_t::GLESv2_INDEX]->ext.extensions[slot] =
#if EGL_TRACE
@@ -769,10 +769,13 @@ __eglMustCastToProperFunctionPointerType eglGetProcAddress(const char *procname)
gHooksTrace.ext.extensions[slot] =
#endif
cnx->egl.eglGetProcAddress(procname);
+ if (addr) found = true;
}
if (found) {
+#if USE_FAST_TLS_KEY
addr = gExtensionForwarders[slot];
+#endif
sGLExtentionMap.add(name, addr);
sGLExtentionSlot++;
}