r300: remove unused code
authorMaciej Cencora <m.cencora@gmail.com>
Sat, 30 May 2009 14:12:53 +0000 (16:12 +0200)
committerDave Airlie <airlied@redhat.com>
Sun, 7 Jun 2009 06:39:54 +0000 (16:39 +1000)
src/mesa/drivers/dri/r300/r300_context.h
src/mesa/drivers/dri/r300/r300_state.c
src/mesa/drivers/dri/r300/r300_vertprog.c
src/mesa/drivers/dri/r300/r300_vertprog.h

index 11cfb55a9b51828fc4779f9375760198e597861a..026c33c67cb209203d691e128982f55826409924 100644 (file)
@@ -583,8 +583,6 @@ struct r300_swtcl_info {
     * Offset of the 3UB specular color data within a hardware (swtcl) vertex.
     */
    GLuint specoffset;
-
-   int sw_tcl_inputs[VERT_ATTRIB_MAX];
 };
 
 struct r300_vtable {
index a04326fca97423c4fd189ca29ebcd9f400d32f23..2fff89c473c39f4e1783560223e4ab135f106449 100644 (file)
@@ -2295,10 +2295,7 @@ void r300UpdateShaderStates(r300ContextPtr rmesa)
        rmesa->vtbl.SetupRSUnit(ctx);
 
        if (rmesa->options.hw_tcl_enabled) {
-               if (rmesa->fallback & R300_FALLBACK_VERTEX_PROGRAM)
-                       r300SetupSwtclVertexProgram(rmesa);
-               else
-                       r300SetupVertexProgram(rmesa);
+               r300SetupVertexProgram(rmesa);
        }
 }
 
index 35e5ec0f8e748788459410fdd9569a7afcace3b4..a74b9156cf9face49aef5ab4381599c2d6ade4e9 100644 (file)
@@ -1492,54 +1492,6 @@ static void r300EmitVertexProgram(r300ContextPtr r300, int dest, struct r300_ver
        }
 }
 
-void r300SetupSwtclVertexProgram(r300ContextPtr rmesa)
-{
-       struct r300_vertex_shader_hw_code *hw_code;
-       GLuint o_reg = 0;
-       GLuint i_reg = 0;
-       int i;
-       int inst_count = 0;
-       int param_count = 0;
-       int program_end = 0;
-
-       /* Reset state, in case we don't use something */
-       ((drm_r300_cmd_header_t *) rmesa->hw.vpp.cmd)->vpu.count = 0;
-       ((drm_r300_cmd_header_t *) rmesa->hw.vpi.cmd)->vpu.count = 0;
-       ((drm_r300_cmd_header_t *) rmesa->hw.vps.cmd)->vpu.count = 0;
-
-       hw_code = _mesa_malloc(sizeof(struct r300_vertex_shader_hw_code));
-
-       for (i = VERT_ATTRIB_POS; i < VERT_ATTRIB_MAX; i++) {
-               if (rmesa->swtcl.sw_tcl_inputs[i] != -1) {
-                       hw_code->body.d[program_end + 0] = PVS_OP_DST_OPERAND(VE_MULTIPLY, GL_FALSE, GL_FALSE, o_reg++, VSF_FLAG_ALL, PVS_DST_REG_OUT);
-                       hw_code->body.d[program_end + 1] = PVS_SRC_OPERAND(rmesa->swtcl.sw_tcl_inputs[i], PVS_SRC_SELECT_X,
-                                       PVS_SRC_SELECT_Y, PVS_SRC_SELECT_Z, PVS_SRC_SELECT_W, PVS_SRC_REG_INPUT, VSF_FLAG_NONE);
-                       hw_code->body.d[program_end + 2] = PVS_SRC_OPERAND(rmesa->swtcl.sw_tcl_inputs[i], PVS_SRC_SELECT_FORCE_1, PVS_SRC_SELECT_FORCE_1,
-                                       PVS_SRC_SELECT_FORCE_1, PVS_SRC_SELECT_FORCE_1, PVS_SRC_REG_INPUT, VSF_FLAG_NONE);
-                       hw_code->body.d[program_end + 3] = PVS_SRC_OPERAND(rmesa->swtcl.sw_tcl_inputs[i], PVS_SRC_SELECT_FORCE_1, PVS_SRC_SELECT_FORCE_1,
-                                       PVS_SRC_SELECT_FORCE_1, PVS_SRC_SELECT_FORCE_1, PVS_SRC_REG_INPUT, VSF_FLAG_NONE);
-                       program_end += 4;
-                       i_reg++;
-               }
-       }
-
-       hw_code->length = program_end;
-
-       r300EmitVertexProgram(rmesa, R300_PVS_CODE_START, hw_code);
-       inst_count = (hw_code->length / 4) - 1;
-
-       r300VapCntl(rmesa, i_reg, o_reg, 0);
-
-       R300_STATECHANGE(rmesa, pvs);
-       rmesa->hw.pvs.cmd[R300_PVS_CNTL_1] = (0 << R300_PVS_FIRST_INST_SHIFT) | (inst_count << R300_PVS_XYZW_VALID_INST_SHIFT) |
-               (inst_count << R300_PVS_LAST_INST_SHIFT);
-
-       rmesa->hw.pvs.cmd[R300_PVS_CNTL_2] = (0 << R300_PVS_CONST_BASE_OFFSET_SHIFT) | (param_count << R300_PVS_MAX_CONST_ADDR_SHIFT);
-       rmesa->hw.pvs.cmd[R300_PVS_CNTL_3] = (inst_count << R300_PVS_LAST_VTX_SRC_INST_SHIFT);
-
-       _mesa_free(hw_code);
-}
-
 void r300SetupVertexProgram(r300ContextPtr rmesa)
 {
        GLcontext *ctx = rmesa->radeon.glCtx;
index 44b5f981a9a4c8775042e73a2ef11f0b65000092..b552e3fb1bda138e02e6f04f7eb874e55f1ae3b4 100644 (file)
@@ -33,6 +33,5 @@
 #endif
 
 void r300SetupVertexProgram(r300ContextPtr rmesa);
-void r300SetupSwtclVertexProgram(r300ContextPtr rmesa);
 
 #endif