Expose core EGL entry points to eglGetProcAddress
Required behavior for EGL_KHR_get_all_proc_addresses.
Change-Id: I1e6209ef3cb9f2fa6f22808b077c35139d4cb814
diff --git a/opengl/libs/EGL/eglApi.cpp b/opengl/libs/EGL/eglApi.cpp
index d96b54f..22990f3 100644
--- a/opengl/libs/EGL/eglApi.cpp
+++ b/opengl/libs/EGL/eglApi.cpp
@@ -877,11 +877,14 @@
return err;
}
-static __eglMustCastToProperFunctionPointerType findBuiltinGLWrapper(
+static __eglMustCastToProperFunctionPointerType findBuiltinWrapper(
const char* procname) {
const egl_connection_t* cnx = &gEGLImpl;
void* proc = NULL;
+ proc = dlsym(cnx->libEgl, procname);
+ if (proc) return (__eglMustCastToProperFunctionPointerType)proc;
+
proc = dlsym(cnx->libGles2, procname);
if (proc) return (__eglMustCastToProperFunctionPointerType)proc;
@@ -912,7 +915,7 @@
addr = findProcAddress(procname, sExtensionMap, NELEM(sExtensionMap));
if (addr) return addr;
- addr = findBuiltinGLWrapper(procname);
+ addr = findBuiltinWrapper(procname);
if (addr) return addr;
// this protects accesses to sGLExtentionMap and sGLExtentionSlot