summaryrefslogtreecommitdiffstats
path: root/src/gallium/state_trackers
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/state_trackers')
-rw-r--r--src/gallium/state_trackers/dri/dri_drawable.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/gallium/state_trackers/dri/dri_drawable.c b/src/gallium/state_trackers/dri/dri_drawable.c
index 6335127952c..42c48b50a82 100644
--- a/src/gallium/state_trackers/dri/dri_drawable.c
+++ b/src/gallium/state_trackers/dri/dri_drawable.c
@@ -489,9 +489,11 @@ dri_flush(__DRIcontext *cPriv,
st->flush(st, flush_flags, &new_fence);
/* throttle on the previous fence */
- if (drawable->throttle_fence)
+ if (drawable->throttle_fence) {
screen->fence_finish(screen, NULL, drawable->throttle_fence, PIPE_TIMEOUT_INFINITE);
- screen->fence_reference(screen, &drawable->throttle_fence, new_fence);
+ screen->fence_reference(screen, &drawable->throttle_fence, NULL);
+ }
+ drawable->throttle_fence = new_fence;
}
else if (flags & (__DRI2_FLUSH_DRAWABLE | __DRI2_FLUSH_CONTEXT)) {
st->flush(st, flush_flags, NULL);