r300: don't enable VAP/TCL on cards that don't support it
authorDave Airlie <airlied@linux.ie>
Mon, 9 Apr 2007 23:32:13 +0000 (09:32 +1000)
committerDave Airlie <airlied@linux.ie>
Mon, 9 Apr 2007 23:32:13 +0000 (09:32 +1000)
src/mesa/drivers/dri/r300/r300_reg.h
src/mesa/drivers/dri/r300/r300_state.c

index 1f65f9a7e7ea0666fa76f2c34a0002cb6061491e..b296aaa07a991389dcc74a9c266edf1621bdad15 100644 (file)
@@ -145,6 +145,7 @@ USE OR OTHER DEALINGS IN THE SOFTWARE.
 #      define R300_VC_NO_SWAP                  (0 << 0)
 #      define R300_VC_16BIT_SWAP               (1 << 0)
 #      define R300_VC_32BIT_SWAP               (2 << 0)
+#      define R300_VAP_TCL_BYPASS              (1 << 8)
 
 /* gap */
 
index ff3c51c5edf02b484912fa0532392842b90c6a36..545b2f03aab35bc71332bceb1ccc41b855b21253 100644 (file)
@@ -2023,6 +2023,10 @@ void r300ResetHwState(r300ContextPtr r300)
        else
                r300->hw.vap_cntl_status.cmd[1] = 0x00000002;
 
+       /* disable VAP/TCL on non-TCL capable chips */
+       if (!(r300->radeon.radeonScreen->chip_flags & RADEON_CHIPSET_TCL))
+               r300->hw.vap_cntl_status.cmd[1] |= R300_VAP_TCL_BYPASS;
+
 #if 0 /* Done in setup routing */
        ((drm_r300_cmd_header_t*)r300->hw.vir[0].cmd)->packet0.count = 1;
        r300->hw.vir[0].cmd[1] = 0x21030003;