anv: Wrap the device lost error in vk_error in QueueSubmit
authorJason Ekstrand <jason.ekstrand@intel.com>
Thu, 18 May 2017 21:07:27 +0000 (14:07 -0700)
committerJason Ekstrand <jason.ekstrand@intel.com>
Thu, 18 May 2017 23:32:11 +0000 (16:32 -0700)
We weren't wrapping this before because anv_cmd_buffer_execbuf may throw
a more meaningful error message.  However, we do change the error code
into VK_ERROR_DEVICE_LOST, so we should print a new message.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
src/intel/vulkan/anv_queue.c

index fac979a52c05c807652abd655f25aa11ae04b134..94c34c5d5aff835b69ac4e462322e7817feec4fd 100644 (file)
@@ -213,7 +213,7 @@ out:
        * VK_ERROR_DEVICE_LOST to ensure that clients do not attempt to
        * submit the same job again to this device.
        */
-      result = VK_ERROR_DEVICE_LOST;
+      result = vk_errorf(VK_ERROR_DEVICE_LOST, "vkQueueSubmit() failed");
       device->lost = true;
 
       /* If we return VK_ERROR_DEVICE LOST here, we need to ensure that