summaryrefslogtreecommitdiff
path: root/src/radeon_exa_funcs.c
diff options
context:
space:
mode:
authorMichel Dänzer <michel@tungstengraphics.com>2006-09-30 19:25:20 +0200
committerMichel Dänzer <michel@tungstengraphics.com>2006-09-30 19:25:20 +0200
commitd43ad88fa3913437f6987ab5ab46a38f0cb555a8 (patch)
treeecf6c5c7334fc3a7fd16a8fd65bd24a2c6d582bb /src/radeon_exa_funcs.c
parent146ea328b7962f56c6ab47fbe2adc7561b36189c (diff)
radeon: Add support for page flipping with EXA.
Also use the damage layer directly instead of via shadowfb and blit dirty rectangles to the second page in LeaveServer in order to try and improve the tradeoff between performance and correctness.
Diffstat (limited to 'src/radeon_exa_funcs.c')
-rw-r--r--src/radeon_exa_funcs.c53
1 files changed, 32 insertions, 21 deletions
diff --git a/src/radeon_exa_funcs.c b/src/radeon_exa_funcs.c
index c0bdf6e..f018e55 100644
--- a/src/radeon_exa_funcs.c
+++ b/src/radeon_exa_funcs.c
@@ -127,6 +127,35 @@ FUNC_NAME(RADEONDoneSolid)(PixmapPtr pPix)
TRACE;
}
+void
+FUNC_NAME(RADEONDoPrepareCopy)(ScrnInfoPtr pScrn, CARD32 src_pitch_offset,
+ CARD32 dst_pitch_offset, CARD32 datatype, int rop,
+ Pixel planemask)
+{
+ RADEONInfoPtr info = RADEONPTR(pScrn);
+ ACCEL_PREAMBLE();
+
+ RADEON_SWITCH_TO_2D();
+
+ BEGIN_ACCEL(5);
+ OUT_ACCEL_REG(RADEON_DP_GUI_MASTER_CNTL,
+ RADEON_GMC_DST_PITCH_OFFSET_CNTL |
+ RADEON_GMC_SRC_PITCH_OFFSET_CNTL |
+ RADEON_GMC_BRUSH_NONE |
+ (datatype << 8) |
+ RADEON_GMC_SRC_DATATYPE_COLOR |
+ RADEON_ROP[rop].rop |
+ RADEON_DP_SRC_SOURCE_MEMORY |
+ RADEON_GMC_CLR_CMP_CNTL_DIS);
+ OUT_ACCEL_REG(RADEON_DP_WRITE_MASK, planemask);
+ OUT_ACCEL_REG(RADEON_DP_CNTL,
+ ((info->xdir >= 0 ? RADEON_DST_X_LEFT_TO_RIGHT : 0) |
+ (info->ydir >= 0 ? RADEON_DST_Y_TOP_TO_BOTTOM : 0)));
+ OUT_ACCEL_REG(RADEON_DST_PITCH_OFFSET, dst_pitch_offset);
+ OUT_ACCEL_REG(RADEON_SRC_PITCH_OFFSET, src_pitch_offset);
+ FINISH_ACCEL();
+}
+
static Bool
FUNC_NAME(RADEONPrepareCopy)(PixmapPtr pSrc, PixmapPtr pDst,
int xdir, int ydir,
@@ -135,7 +164,6 @@ FUNC_NAME(RADEONPrepareCopy)(PixmapPtr pSrc, PixmapPtr pDst,
{
RINFO_FROM_SCREEN(pDst->drawable.pScreen);
CARD32 datatype, src_pitch_offset, dst_pitch_offset;
- ACCEL_PREAMBLE();
TRACE;
@@ -151,30 +179,13 @@ FUNC_NAME(RADEONPrepareCopy)(PixmapPtr pSrc, PixmapPtr pDst,
if (!RADEONGetPixmapOffsetPitch(pDst, &dst_pitch_offset))
RADEON_FALLBACK(("RADEONGetPixmapOffsetPitch dest failed\n"));
- RADEON_SWITCH_TO_2D();
-
- BEGIN_ACCEL(5);
- OUT_ACCEL_REG(RADEON_DP_GUI_MASTER_CNTL,
- RADEON_GMC_DST_PITCH_OFFSET_CNTL |
- RADEON_GMC_SRC_PITCH_OFFSET_CNTL |
- RADEON_GMC_BRUSH_NONE |
- (datatype << 8) |
- RADEON_GMC_SRC_DATATYPE_COLOR |
- RADEON_ROP[rop].rop |
- RADEON_DP_SRC_SOURCE_MEMORY |
- RADEON_GMC_CLR_CMP_CNTL_DIS);
- OUT_ACCEL_REG(RADEON_DP_WRITE_MASK, planemask);
- OUT_ACCEL_REG(RADEON_DP_CNTL,
- ((xdir >= 0 ? RADEON_DST_X_LEFT_TO_RIGHT : 0) |
- (ydir >= 0 ? RADEON_DST_Y_TOP_TO_BOTTOM : 0)));
- OUT_ACCEL_REG(RADEON_DST_PITCH_OFFSET, dst_pitch_offset);
- OUT_ACCEL_REG(RADEON_SRC_PITCH_OFFSET, src_pitch_offset);
- FINISH_ACCEL();
+ FUNC_NAME(RADEONDoPrepareCopy)(pScrn, src_pitch_offset, dst_pitch_offset,
+ datatype, rop, planemask);
return TRUE;
}
-static void
+void
FUNC_NAME(RADEONCopy)(PixmapPtr pDst,
int srcX, int srcY,
int dstX, int dstY,