summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAlex Deucher <alex@samba.(none)>2008-02-26 14:45:25 -0500
committerAlex Deucher <alex@samba.(none)>2008-02-26 14:45:25 -0500
commitb4fa1ce9d2da04d94521a82d3c2e95f0fe985ccc (patch)
treef53b7f47c6285613e4f4597d47a7dcef0be037f4 /src
parent44e527a117ab0a363135ff066c7f7e0c12e3dc89 (diff)
R300/R500: fix up clipping
Based on patch from Peter Zubaj.
Diffstat (limited to 'src')
-rw-r--r--src/radeon_commonfuncs.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/radeon_commonfuncs.c b/src/radeon_commonfuncs.c
index f6f6b06..0250aef 100644
--- a/src/radeon_commonfuncs.c
+++ b/src/radeon_commonfuncs.c
@@ -206,15 +206,16 @@ static void FUNC_NAME(RADEONInit3DEngine)(ScrnInfoPtr pScrn)
(8191 << R300_SCISSOR_Y_SHIFT)));
if (IS_R300_VARIANT || (info->ChipFamily == CHIP_FAMILY_RS690)) {
+ /* clip has offset 1440 */
OUT_ACCEL_REG(R300_SC_CLIP_0_A, ((1088 << R300_CLIP_X_SHIFT) |
(1088 << R300_CLIP_Y_SHIFT)));
- OUT_ACCEL_REG(R300_SC_CLIP_0_B, ((4080 << R300_CLIP_X_SHIFT) |
- (2040 << R300_CLIP_Y_SHIFT)));
+ OUT_ACCEL_REG(R300_SC_CLIP_0_B, (((1080 + 2048) << R300_CLIP_X_SHIFT) |
+ ((1080 + 2048) << R300_CLIP_Y_SHIFT)));
} else {
OUT_ACCEL_REG(R300_SC_CLIP_0_A, ((0 << R300_CLIP_X_SHIFT) |
(0 << R300_CLIP_Y_SHIFT)));
OUT_ACCEL_REG(R300_SC_CLIP_0_B, ((4080 << R300_CLIP_X_SHIFT) |
- (2040 << R300_CLIP_Y_SHIFT)));
+ (4080 << R300_CLIP_Y_SHIFT)));
}
OUT_ACCEL_REG(R300_SC_CLIP_RULE, 0xAAAA);
OUT_ACCEL_REG(R300_SC_SCREENDOOR, 0xffffff);