diff options
author | Dave Airlie <airlied@nx6125b.(none)> | 2007-04-14 04:52:27 +0100 |
---|---|---|
committer | Dave Airlie <airlied@nx6125b.(none)> | 2007-04-14 04:54:49 +0100 |
commit | 3d59042afdaff9e67c6422cd8fa73d1bbbfbe940 (patch) | |
tree | e76c93e75ea7767a1e706baa3385674ce9483b45 /src/mesa/drivers/dri/r300/r300_ioctl.c | |
parent | 967c1056d5e86231e4a545a748973e1123cd19c1 (diff) |
r300: if we don't have TCL don't setup state emissions for vertex shaders
Diffstat (limited to 'src/mesa/drivers/dri/r300/r300_ioctl.c')
-rw-r--r-- | src/mesa/drivers/dri/r300/r300_ioctl.c | 49 |
1 files changed, 27 insertions, 22 deletions
diff --git a/src/mesa/drivers/dri/r300/r300_ioctl.c b/src/mesa/drivers/dri/r300/r300_ioctl.c index 11e2d42e494..41774155213 100644 --- a/src/mesa/drivers/dri/r300/r300_ioctl.c +++ b/src/mesa/drivers/dri/r300/r300_ioctl.c @@ -179,8 +179,11 @@ static void r300EmitClearState(GLcontext * ctx) int cmd_reserved = 0; int cmd_written = 0; drm_radeon_cmd_header_t *cmd = NULL; - - + int has_tcl = 1; + + if (!(r300->radeon.radeonScreen->chip_flags & RADEON_CHIPSET_TCL)) + has_tcl = 0; + R300_STATECHANGE(r300, vir[0]); reg_start(R300_VAP_INPUT_ROUTE_0_0, 0); e32(0x21030003); @@ -279,26 +282,28 @@ static void r300EmitClearState(GLcontext * ctx) reg_start(R300_PFS_INSTR3_0, 0); e32(FP_SELA(0,NO,W,FP_TMP(0),0,0)); - - R300_STATECHANGE(r300, pvs); - reg_start(R300_VAP_PVS_CNTL_1, 2); - e32((0 << R300_PVS_CNTL_1_PROGRAM_START_SHIFT) | - (0 << R300_PVS_CNTL_1_POS_END_SHIFT) | - (1 << R300_PVS_CNTL_1_PROGRAM_END_SHIFT)); - e32(0); - e32(1 << R300_PVS_CNTL_3_PROGRAM_UNKNOWN_SHIFT); - - R300_STATECHANGE(r300, vpi); - vsf_start_fragment(0x0, 8); - e32(VP_OUT(ADD,OUT,0,XYZW)); - e32(VP_IN(IN,0)); - e32(VP_ZERO()); - e32(0); - - e32(VP_OUT(ADD,OUT,1,XYZW)); - e32(VP_IN(IN,1)); - e32(VP_ZERO()); - e32(0); + + if (has_tcl) { + R300_STATECHANGE(r300, pvs); + reg_start(R300_VAP_PVS_CNTL_1, 2); + e32((0 << R300_PVS_CNTL_1_PROGRAM_START_SHIFT) | + (0 << R300_PVS_CNTL_1_POS_END_SHIFT) | + (1 << R300_PVS_CNTL_1_PROGRAM_END_SHIFT)); + e32(0); + e32(1 << R300_PVS_CNTL_3_PROGRAM_UNKNOWN_SHIFT); + + R300_STATECHANGE(r300, vpi); + vsf_start_fragment(0x0, 8); + e32(VP_OUT(ADD,OUT,0,XYZW)); + e32(VP_IN(IN,0)); + e32(VP_ZERO()); + e32(0); + + e32(VP_OUT(ADD,OUT,1,XYZW)); + e32(VP_IN(IN,1)); + e32(VP_ZERO()); + e32(0); + } /*reg_start(0x4500,0); e32(2560-1);*/ |