diff options
author | Michel Dänzer <[email protected]> | 2011-08-22 15:44:42 +0200 |
---|---|---|
committer | Michel Dänzer <[email protected]> | 2011-08-26 18:18:35 +0200 |
commit | 751f0ce7736de455f3f6d8dcfbaf25bbbd3fcf55 (patch) | |
tree | 81148c1d0caf63c10259679ad3510b6369e20ebd | |
parent | 005aea891ec5814c3c05f20e5a65ca61db3b1b10 (diff) |
st/xorg: Only damage non-front source in DRI2 CopyRegion hook.
Based on a vmwgfx xa/saa fix.
Signed-off-by: Michel Dänzer <[email protected]>
Reviewed-by: Alex Deucher <[email protected]>
-rw-r--r-- | src/gallium/state_trackers/xorg/xorg_dri2.c | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/src/gallium/state_trackers/xorg/xorg_dri2.c b/src/gallium/state_trackers/xorg/xorg_dri2.c index 6f2c52eabb6..3350ac736cf 100644 --- a/src/gallium/state_trackers/xorg/xorg_dri2.c +++ b/src/gallium/state_trackers/xorg/xorg_dri2.c @@ -372,13 +372,15 @@ dri2_copy_region(DrawablePtr pDraw, RegionPtr pRegion, save_accel = ms->exa->accel; ms->exa->accel = TRUE; - /* In case it won't be though, make sure the GPU copy contents of the - * source pixmap will be used for the software fallback - presumably the - * client modified them before calling in here. - */ - exaMoveInPixmap(src_priv->pPixmap); - DamageRegionAppend(src_draw, pRegion); - DamageRegionProcessPending(src_draw); + if (pSrcBuffer->attachment != DRI2BufferFrontLeft) { + /* In case it won't be though, make sure the GPU copy contents of the + * source pixmap will be used for the software fallback - presumably the + * client modified them before calling in here. + */ + exaMoveInPixmap(src_priv->pPixmap); + DamageRegionAppend(src_draw, pRegion); + DamageRegionProcessPending(src_draw); + } if (cust && cust->winsys_context_throttle) cust->winsys_context_throttle(cust, ms->ctx, THROTTLE_SWAP); |