summaryrefslogtreecommitdiff
path: root/src/radeon_exa_render.c
diff options
context:
space:
mode:
authorAlex Deucher <alexdeucher@gmail.com>2009-06-09 13:31:15 -0400
committerAlex Deucher <alexdeucher@gmail.com>2009-06-09 13:31:15 -0400
commitf6dff8836729cc9d29264080c9cfa0e1df6182cf (patch)
treee5b34bb5e9c019d768743d72847cc187c0df6c7b /src/radeon_exa_render.c
parent48dbf09e1309c815ac8b733145a0310083a29933 (diff)
r3xx/r4xx/r5xx: clip 3D rendering to destination buffer
Diffstat (limited to 'src/radeon_exa_render.c')
-rw-r--r--src/radeon_exa_render.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/radeon_exa_render.c b/src/radeon_exa_render.c
index 87339d47..7885eb9a 100644
--- a/src/radeon_exa_render.c
+++ b/src/radeon_exa_render.c
@@ -1918,14 +1918,18 @@ static Bool FUNC_NAME(R300PrepareComposite)(int op, PicturePtr pSrcPicture,
/* Clear out scissoring */
BEGIN_ACCEL(2);
- if (IS_R300_3D)
+ if (IS_R300_3D) {
OUT_ACCEL_REG(R300_SC_SCISSOR0, ((1440 << R300_SCISSOR_X_SHIFT) |
(1440 << R300_SCISSOR_Y_SHIFT)));
- else
+ OUT_ACCEL_REG(R300_SC_SCISSOR1, (((pDst->drawable.width + 1440 - 1) << R300_SCISSOR_X_SHIFT) |
+ ((pDst->drawable.height + 1440 - 1) << R300_SCISSOR_Y_SHIFT)));
+
+ } else {
OUT_ACCEL_REG(R300_SC_SCISSOR0, ((0 << R300_SCISSOR_X_SHIFT) |
(0 << R300_SCISSOR_Y_SHIFT)));
- OUT_ACCEL_REG(R300_SC_SCISSOR1, ((8191 << R300_SCISSOR_X_SHIFT) |
- (8191 << R300_SCISSOR_Y_SHIFT)));
+ OUT_ACCEL_REG(R300_SC_SCISSOR1, (((pDst->drawable.width - 1) << R300_SCISSOR_X_SHIFT) |
+ ((pDst->drawable.height - 1) << R300_SCISSOR_Y_SHIFT)));
+ }
FINISH_ACCEL();
BEGIN_ACCEL(3);