xf86-video-ati: Branch 'r6xx-r7xx-support' - 2 commits
Alex Deucher
agd5f at kemper.freedesktop.org
Fri Feb 6 15:07:59 PST 2009
src/r600_exa.c | 82 ++++++++++++++++++++++++++++++++++++---------------------
1 file changed, 53 insertions(+), 29 deletions(-)
New commits:
commit c06d89e16d5b2553142e8641e66080e1770c1563
Author: Alex Deucher <alexdeucher at gmail.com>
Date: Fri Feb 6 18:07:22 2009 -0500
R6xx/R7xx EXA: fallback on overlapping blits for now
Leave this disabled until we get a proper solution.
diff --git a/src/r600_exa.c b/src/r600_exa.c
index 155f913..7d5d7dc 100644
--- a/src/r600_exa.c
+++ b/src/r600_exa.c
@@ -675,6 +675,8 @@ R600PrepareCopy(PixmapPtr pSrc, PixmapPtr pDst,
accel_state->rop = rop;
accel_state->planemask = planemask;
+ return FALSE;
+
#ifdef SHOW_VERTEXES
ErrorF("same surface!\n");
#endif
commit 1d5fc3febf3470b94c423a1eda5e0683856909df
Author: Alex Deucher <alexdeucher at gmail.com>
Date: Fri Feb 6 14:43:30 2009 -0500
Revert "r6xx/r7xx EXA: Optimize overlapping copy"
This reverts commit 0dfadc1843e0d14b9cc1ee19a72f4fd60a2c495b.
This doesn't always work properly.
diff --git a/src/r600_exa.c b/src/r600_exa.c
index 88a9d91..155f913 100644
--- a/src/r600_exa.c
+++ b/src/r600_exa.c
@@ -717,37 +717,59 @@ R600OverlapCopy(PixmapPtr pDst,
struct radeon_accel_state *accel_state = info->accel_state;
uint32_t dst_pitch = exaGetPixmapPitch(pDst) / (pDst->drawable.bitsPerPixel / 8);
uint32_t dst_offset = exaGetPixmapOffset(pDst) + info->fbLocation + pScrn->fbOffset;
- int i, chunk;
+ int i;
if (is_overlap(srcX, srcX + w, srcY, srcY + h,
- dstX, dstX + w, dstY, dstY + h) && (srcY != dstY)) {
- if (srcY > dstY) { // up
- // copy top to bottom
- chunk = srcY - dstY;
- for (i = 0; i < h; i += chunk) {
- if (chunk > h - i) chunk = h - i;
- R600DoPrepareCopy(pScrn,
- dst_pitch, pDst->drawable.width, pDst->drawable.height, dst_offset, pDst->drawable.bitsPerPixel,
- dst_pitch, pDst->drawable.height, dst_offset, pDst->drawable.bitsPerPixel,
- accel_state->rop, accel_state->planemask);
-
- R600AppendCopyVertex(pScrn, srcX, srcY + i, dstX, dstY + i, w, chunk);
- R600DoCopy(pScrn);
- }
- } else { // down
- // copy bottom to top
- chunk = dstY - srcY;
- for (i = h; i > 0; i -= chunk) {
- if (chunk > i) chunk = i;
- R600DoPrepareCopy(pScrn,
- dst_pitch, pDst->drawable.width, pDst->drawable.height, dst_offset, pDst->drawable.bitsPerPixel,
- dst_pitch, pDst->drawable.height, dst_offset, pDst->drawable.bitsPerPixel,
- accel_state->rop, accel_state->planemask);
-
- R600AppendCopyVertex(pScrn, srcX, srcY + i - chunk, dstX, dstY + i - chunk, w, chunk);
- R600DoCopy(pScrn);
- }
- }
+ dstX, dstX + w, dstY, dstY + h)) {
+ if (srcY == dstY) { // left/right
+ if (srcX < dstX) { // right
+ // copy right to left
+ for (i = w; i > 0; i--) {
+ R600DoPrepareCopy(pScrn,
+ dst_pitch, pDst->drawable.width, pDst->drawable.height, dst_offset, pDst->drawable.bitsPerPixel,
+ dst_pitch, pDst->drawable.height, dst_offset, pDst->drawable.bitsPerPixel,
+ accel_state->rop, accel_state->planemask);
+
+ R600AppendCopyVertex(pScrn, srcX + i - 1, srcY, dstX + i - 1, dstY, 1, h);
+ R600DoCopy(pScrn);
+ }
+ } else { //left
+ // copy left to right
+ for (i = 0; i < w; i++) {
+ R600DoPrepareCopy(pScrn,
+ dst_pitch, pDst->drawable.width, pDst->drawable.height, dst_offset, pDst->drawable.bitsPerPixel,
+ dst_pitch, pDst->drawable.height, dst_offset, pDst->drawable.bitsPerPixel,
+ accel_state->rop, accel_state->planemask);
+
+ R600AppendCopyVertex(pScrn, srcX + i, srcY, dstX + i, dstY, 1, h);
+ R600DoCopy(pScrn);
+ }
+ }
+ } else { //up/down
+ if (srcY > dstY) { // up
+ // copy top to bottom
+ for (i = 0; i < h; i++) {
+ R600DoPrepareCopy(pScrn,
+ dst_pitch, pDst->drawable.width, pDst->drawable.height, dst_offset, pDst->drawable.bitsPerPixel,
+ dst_pitch, pDst->drawable.height, dst_offset, pDst->drawable.bitsPerPixel,
+ accel_state->rop, accel_state->planemask);
+
+ R600AppendCopyVertex(pScrn, srcX, srcY + i, dstX, dstY + i, w, 1);
+ R600DoCopy(pScrn);
+ }
+ } else { // down
+ // copy bottom to top
+ for (i = h; i > 0; i--) {
+ R600DoPrepareCopy(pScrn,
+ dst_pitch, pDst->drawable.width, pDst->drawable.height, dst_offset, pDst->drawable.bitsPerPixel,
+ dst_pitch, pDst->drawable.height, dst_offset, pDst->drawable.bitsPerPixel,
+ accel_state->rop, accel_state->planemask);
+
+ R600AppendCopyVertex(pScrn, srcX, srcY + i - 1, dstX, dstY + i - 1, w, 1);
+ R600DoCopy(pScrn);
+ }
+ }
+ }
} else {
R600DoPrepareCopy(pScrn,
dst_pitch, pDst->drawable.width, pDst->drawable.height, dst_offset, pDst->drawable.bitsPerPixel,
More information about the xorg-commit
mailing list