summaryrefslogtreecommitdiffstats
path: root/src/amd/vulkan/radv_device.c
diff options
context:
space:
mode:
authorGustaw Smolarczyk <wielkiegie@gmail.com>2016-10-06 01:09:54 +0200
committerDave Airlie <airlied@redhat.com>2016-10-07 09:24:09 +1000
commit24815bd7b3b50d2e634b56ca607856ecf08ec4ee (patch)
tree44f4f128434372265c21d45f1338669eafd44260 /src/amd/vulkan/radv_device.c
parentf4e499ec79147f4172f3669ae9dafd941aaeeb65 (diff)
downloadexternal_mesa3d-24815bd7b3b50d2e634b56ca607856ecf08ec4ee.zip
external_mesa3d-24815bd7b3b50d2e634b56ca607856ecf08ec4ee.tar.gz
external_mesa3d-24815bd7b3b50d2e634b56ca607856ecf08ec4ee.tar.bz2
radv: Skip already signalled fences.
If the user created a fence with VK_FENCE_CREATE_SIGNALED_BIT set, we shouldn't fail to wait for a fence if it was not submitted since that is not necessary. Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl> Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'src/amd/vulkan/radv_device.c')
-rw-r--r--src/amd/vulkan/radv_device.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/amd/vulkan/radv_device.c b/src/amd/vulkan/radv_device.c
index e9e00eb..8c59344 100644
--- a/src/amd/vulkan/radv_device.c
+++ b/src/amd/vulkan/radv_device.c
@@ -1119,12 +1119,12 @@ VkResult radv_WaitForFences(
RADV_FROM_HANDLE(radv_fence, fence, pFences[i]);
bool expired = false;
- if (!fence->submitted)
- return VK_TIMEOUT;
-
if (fence->signalled)
continue;
+ if (!fence->submitted)
+ return VK_TIMEOUT;
+
expired = device->ws->fence_wait(device->ws, fence->fence, true, timeout);
if (!expired)
return VK_TIMEOUT;