summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers
diff options
context:
space:
mode:
authorNicolai Hähnle <[email protected]>2017-11-22 17:52:43 +0100
committerMarek Olšák <[email protected]>2017-11-26 16:53:00 +0100
commit0fed7f83bae7721b9351d45342d6ff528c3e2dc9 (patch)
tree7cd32c7522f8fb93f47d547312c657ab16ff6934 /src/gallium/drivers
parent0bd83d04612520ff97e21d41bcc3ad2e68e160df (diff)
radeonsi: try flushing unflushed fences in si_fence_finish even when timeout == 0
Under certain conditions, waiting on a GL sync objects should act like a flush, regardless of the timeout. Portal 2, CS:GO, and presumably other Source engine games rely on this behavior and hang during loading without this fix. Fixes: bc65dcab3bc4 ("radeonsi: avoid syncing the driver thread in si_fence_finish") Signed-off-by: Marek Olšák <[email protected]> Tested-by: Kai Wasserbäch <[email protected]> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=103902 Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=103904
Diffstat (limited to 'src/gallium/drivers')
-rw-r--r--src/gallium/drivers/radeonsi/si_fence.c6
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 {