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

Commit 5aed75e7 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 2166c23c
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -136,7 +136,10 @@ cc_library_static {

cc_library_shared {
    name: "libEGL",
    defaults: ["egl_libs_defaults"],
    defaults: [
        "egl_libs_defaults",
        "nvidia_enhancements_defaults"
    ],
    llndk: {
        symbol_file: "libEGL.map.txt",
        export_llndk_headers: ["gl_headers"],
+5 −0
Original line number Diff line number Diff line
@@ -631,6 +631,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;