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

Commit 5caf125f authored by Linux Build Service Account's avatar Linux Build Service Account
Browse files

Promotion of android-framework.lnx.2.0-00007.

CRs      Change ID                                   Subject
--------------------------------------------------------------------------------------------------------------
1053183   I7c36fdfb9480b156191dd4237432d6b12d113f53   Graphics: Avoid vulkan libs access if vulkan is disabled

Change-Id: I3918b9df763b426a6108bc4e3175ebb19880567b
CRs-Fixed: 1053183
parents 0746959b cdc89a1e
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -21,6 +21,7 @@
#include <new>
#include <malloc.h>
#include <sys/prctl.h>
#include <cutils/properties.h>

#include "driver.h"
#include "stubhal.h"
@@ -130,6 +131,14 @@ bool Hal::Open() {
    hal_.dev_ = &stubhal::kDevice;

    const hwvulkan_module_t* module;

    // Use stub HAL if vulkan is disabled
    bool disableVulkan = property_get_bool("persist.graphics.vulkan.disable", false);
    if (disableVulkan == true) {
        ALOGI("no Vulkan HAL present, using stub HAL");
        return true;
    }

    int result =
        hw_get_module("vulkan", reinterpret_cast<const hw_module_t**>(&module));
    if (result != 0) {