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

Commit e201c3f7 authored by Chia-I Wu's avatar Chia-I Wu
Browse files

vulkan: improve vulkan::driver logcat messages

Make it clear the errors are generated from internal vkGet*ProcAddr calls.
Log a message whenever stubhal is used.

Bug: 28120066
Change-Id: Iabf88757c3cb20b7ddcbe3c1d201f3d23dd3ed0b
parent a4a0555a
Loading
Loading
Loading
Loading
+4 −6
Original line number Diff line number Diff line
@@ -442,7 +442,7 @@ bool OpenHAL() {
    int result =
        hw_get_module("vulkan", reinterpret_cast<const hw_module_t**>(&module));
    if (result != 0) {
        ALOGV("no Vulkan HAL present, using stub HAL");
        ALOGI("no Vulkan HAL present, using stub HAL");
        return true;
    }

@@ -491,8 +491,7 @@ PFN_vkVoidFunction GetInstanceProcAddr(VkInstance instance, const char* pName) {
            return hook->proc;

        ALOGE(
            "Invalid use of vkGetInstanceProcAddr to query %s without an "
            "instance",
            "internal vkGetInstanceProcAddr called for %s without an instance",
            pName);

        return nullptr;
@@ -513,8 +512,7 @@ PFN_vkVoidFunction GetInstanceProcAddr(VkInstance instance, const char* pName) {
            break;
        default:
            ALOGE(
                "Invalid use of vkGetInstanceProcAddr to query %s with an "
                "instance",
                "internal vkGetInstanceProcAddr called for %s with an instance",
                pName);
            proc = nullptr;
            break;
@@ -529,7 +527,7 @@ PFN_vkVoidFunction GetDeviceProcAddr(VkDevice device, const char* pName) {
        return GetData(device).driver.GetDeviceProcAddr(device, pName);

    if (hook->type != ProcHook::DEVICE) {
        ALOGE("Invalid use of vkGetDeviceProcAddr to query %s", pName);
        ALOGE("internal vkGetDeviceProcAddr called for %s", pName);
        return nullptr;
    }