vmwgfx: Don't dirty the front buffer as hw when doing a dri2copyregion from it
authorThomas Hellstrom <thellstrom@vmware.com>
Sat, 9 Jul 2011 20:54:41 +0000 (22:54 +0200)
committerThomas Hellstrom <thellstrom@vmware.com>
Sat, 9 Jul 2011 20:59:41 +0000 (22:59 +0200)
When copying from a dri2 buffer we usually dirty it as hw, since dri has
been rendering to it, and there can only be hw contents in the buffer.

However for the real front, X has already done the dirty work for us.

Also remove a glxWaitX() debug message.

This should fix piglit read-front.

Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
vmwgfx/vmwgfx_dri2.c

index be5bd51..5cffc4d 100644 (file)
@@ -271,10 +271,6 @@ dri2_copy_region(DrawablePtr pDraw, RegionPtr pRegion,
     RegionPtr myClip;
     GCPtr gc;
 
-    if (pSrcBuffer->attachment == DRI2BufferFrontLeft &&
-       pDestBuffer->attachment == DRI2BufferFakeFrontLeft)
-      LogMessage(X_ERROR, "glxwaitx\n");
-
     /*
      * In driCreateBuffers we dewrap windows into the
      * backing pixmaps in order to get to the texture.
@@ -332,7 +328,8 @@ dri2_copy_region(DrawablePtr pDraw, RegionPtr pRegion,
      * that something changed.
      */
     DamageRegionAppend(src_draw, pRegion);
-    saa_drawable_dirty(src_draw, TRUE, pRegion);
+    if (pSrcBuffer->attachment != DRI2BufferFrontLeft)
+       saa_drawable_dirty(src_draw, TRUE, pRegion);
     DamageRegionProcessPending(src_draw);
 
     /*