summaryrefslogtreecommitdiff
path: root/src/radeon_commonfuncs.c
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2008-02-23 22:16:25 -0500
committerDave Airlie <airlied@redhat.com>2008-02-23 22:16:25 -0500
commit9aaf8b33b22b6ba112869558ae54e021b9487ad2 (patch)
treea3799dafff20131d7dee1407732e7e6cd2d24510 /src/radeon_commonfuncs.c
parent05dc3e4fc19d056ce99a7b110665adab2ca1ea21 (diff)
r500: initial rotate support - not fully working yet.
Just an example of how to setup and run the r500 3D engine for rotation. this rotates for me but I get some strange clipping on the bottom of my screen
Diffstat (limited to 'src/radeon_commonfuncs.c')
-rw-r--r--src/radeon_commonfuncs.c19
1 files changed, 9 insertions, 10 deletions
diff --git a/src/radeon_commonfuncs.c b/src/radeon_commonfuncs.c
index 629336f0..a626bbd4 100644
--- a/src/radeon_commonfuncs.c
+++ b/src/radeon_commonfuncs.c
@@ -57,7 +57,7 @@ static void FUNC_NAME(RADEONInit3DEngine)(ScrnInfoPtr pScrn)
info->texW[0] = info->texH[0] = info->texW[1] = info->texH[1] = 1;
- if (IS_R300_VARIANT) {
+ if (IS_R300_VARIANT || IS_AVIVO_VARIANT) {
BEGIN_ACCEL(3);
OUT_ACCEL_REG(R300_RB3D_DSTCACHE_CTLSTAT, 0xA);
OUT_ACCEL_REG(R300_RB3D_ZCACHE_CTLSTAT, 0x3);
@@ -91,14 +91,12 @@ static void FUNC_NAME(RADEONInit3DEngine)(ScrnInfoPtr pScrn)
OUT_ACCEL_REG(R300_GA_OFFSET, 0x0);
FINISH_ACCEL();
- BEGIN_ACCEL(7);
+ BEGIN_ACCEL(5);
OUT_ACCEL_REG(R300_SU_TEX_WRAP, 0x0);
OUT_ACCEL_REG(R300_SU_POLY_OFFSET_ENABLE, 0x0);
OUT_ACCEL_REG(R300_SU_CULL_MODE, 0x4);
OUT_ACCEL_REG(R300_SU_DEPTH_SCALE, 0x4b7fffff);
OUT_ACCEL_REG(R300_SU_DEPTH_OFFSET, 0x0);
- OUT_ACCEL_REG(R300_RS_COUNT, 0x40002);
- OUT_ACCEL_REG(R300_RS_IP_0, 0x1610000);
FINISH_ACCEL();
BEGIN_ACCEL(5);
@@ -109,10 +107,6 @@ static void FUNC_NAME(RADEONInit3DEngine)(ScrnInfoPtr pScrn)
OUT_ACCEL_REG(R300_US_OUT_FMT_0, 0x1B01);
FINISH_ACCEL();
- BEGIN_ACCEL(2);
- OUT_ACCEL_REG(R300_RS_INST_COUNT, 0xC0);
- OUT_ACCEL_REG(R300_RS_INST_0, 0x8);
- FINISH_ACCEL();
BEGIN_ACCEL(3);
OUT_ACCEL_REG(R300_FG_DEPTH_SRC, 0x0);
@@ -140,8 +134,13 @@ static void FUNC_NAME(RADEONInit3DEngine)(ScrnInfoPtr pScrn)
OUT_ACCEL_REG(R300_SC_EDGERULE, 0xA5294A5);
OUT_ACCEL_REG(R300_SC_SCISSOR0, 0x0);
OUT_ACCEL_REG(R300_SC_SCISSOR1, 0x3ffffff);
- OUT_ACCEL_REG(R300_SC_CLIP_0_A, 0x880440);
- OUT_ACCEL_REG(R300_SC_CLIP_0_B, 0xff0ff0);
+ if (IS_AVIVO_VARIANT) {
+ OUT_ACCEL_REG(R300_SC_CLIP_0_A, 0x0);
+ OUT_ACCEL_REG(R300_SC_CLIP_0_B, 0xff0ff0);
+ } else {
+ OUT_ACCEL_REG(R300_SC_CLIP_0_A, 0x880440);
+ OUT_ACCEL_REG(R300_SC_CLIP_0_B, 0xff0ff0);
+ }
OUT_ACCEL_REG(R300_SC_CLIP_RULE, 0xAAAA);
OUT_ACCEL_REG(R300_SC_SCREENDOOR, 0xffffff);
FINISH_ACCEL();