summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Deucher <alexdeucher@gmail.com>2012-01-10 09:35:09 -0500
committerAlex Deucher <alexdeucher@gmail.com>2012-01-10 09:35:09 -0500
commit13b3aed4ef9afbcbaea1dcf0ed1acb162b240a3f (patch)
treea268668ef6dfcbca752f64ae48c7147e4d5d9ab9
parenteb6d769a087b2ed5952f477fc3f0b0625810a287 (diff)
EXA/r6xx+: fix rop setting for overlapping copies
Need to use GXCopy for the src to temp copy, then the original rop for the temp to dest copy. Noticed by: Frank Huang Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
-rw-r--r--src/evergreen_exa.c3
-rw-r--r--src/r600_exa.c3
2 files changed, 6 insertions, 0 deletions
diff --git a/src/evergreen_exa.c b/src/evergreen_exa.c
index 603d8546..f17e5a69 100644
--- a/src/evergreen_exa.c
+++ b/src/evergreen_exa.c
@@ -575,12 +575,14 @@ EVERGREENCopy(PixmapPtr pDst,
uint32_t orig_src_tiling_flags = accel_state->src_obj[0].tiling_flags;
uint32_t orig_dst_tiling_flags = accel_state->dst_obj.tiling_flags;
struct radeon_bo *orig_bo = accel_state->dst_obj.bo;
+ int orig_rop = accel_state->rop;
/* src to tmp */
accel_state->dst_obj.domain = RADEON_GEM_DOMAIN_VRAM;
accel_state->dst_obj.bo = accel_state->copy_area_bo;
accel_state->dst_obj.offset = 0;
accel_state->dst_obj.tiling_flags = 0;
+ accel_state->rop = 3;
EVERGREENDoPrepareCopy(pScrn);
EVERGREENAppendCopyVertex(pScrn, srcX, srcY, dstX, dstY, w, h);
EVERGREENDoCopy(pScrn);
@@ -594,6 +596,7 @@ EVERGREENCopy(PixmapPtr pDst,
accel_state->dst_obj.bo = orig_bo;
accel_state->dst_obj.offset = 0;
accel_state->dst_obj.tiling_flags = orig_dst_tiling_flags;
+ accel_state->rop = orig_rop;
EVERGREENDoPrepareCopy(pScrn);
EVERGREENAppendCopyVertex(pScrn, dstX, dstY, dstX, dstY, w, h);
EVERGREENDoCopyVline(pDst);
diff --git a/src/r600_exa.c b/src/r600_exa.c
index 71e1393f..b0c66ee4 100644
--- a/src/r600_exa.c
+++ b/src/r600_exa.c
@@ -730,6 +730,7 @@ R600Copy(PixmapPtr pDst,
uint32_t orig_src_tiling_flags = accel_state->src_obj[0].tiling_flags;
uint32_t orig_dst_tiling_flags = accel_state->dst_obj.tiling_flags;
struct radeon_bo *orig_bo = accel_state->dst_obj.bo;
+ int orig_rop = accel_state->rop;
#if defined(XF86DRM_MODE)
if (info->cs) {
@@ -747,6 +748,7 @@ R600Copy(PixmapPtr pDst,
accel_state->dst_obj.bo = accel_state->copy_area_bo;
accel_state->dst_obj.offset = tmp_offset;
accel_state->dst_obj.tiling_flags = 0;
+ accel_state->rop = 3;
R600DoPrepareCopy(pScrn);
R600AppendCopyVertex(pScrn, srcX, srcY, dstX, dstY, w, h);
R600DoCopy(pScrn);
@@ -760,6 +762,7 @@ R600Copy(PixmapPtr pDst,
accel_state->dst_obj.bo = orig_bo;
accel_state->dst_obj.offset = orig_offset;
accel_state->dst_obj.tiling_flags = orig_dst_tiling_flags;
+ accel_state->rop = orig_rop;
R600DoPrepareCopy(pScrn);
R600AppendCopyVertex(pScrn, dstX, dstY, dstX, dstY, w, h);
R600DoCopyVline(pDst);