r300: Removed more deprecated state code that is now set in separate functions.
authorOliver McFadden <z3ro.geek@gmail.com>
Sun, 6 May 2007 11:56:36 +0000 (11:56 +0000)
committerOliver McFadden <z3ro.geek@gmail.com>
Sun, 6 May 2007 11:56:36 +0000 (11:56 +0000)
src/mesa/drivers/dri/r300/r300_state.c

index 469239a..ded140c 100644 (file)
@@ -1911,19 +1911,6 @@ void r300ResetHwState(r300ContextPtr r300)
 
        r300UpdateTextureState(ctx);
 
-//     r300_setup_routing(ctx, GL_TRUE);
-
-#if 0 /* Done in prior to rendering */
-       if(hw_tcl_on == GL_FALSE){
-               r300EmitArrays(ctx, GL_TRUE); /* Just do the routing */
-               r300_setup_textures(ctx);
-               r300_setup_rs_unit(ctx);
-
-               r300SetupVertexShader(r300);
-               r300SetupPixelShader(r300);
-       }
-#endif
-
        r300_set_blend_state(ctx);
 
        r300AlphaFunc(ctx, ctx->Color.AlphaFunc, ctx->Color.AlphaRef);
@@ -1956,17 +1943,6 @@ void r300ResetHwState(r300ContextPtr r300)
        if (!has_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;
-
-       ((drm_r300_cmd_header_t*)r300->hw.vir[1].cmd)->packet0.count = 1;
-       r300->hw.vir[1].cmd[1] = 0xF688F688;
-
-       r300->hw.vic.cmd[R300_VIR_CNTL_0] = 0x00000001;
-       r300->hw.vic.cmd[R300_VIR_CNTL_1] = 0x00000405;
-#endif
-
        r300->hw.unk21DC.cmd[1] = 0xAAAAAAAA;
 
        r300->hw.unk221C.cmd[1] = R300_221C_NORMAL;
@@ -1982,17 +1958,6 @@ void r300ResetHwState(r300ContextPtr r300)
        else
                r300->hw.unk2288.cmd[1] = R300_2288_RV350;
 
-#if 0
-       r300->hw.vof.cmd[R300_VOF_CNTL_0] = R300_VAP_OUTPUT_VTX_FMT_0__POS_PRESENT
-                               | R300_VAP_OUTPUT_VTX_FMT_0__COLOR_PRESENT;
-       r300->hw.vof.cmd[R300_VOF_CNTL_1] = 0; /* no textures */
-
-
-       r300->hw.pvs.cmd[R300_PVS_CNTL_1] = 0;
-       r300->hw.pvs.cmd[R300_PVS_CNTL_2] = 0;
-       r300->hw.pvs.cmd[R300_PVS_CNTL_3] = 0;
-#endif
-
        r300->hw.gb_enable.cmd[1] = R300_GB_POINT_STUFF_ENABLE
                | R300_GB_LINE_STUFF_ENABLE
                | R300_GB_TRIANGLE_STUFF_ENABLE /*| R300_GB_UNK31*/;
@@ -2020,8 +1985,6 @@ void r300ResetHwState(r300ContextPtr r300)
        r300->hw.gb_misc.cmd[R300_GB_MISC_SELECT] = R300_GB_FOG_SELECT_1_1_W;
        r300->hw.gb_misc.cmd[R300_GB_MISC_AA_CONFIG] = 0x00000000; /* No antialiasing */
 
-       //r300->hw.txe.cmd[R300_TXE_ENABLE] = 0;
-
        r300->hw.unk4200.cmd[1] = r300PackFloat32(0.0);
        r300->hw.unk4200.cmd[2] = r300PackFloat32(0.0);
        r300->hw.unk4200.cmd[3] = r300PackFloat32(1.0);
@@ -2064,31 +2027,12 @@ void r300ResetHwState(r300ContextPtr r300)
 
        r300->hw.unk43E8.cmd[1] = 0x00FFFFFF;
 
-#if 0
-       r300->hw.fp.cmd[R300_FP_CNTL0] = 0;
-       r300->hw.fp.cmd[R300_FP_CNTL1] = 0;
-       r300->hw.fp.cmd[R300_FP_CNTL2] = 0;
-       r300->hw.fp.cmd[R300_FP_NODE0] = 0;
-       r300->hw.fp.cmd[R300_FP_NODE1] = 0;
-       r300->hw.fp.cmd[R300_FP_NODE2] = 0;
-       r300->hw.fp.cmd[R300_FP_NODE3] = 0;
-#endif
-
        r300->hw.unk46A4.cmd[1] = 0x00001B01;
        r300->hw.unk46A4.cmd[2] = 0x00001B0F;
        r300->hw.unk46A4.cmd[3] = 0x00001B0F;
        r300->hw.unk46A4.cmd[4] = 0x00001B0F;
        r300->hw.unk46A4.cmd[5] = 0x00000001;
 
-#if 0
-       for(i = 1; i <= 64; ++i) {
-               /* create NOP instructions */
-               r300->hw.fpi[0].cmd[i] = FP_INSTRC(MAD, FP_ARGC(SRC0C_XYZ), FP_ARGC(ONE), FP_ARGC(ZERO));
-               r300->hw.fpi[1].cmd[i] = FP_SELC(0,XYZ,NO,FP_TMP(0),0,0);
-               r300->hw.fpi[2].cmd[i] = FP_INSTRA(MAD, FP_ARGA(SRC0A), FP_ARGA(ONE), FP_ARGA(ZERO));
-               r300->hw.fpi[3].cmd[i] = FP_SELA(0,W,NO,FP_TMP(0),0,0);
-       }
-#endif
        r300Enable(ctx, GL_FOG, ctx->Fog.Enabled);
        ctx->Driver.Fogfv( ctx, GL_FOG_MODE, NULL );
        ctx->Driver.Fogfv( ctx, GL_FOG_DENSITY, &ctx->Fog.Density );
@@ -2102,11 +2046,6 @@ void r300ResetHwState(r300ContextPtr r300)
 
        r300->hw.unk4E00.cmd[1] = 0;
 
-#if 0
-       r300->hw.bld.cmd[R300_BLD_CBLEND] = 0;
-       r300->hw.bld.cmd[R300_BLD_ABLEND] = 0;
-#endif
-
        r300BlendColor(ctx, ctx->Color.BlendColor);
        r300->hw.blend_color.cmd[2] = 0;
        r300->hw.blend_color.cmd[3] = 0;
@@ -2180,21 +2119,6 @@ void r300ResetHwState(r300ContextPtr r300)
 
        r300->hw.unk4F54.cmd[1] = 0;
 
-#if 0
-       ((drm_r300_cmd_header_t*)r300->hw.vpi.cmd)->vpu.count = 0;
-       for(i = 1; i < R300_VPI_CMDSIZE; i += 4) {
-               /* MOV t0, t0 */
-               r300->hw.vpi.cmd[i+0] = VP_OUT(ADD,TMP,0,XYZW);
-               r300->hw.vpi.cmd[i+1] = VP_IN(TMP,0);
-               r300->hw.vpi.cmd[i+2] = VP_ZERO();
-               r300->hw.vpi.cmd[i+3] = VP_ZERO();
-       }
-
-       ((drm_r300_cmd_header_t*)r300->hw.vpp.cmd)->vpu.count = 0;
-       for(i = 1; i < R300_VPP_CMDSIZE; ++i)
-               r300->hw.vpp.cmd[i] = 0;
-#endif
-
        if (has_tcl) {
          r300->hw.vps.cmd[R300_VPS_ZERO_0] = 0;
          r300->hw.vps.cmd[R300_VPS_ZERO_1] = 0;