OSDN Git Service

vulkan: improve vulkan::driver logcat messages
authorChia-I Wu <olv@google.com>
Tue, 3 May 2016 05:26:08 +0000 (13:26 +0800)
committerChia-I Wu <olv@google.com>
Fri, 6 May 2016 01:46:47 +0000 (09:46 +0800)
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

index 7238fde..0e64b24 100644 (file)
@@ -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;
     }