summaryrefslogtreecommitdiff
path: root/src/radeon_commonfuncs.c
diff options
context:
space:
mode:
authorAlex Deucher <alex@botch2.com>2008-04-10 17:08:50 -0400
committerAlex Deucher <alex@botch2.com>2008-04-10 17:08:50 -0400
commit6f8f75bd19ef1919c0291141675be2d0e29b3251 (patch)
treebc3583b960347f37a6971c482a5d46f70262a242 /src/radeon_commonfuncs.c
parent4b9234e1c4f7c7f419cb4245d64f3f9756c98bb6 (diff)
R3xx+: consolidate some common 3D code
Diffstat (limited to 'src/radeon_commonfuncs.c')
-rw-r--r--src/radeon_commonfuncs.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/radeon_commonfuncs.c b/src/radeon_commonfuncs.c
index deb2c991..69b35361 100644
--- a/src/radeon_commonfuncs.c
+++ b/src/radeon_commonfuncs.c
@@ -144,6 +144,22 @@ static void FUNC_NAME(RADEONInit3DEngine)(ScrnInfoPtr pScrn)
OUT_ACCEL_REG(R300_SU_DEPTH_OFFSET, 0);
FINISH_ACCEL();
+ /* setup the VAP */
+ BEGIN_ACCEL(5);
+ if (info->has_tcl)
+ OUT_ACCEL_REG(R300_VAP_CNTL_STATUS, 0);
+ else
+ OUT_ACCEL_REG(R300_VAP_CNTL_STATUS, R300_PVS_BYPASS);
+
+ OUT_ACCEL_REG(R300_VAP_PVS_STATE_FLUSH_REG, 0);
+ OUT_ACCEL_REG(R300_VAP_CNTL, ((6 << R300_PVS_NUM_SLOTS_SHIFT) |
+ (5 << R300_PVS_NUM_CNTLRS_SHIFT) |
+ (4 << R300_PVS_NUM_FPUS_SHIFT) |
+ (12 << R300_VF_MAX_VTX_NUM_SHIFT)));
+ OUT_ACCEL_REG(R300_VAP_VTE_CNTL, R300_VTX_XY_FMT | R300_VTX_Z_FMT);
+ OUT_ACCEL_REG(R300_VAP_PSC_SGN_NORM_CNTL, 0);
+ FINISH_ACCEL();
+
BEGIN_ACCEL(4);
OUT_ACCEL_REG(R300_US_W_FMT, 0);
OUT_ACCEL_REG(R300_US_OUT_FMT_1, (R300_OUT_FMT_UNUSED |