[PATCH] dri2: Don't short-circuit to blitting for vblank_mode=0.

Eric Anholt eric at anholt.net
Tue Nov 13 10:22:54 PST 2012


When someone asks for no vblank syncing, they're also going for high
performance, which forcing a blit is not.  Leave this up to the
driver's normal SwapBuffers path, which can choose something
appropriate to do based off of the target/divisor/remainder.

Note that this currently reduces performance on the Intel driver
because it will still sync to the next vblank even though you asked
for a swap target that's passed.
---
 hw/xfree86/dri2/dri2.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/hw/xfree86/dri2/dri2.c b/hw/xfree86/dri2/dri2.c
index d3b3c73..b17f45c 100644
--- a/hw/xfree86/dri2/dri2.c
+++ b/hw/xfree86/dri2/dri2.c
@@ -878,8 +878,8 @@ DRI2SwapBuffers(ClientPtr client, DrawablePtr pDraw, CARD64 target_msc,
         return BadDrawable;
     }
 
-    /* Old DDX or no swap interval, just blit */
-    if (!ds->ScheduleSwap || !pPriv->swap_interval) {
+    /* Old DDX can only blit */
+    if (!ds->ScheduleSwap) {
         BoxRec box;
         RegionRec region;
 
-- 
1.7.10.4



More information about the xorg-devel mailing list