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

Commit e26f8386 authored by Billy Laws's avatar Billy Laws Committed by Aaron Kling
Browse files

EGL: Loader: Enable desktop openGL on Nvidia platforms

There is some specific code I reversed from the EGL library that sets
the openGL bit in a data struct when getProcAddr is called with
eglSentinelNvFrameworks.

Change-Id: I9c1eaba65c65dfc9b3e500ad627a492ec6ce2f36
parent c15bd7dc
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -132,7 +132,10 @@ cc_library_static {

cc_library_shared {
    name: "libEGL",
    defaults: ["egl_libs_defaults"],
    defaults: [
        "egl_libs_defaults",
        "nvidia_enhancements_defaults"
    ],
    srcs: [
        "EGL/egl_tls.cpp",
        "EGL/egl_cache.cpp",
+5 −0
Original line number Diff line number Diff line
@@ -642,6 +642,11 @@ void Loader::initialize_api(void* dso, egl_connection_t* cnx, uint32_t mask) {
        ALOGE_IF(!getProcAddress,
                "can't find eglGetProcAddress() in EGL driver library");

#ifdef NV_ANDROID_FRAMEWORK_ENHANCEMENTS
        // This internally sets a bit in the main Nvidia EGL driver to enable desktop openGL
        getProcAddress("eglSentinelForNVFrameworks");
#endif

        egl_t* egl = &cnx->egl;
        __eglMustCastToProperFunctionPointerType* curr =
            (__eglMustCastToProperFunctionPointerType*)egl;