summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/loader/loader_dri3_helper.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/loader/loader_dri3_helper.c b/src/loader/loader_dri3_helper.c
index f641a34e6d1..1981b5f0515 100644
--- a/src/loader/loader_dri3_helper.c
+++ b/src/loader/loader_dri3_helper.c
@@ -1736,6 +1736,7 @@ dri3_get_buffer(__DRIdrawable *driDrawable,
struct loader_dri3_drawable *draw)
{
struct loader_dri3_buffer *buffer;
+ bool fence_await = buffer_type == loader_dri3_buffer_back;
int buf_id;
if (buffer_type == loader_dri3_buffer_back) {
@@ -1791,6 +1792,7 @@ dri3_get_buffer(__DRIdrawable *driDrawable,
0, 0, 0, 0,
draw->width, draw->height);
dri3_fence_trigger(draw->conn, new_buffer);
+ fence_await = true;
}
dri3_free_render_buffer(draw, buffer);
} else if (buffer_type == loader_dri3_buffer_front) {
@@ -1812,13 +1814,14 @@ dri3_get_buffer(__DRIdrawable *driDrawable,
new_buffer->linear_buffer,
0, 0, draw->width, draw->height,
0, 0, 0);
- }
+ } else
+ fence_await = true;
}
buffer = new_buffer;
draw->buffers[buf_id] = buffer;
}
- if (buffer_type == loader_dri3_buffer_back)
+ if (fence_await)
dri3_fence_await(draw->conn, draw, buffer);
/*