diff options
-rw-r--r-- | src/gallium/drivers/radeonsi/si_fence.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/gallium/drivers/radeonsi/si_fence.c b/src/gallium/drivers/radeonsi/si_fence.c index 9d6bcfe1027..b835ed649ee 100644 --- a/src/gallium/drivers/radeonsi/si_fence.c +++ b/src/gallium/drivers/radeonsi/si_fence.c @@ -191,9 +191,6 @@ static boolean si_fence_finish(struct pipe_screen *screen, int64_t abs_timeout = os_time_get_absolute_timeout(timeout); if (!util_queue_fence_is_signalled(&rfence->ready)) { - if (!timeout) - return false; - if (rfence->tc_token) { /* Ensure that si_flush_from_st will be called for * this fence, but only if we're in the API thread @@ -207,6 +204,9 @@ static boolean si_fence_finish(struct pipe_screen *screen, timeout == 0); } + if (!timeout) + return false; + if (timeout == PIPE_TIMEOUT_INFINITE) { util_queue_fence_wait(&rfence->ready); } else { |