summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Deucher <alexdeucher@gmail.com>2009-02-25 09:16:38 -0500
committerAlex Deucher <alexdeucher@gmail.com>2009-02-25 09:16:38 -0500
commit8373f4399b03961f2c928a9275d47e9f41bd92bb (patch)
tree5cedfd1cc34dc96b52f27811e20d4acda79b0262
parentc74727015453ff3c3d6d06b812ebca9eb19a9767 (diff)
R6xx/R7xx EXA: same surface and same coords equals nop
should fix bug 20305
-rw-r--r--src/r600_exa.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/r600_exa.c b/src/r600_exa.c
index 52b00426..17c5567e 100644
--- a/src/r600_exa.c
+++ b/src/r600_exa.c
@@ -869,6 +869,9 @@ R600Copy(PixmapPtr pDst,
RADEONInfoPtr info = RADEONPTR(pScrn);
struct radeon_accel_state *accel_state = info->accel_state;
+ if (accel_state->same_surface && (srcX == dstX) && (srcY == dstY))
+ return;
+
if (accel_state->same_surface && is_overlap(srcX, srcX + w, srcY, srcY + h, dstX, dstX + w, dstY, dstY + h)) {
if (accel_state->copy_area) {
uint32_t pitch = exaGetPixmapPitch(pDst) / (pDst->drawable.bitsPerPixel / 8);
@@ -891,7 +894,7 @@ R600Copy(PixmapPtr pDst,
R600DoCopy(pScrn);
} else
R600OverlapCopy(pDst, srcX, srcY, dstX, dstY, w, h);
- } else if(accel_state->same_surface) {
+ } else if (accel_state->same_surface) {
uint32_t pitch = exaGetPixmapPitch(pDst) / (pDst->drawable.bitsPerPixel / 8);
uint32_t offset = exaGetPixmapOffset(pDst) + info->fbLocation + pScrn->fbOffset;