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

Commit 143c9c57 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Vulkan/OpenGL: log dlerror for loading updatable gfx driver"

parents 6a40c022 9058b8fe
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -548,7 +548,7 @@ void GraphicsEnv::setDebugLayersGLES(const std::string layers) {
}
}


// Return true if all the required libraries from vndk and sphal namespace are
// Return true if all the required libraries from vndk and sphal namespace are
// linked to the Game Driver namespace correctly.
// linked to the updatable gfx driver namespace correctly.
bool GraphicsEnv::linkDriverNamespaceLocked(android_namespace_t* vndkNamespace) {
bool GraphicsEnv::linkDriverNamespaceLocked(android_namespace_t* vndkNamespace) {
    const std::string llndkLibraries = getSystemNativeLibraries(NativeLibrary::LLNDK);
    const std::string llndkLibraries = getSystemNativeLibraries(NativeLibrary::LLNDK);
    if (llndkLibraries.empty()) {
    if (llndkLibraries.empty()) {
+2 −0
Original line number Original line Diff line number Diff line
@@ -514,6 +514,8 @@ static void* load_updated_driver(const char* kind, android_namespace_t* ns) {
        if (so) {
        if (so) {
            return so;
            return so;
        }
        }
        ALOGE("Could not load %s from updatable gfx driver namespace: %s.", name.c_str(),
              dlerror());
    }
    }
    return nullptr;
    return nullptr;
}
}
+2 −0
Original line number Original line Diff line number Diff line
@@ -183,6 +183,8 @@ int LoadDriver(android_namespace_t* library_namespace,
                .library_namespace = library_namespace,
                .library_namespace = library_namespace,
            };
            };
            so = android_dlopen_ext(lib_name.c_str(), LIB_DL_FLAGS, &dlextinfo);
            so = android_dlopen_ext(lib_name.c_str(), LIB_DL_FLAGS, &dlextinfo);
            ALOGE("Could not load %s from updatable gfx driver namespace: %s.",
                  lib_name.c_str(), dlerror());
        } else {
        } else {
            // load built-in driver
            // load built-in driver
            so = android_load_sphal_library(lib_name.c_str(), LIB_DL_FLAGS);
            so = android_load_sphal_library(lib_name.c_str(), LIB_DL_FLAGS);