summaryrefslogtreecommitdiffstats
path: root/src/intel/vulkan/genX_query.c
diff options
context:
space:
mode:
authorIago Toral Quiroga <[email protected]>2017-03-22 09:18:56 +0100
committerIago Toral Quiroga <[email protected]>2017-03-24 08:11:53 +0100
commit4da1832c00ab93cbf90b14501840dd698565a869 (patch)
tree54631da3c1190d91c062f0fa265ef7b182e67ae9 /src/intel/vulkan/genX_query.c
parent50c8d2c1f71944688ebf753af3866981a07c4e9c (diff)
anv: return VK_ERROR_DEVICE_LOST immeditely when device is known to be lost
If we know the device has been lost we should return this error code for any command that can report it before we attempt to do anything with the device. Reviewed-by: Jason Ekstrand <[email protected]>
Diffstat (limited to 'src/intel/vulkan/genX_query.c')
-rw-r--r--src/intel/vulkan/genX_query.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/intel/vulkan/genX_query.c b/src/intel/vulkan/genX_query.c
index 2bbca66cebc..b1ed4d3854a 100644
--- a/src/intel/vulkan/genX_query.c
+++ b/src/intel/vulkan/genX_query.c
@@ -150,6 +150,9 @@ VkResult genX(GetQueryPoolResults)(
pool->type == VK_QUERY_TYPE_PIPELINE_STATISTICS ||
pool->type == VK_QUERY_TYPE_TIMESTAMP);
+ if (unlikely(device->lost))
+ return VK_ERROR_DEVICE_LOST;
+
if (pData == NULL)
return VK_SUCCESS;