anv: Provide a error message with a DEVICE_LOST
authorJason Ekstrand <jason.ekstrand@intel.com>
Thu, 25 Oct 2018 15:13:12 +0000 (10:13 -0500)
committerJason Ekstrand <jason.ekstrand@intel.com>
Fri, 26 Oct 2018 13:40:10 +0000 (08:40 -0500)
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Eric Engestrom <eric.engestrom@intel.com>
src/intel/vulkan/anv_device.c

index 3ac1bad..87fe5e4 100644 (file)
@@ -3095,7 +3095,8 @@ VkResult anv_GetCalibratedTimestampsEXT(
 
          if (ret != 0) {
             device->lost = TRUE;
-            return VK_ERROR_DEVICE_LOST;
+            return vk_errorf(device->instance, device, VK_ERROR_DEVICE_LOST,
+                             "Failed to read the TIMESTAMP register: %m");
          }
          uint64_t device_period = DIV_ROUND_UP(1000000000, timestamp_frequency);
          max_clock_period = MAX2(max_clock_period, device_period);