diff options
author | Jason Ekstrand <[email protected]> | 2018-10-26 08:32:39 -0500 |
---|---|---|
committer | Jason Ekstrand <[email protected]> | 2018-10-26 13:27:21 -0500 |
commit | 07eb8e74664f47ebd8d89e92311ca984542088fd (patch) | |
tree | ced23fd1c08a8f06bd7b57e4f428bda843706d5a /src/intel/vulkan/anv_queue.c | |
parent | ade22ae1ace051422b972ef057e57aab6fdfa024 (diff) |
anv: Return VK_ERROR_DEVICE_LOST from anv_device_set_lost
This lets us get rid of a bunch of duplicated error messages.
Reviewed-by: Lionel Landwerlin <[email protected]>
Reviewed-by: Eric Engestrom <[email protected]>
Diffstat (limited to 'src/intel/vulkan/anv_queue.c')
-rw-r--r-- | src/intel/vulkan/anv_queue.c | 16 |
1 files changed, 4 insertions, 12 deletions
diff --git a/src/intel/vulkan/anv_queue.c b/src/intel/vulkan/anv_queue.c index 8e9f743fcb7..6247ba8751e 100644 --- a/src/intel/vulkan/anv_queue.c +++ b/src/intel/vulkan/anv_queue.c @@ -42,9 +42,7 @@ anv_device_execbuf(struct anv_device *device, int ret = device->no_hw ? 0 : anv_gem_execbuffer(device, execbuf); if (ret != 0) { /* We don't know the real error. */ - anv_device_set_lost(device, "execbuf2 failed: %m"); - return vk_errorf(device->instance, device, VK_ERROR_DEVICE_LOST, - "execbuf2 failed: %m"); + return anv_device_set_lost(device, "execbuf2 failed: %m"); } struct drm_i915_gem_exec_object2 *objects = @@ -243,9 +241,7 @@ out: * VK_ERROR_DEVICE_LOST to ensure that clients do not attempt to * submit the same job again to this device. */ - result = vk_errorf(device->instance, device, VK_ERROR_DEVICE_LOST, - "vkQueueSubmit() failed"); - anv_device_set_lost(device, "vkQueueSubmit() failed"); + result = anv_device_set_lost(device, "vkQueueSubmit() failed"); } pthread_mutex_unlock(&device->mutex); @@ -438,9 +434,7 @@ VkResult anv_GetFenceStatus( return VK_NOT_READY; } else { /* We don't know the real error. */ - anv_device_set_lost(device, "drm_syncobj_wait failed: %m"); - return vk_errorf(device->instance, device, VK_ERROR_DEVICE_LOST, - "drm_syncobj_wait failed: %m"); + return anv_device_set_lost(device, "drm_syncobj_wait failed: %m"); } } else { return VK_SUCCESS; @@ -526,9 +520,7 @@ anv_wait_for_syncobj_fences(struct anv_device *device, return VK_TIMEOUT; } else { /* We don't know the real error. */ - anv_device_set_lost(device, "drm_syncobj_wait failed: %m"); - return vk_errorf(device->instance, device, VK_ERROR_DEVICE_LOST, - "drm_syncobj_wait failed: %m"); + return anv_device_set_lost(device, "drm_syncobj_wait failed: %m"); } } else { return VK_SUCCESS; |