dri3: Pass __DRI2_THROTTLE_COPYSUBBUFFER from loader_dri3_copy_drawable
authorMichel Dänzer <mdaenzer@redhat.com>
Thu, 3 Oct 2019 10:23:45 +0000 (12:23 +0200)
committerMichel Dänzer <michel@daenzer.net>
Fri, 4 Oct 2019 08:55:43 +0000 (10:55 +0200)
0 is __DRI2_THROTTLE_SWAPBUFFER, which doesn't really make sense here.

Avoids dri_flush() throttling twice for the same glFlush call with front
buffer rendering, as described in
https://gitlab.freedesktop.org/mesa/mesa/merge_requests/2057 .

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
src/loader/loader_dri3_helper.c

index 3ce47cd3d6b4d4a8bdbfafd4867000950092865b..90c55436cf7aa62c2772ab98df8c43a9a8759d67 100644 (file)
@@ -817,7 +817,7 @@ loader_dri3_copy_drawable(struct loader_dri3_drawable *draw,
                           xcb_drawable_t dest,
                           xcb_drawable_t src)
 {
-   loader_dri3_flush(draw, __DRI2_FLUSH_DRAWABLE, 0);
+   loader_dri3_flush(draw, __DRI2_FLUSH_DRAWABLE, __DRI2_THROTTLE_COPYSUBBUFFER);
 
    dri3_fence_reset(draw->conn, dri3_fake_front_buffer(draw));
    dri3_copy_area(draw->conn,