From e201c3f782f0d3e2ec508fb8093e506145614c06 Mon Sep 17 00:00:00 2001 From: Chia-I Wu Date: Tue, 3 May 2016 13:26:08 +0800 Subject: [PATCH] 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 --- vulkan/libvulkan/driver.cpp | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/vulkan/libvulkan/driver.cpp b/vulkan/libvulkan/driver.cpp index 7238fde8c4..0e64b24309 100644 --- a/vulkan/libvulkan/driver.cpp +++ b/vulkan/libvulkan/driver.cpp @@ -442,7 +442,7 @@ bool OpenHAL() { int result = hw_get_module("vulkan", reinterpret_cast(&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; } -- 2.11.0