aboutsummaryrefslogtreecommitdiffstats
path: root/src/intel/vulkan/anv_queue.c
diff options
context:
space:
mode:
authorJason Ekstrand <[email protected]>2018-03-13 11:50:33 -0700
committerJason Ekstrand <[email protected]>2018-10-26 08:40:21 -0500
commitcd0960b430517b17cdead266e05a81ac586cf970 (patch)
treee2be4680380f4c70b66049ffe6af7cb8518dd180 /src/intel/vulkan/anv_queue.c
parent319ff6f1ad3e745b1783bb64a38bedb9f29a140c (diff)
anv: Add helpers for setting/checking device lost
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.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/intel/vulkan/anv_queue.c b/src/intel/vulkan/anv_queue.c
index cf063701b8d..8e9f743fcb7 100644
--- a/src/intel/vulkan/anv_queue.c
+++ b/src/intel/vulkan/anv_queue.c
@@ -42,7 +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. */
- device->lost = true;
+ anv_device_set_lost(device, "execbuf2 failed: %m");
return vk_errorf(device->instance, device, VK_ERROR_DEVICE_LOST,
"execbuf2 failed: %m");
}
@@ -245,7 +245,7 @@ out:
*/
result = vk_errorf(device->instance, device, VK_ERROR_DEVICE_LOST,
"vkQueueSubmit() failed");
- device->lost = true;
+ anv_device_set_lost(device, "vkQueueSubmit() failed");
}
pthread_mutex_unlock(&device->mutex);
@@ -398,7 +398,7 @@ VkResult anv_GetFenceStatus(
ANV_FROM_HANDLE(anv_device, device, _device);
ANV_FROM_HANDLE(anv_fence, fence, _fence);
- if (unlikely(device->lost))
+ if (anv_device_is_lost(device))
return VK_ERROR_DEVICE_LOST;
struct anv_fence_impl *impl =
@@ -438,7 +438,7 @@ VkResult anv_GetFenceStatus(
return VK_NOT_READY;
} else {
/* We don't know the real error. */
- device->lost = true;
+ 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");
}
@@ -526,7 +526,7 @@ anv_wait_for_syncobj_fences(struct anv_device *device,
return VK_TIMEOUT;
} else {
/* We don't know the real error. */
- device->lost = true;
+ 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");
}
@@ -670,7 +670,7 @@ anv_wait_for_bo_fences(struct anv_device *device,
}
done:
- if (unlikely(device->lost))
+ if (anv_device_is_lost(device))
return VK_ERROR_DEVICE_LOST;
return result;
@@ -760,7 +760,7 @@ VkResult anv_WaitForFences(
{
ANV_FROM_HANDLE(anv_device, device, _device);
- if (unlikely(device->lost))
+ if (anv_device_is_lost(device))
return VK_ERROR_DEVICE_LOST;
if (anv_all_fences_syncobj(fenceCount, pFences)) {