From 858dbcdddb35b690a543a103d43dcaeb040260c1 Mon Sep 17 00:00:00 2001 From: Thomas Hellstrom Date: Sat, 9 Jul 2011 22:54:41 +0200 Subject: [PATCH] vmwgfx: Don't dirty the front buffer as hw when doing a dri2copyregion from it 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 --- vmwgfx/vmwgfx_dri2.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/vmwgfx/vmwgfx_dri2.c b/vmwgfx/vmwgfx_dri2.c index be5bd51..5cffc4d 100644 --- a/vmwgfx/vmwgfx_dri2.c +++ b/vmwgfx/vmwgfx_dri2.c @@ -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); /* -- 2.7.4