loader/dri3: Always use at least two back buffers
authorMichel Dänzer <michel.daenzer@amd.com>
Tue, 6 Sep 2016 02:34:49 +0000 (11:34 +0900)
committerMichel Dänzer <michel@daenzer.net>
Tue, 6 Sep 2016 04:04:48 +0000 (13:04 +0900)
This can make a significant difference for performance with some extreme
test cases such as vblank_mode=0 glxgears.

Fixes: 1e3218bc5ba2 ("loader/dri3: Overhaul dri3_update_num_back")
Cc: "12.0 11.2" <mesa-stable@lists.freedesktop.org>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=97549
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Tested-by: Dieter Nützel <Dieter@nuetzel-hh.de>
src/loader/loader_dri3_helper.c

index 86ae5aecd5fe1d4de47479d3b70d222bbdd557c4..3ce03524dac23846bde18dcea12f9413d69d0d6d 100644 (file)
@@ -70,10 +70,8 @@ dri3_update_num_back(struct loader_dri3_drawable *draw)
 {
    if (draw->flipping)
       draw->num_back = 3;
-   else if (draw->vtable->get_swap_interval(draw) != 0)
-      draw->num_back = 2;
    else
-      draw->num_back = 1;
+      draw->num_back = 2;
 }
 
 void