Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 69d10076 authored by luliuhui's avatar luliuhui Committed by Shuo Gao
Browse files

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: default avatarShuo Gao <shuo.gao@intel.com>
Signed-off-by: default avatarBruce Beare <bruce.j.beare@intel.com>
Signed-off-by: default avatarJack Ren <jack.ren@intel.com>
Author-tracking-BZ: 52622
parent 845ed8fd
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -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++;
            }