diff options
author | Maciej Cencora <[email protected]> | 2009-05-30 16:12:53 +0200 |
---|---|---|
committer | Dave Airlie <[email protected]> | 2009-06-07 16:39:54 +1000 |
commit | a8c7c96be717fb65d23aea7a21f9f3969c4de53f (patch) | |
tree | 9720b6650c4a5cb326203a18d0e5fa5d1f819227 /src/mesa | |
parent | 72c78b99926aab6af38248b5aa6b0fb1f9d42005 (diff) |
r300: remove unused code
Diffstat (limited to 'src/mesa')
-rw-r--r-- | src/mesa/drivers/dri/r300/r300_context.h | 2 | ||||
-rw-r--r-- | src/mesa/drivers/dri/r300/r300_state.c | 5 | ||||
-rw-r--r-- | src/mesa/drivers/dri/r300/r300_vertprog.c | 48 | ||||
-rw-r--r-- | src/mesa/drivers/dri/r300/r300_vertprog.h | 1 |
4 files changed, 1 insertions, 55 deletions
diff --git a/src/mesa/drivers/dri/r300/r300_context.h b/src/mesa/drivers/dri/r300/r300_context.h index 11cfb55a9b5..026c33c67cb 100644 --- a/src/mesa/drivers/dri/r300/r300_context.h +++ b/src/mesa/drivers/dri/r300/r300_context.h @@ -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 { diff --git a/src/mesa/drivers/dri/r300/r300_state.c b/src/mesa/drivers/dri/r300/r300_state.c index a04326fca97..2fff89c473c 100644 --- a/src/mesa/drivers/dri/r300/r300_state.c +++ b/src/mesa/drivers/dri/r300/r300_state.c @@ -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); } } diff --git a/src/mesa/drivers/dri/r300/r300_vertprog.c b/src/mesa/drivers/dri/r300/r300_vertprog.c index 35e5ec0f8e7..a74b9156cf9 100644 --- a/src/mesa/drivers/dri/r300/r300_vertprog.c +++ b/src/mesa/drivers/dri/r300/r300_vertprog.c @@ -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; diff --git a/src/mesa/drivers/dri/r300/r300_vertprog.h b/src/mesa/drivers/dri/r300/r300_vertprog.h index 44b5f981a9a..b552e3fb1bd 100644 --- a/src/mesa/drivers/dri/r300/r300_vertprog.h +++ b/src/mesa/drivers/dri/r300/r300_vertprog.h @@ -33,6 +33,5 @@ #endif void r300SetupVertexProgram(r300ContextPtr rmesa); -void r300SetupSwtclVertexProgram(r300ContextPtr rmesa); #endif |