Fixes: f4e499ec79 "radv: add initial non-conformant radv vulkan driver"
Reviewed-by: Dave Airlie <airlied@redhat.com>
if (fence->signalled)
continue;
- if (!fence->submitted)
- return VK_TIMEOUT;
+ if (!fence->submitted) {
+ while(radv_get_current_time() <= timeout && !fence->submitted)
+ /* Do nothing */;
+
+ if (!fence->submitted)
+ return VK_TIMEOUT;
+
+ /* Recheck as it may have been set by submitting operations. */
+ if (fence->signalled)
+ continue;
+ }
expired = device->ws->fence_wait(device->ws, fence->fence, true, timeout);
if (!expired)