diff options
Diffstat (limited to 'src/mesa/drivers/dri/r300')
-rw-r--r-- | src/mesa/drivers/dri/r300/r300_state.c | 28 | ||||
-rw-r--r-- | src/mesa/drivers/dri/r300/r300_vertprog.h | 39 |
2 files changed, 24 insertions, 43 deletions
diff --git a/src/mesa/drivers/dri/r300/r300_state.c b/src/mesa/drivers/dri/r300/r300_state.c index 76a7252f38..3b9b198415 100644 --- a/src/mesa/drivers/dri/r300/r300_state.c +++ b/src/mesa/drivers/dri/r300/r300_state.c @@ -1659,10 +1659,30 @@ static void r300SetupDefaultVertexProgram(r300ContextPtr rmesa) for (i = VERT_ATTRIB_POS; i < VERT_ATTRIB_MAX; i++) { if (rmesa->state.sw_tcl_inputs[i] != -1) { - prog->program.body.i[program_end + 0] = PVS_VECTOR_OPCODE(VE_MULTIPLY, o_reg++, VSF_FLAG_ALL, PVS_DST_REG_OUT); - prog->program.body.i[program_end + 1] = VSF_REG(rmesa->state.sw_tcl_inputs[i]); - prog->program.body.i[program_end + 2] = VSF_ATTR_UNITY(rmesa->state.sw_tcl_inputs[i]); - prog->program.body.i[program_end + 3] = VSF_UNITY(rmesa->state.sw_tcl_inputs[i]); + prog->program.body.i[program_end + 0] = + PVS_VECTOR_OPCODE(VE_MULTIPLY, o_reg++, + VSF_FLAG_ALL, PVS_DST_REG_OUT); + prog->program.body.i[program_end + 1] = + MAKE_VSF_SOURCE(rmesa->state.sw_tcl_inputs[i], + VSF_IN_COMPONENT_X, + VSF_IN_COMPONENT_Y, + VSF_IN_COMPONENT_Z, + VSF_IN_COMPONENT_W, + VSF_IN_CLASS_ATTR, VSF_FLAG_NONE); + prog->program.body.i[program_end + 2] = + MAKE_VSF_SOURCE(rmesa->state.sw_tcl_inputs[i], + VSF_IN_COMPONENT_ONE, + VSF_IN_COMPONENT_ONE, + VSF_IN_COMPONENT_ONE, + VSF_IN_COMPONENT_ONE, + VSF_IN_CLASS_ATTR, VSF_FLAG_NONE); + prog->program.body.i[program_end + 3] = + MAKE_VSF_SOURCE(rmesa->state.sw_tcl_inputs[i], + VSF_IN_COMPONENT_ONE, + VSF_IN_COMPONENT_ONE, + VSF_IN_COMPONENT_ONE, + VSF_IN_COMPONENT_ONE, + VSF_IN_CLASS_NONE, VSF_FLAG_NONE); program_end += 4; } } diff --git a/src/mesa/drivers/dri/r300/r300_vertprog.h b/src/mesa/drivers/dri/r300/r300_vertprog.h index 2bcbf28c82..64243927de 100644 --- a/src/mesa/drivers/dri/r300/r300_vertprog.h +++ b/src/mesa/drivers/dri/r300/r300_vertprog.h @@ -50,45 +50,6 @@ | ((comp_w)<<R300_VPI_IN_W_SHIFT) \ | ((negate)<<25) | ((class))) -/* special sources: */ - -/* (1.0,1.0,1.0,1.0) vector (ATTR, plain ) */ -#define VSF_ATTR_UNITY(reg) \ - MAKE_VSF_SOURCE(reg, VSF_IN_COMPONENT_ONE, VSF_IN_COMPONENT_ONE, VSF_IN_COMPONENT_ONE, VSF_IN_COMPONENT_ONE, \ - VSF_IN_CLASS_ATTR, VSF_FLAG_NONE) -#define VSF_UNITY(reg) \ - MAKE_VSF_SOURCE(reg, VSF_IN_COMPONENT_ONE, VSF_IN_COMPONENT_ONE, VSF_IN_COMPONENT_ONE, VSF_IN_COMPONENT_ONE, \ - VSF_IN_CLASS_NONE, VSF_FLAG_NONE) - -/* contents of unmodified register */ -#define VSF_REG(reg) \ - MAKE_VSF_SOURCE(reg, VSF_IN_COMPONENT_X, VSF_IN_COMPONENT_Y, VSF_IN_COMPONENT_Z, VSF_IN_COMPONENT_W, \ - VSF_IN_CLASS_ATTR, VSF_FLAG_NONE) - -/* contents of unmodified parameter */ -#define VSF_PARAM(reg) \ - MAKE_VSF_SOURCE(reg, VSF_IN_COMPONENT_X, VSF_IN_COMPONENT_Y, VSF_IN_COMPONENT_Z, VSF_IN_COMPONENT_W, \ - VSF_IN_CLASS_PARAM, VSF_FLAG_NONE) - -/* contents of unmodified temporary register */ -#define VSF_TMP(reg) \ - MAKE_VSF_SOURCE(reg, VSF_IN_COMPONENT_X, VSF_IN_COMPONENT_Y, VSF_IN_COMPONENT_Z, VSF_IN_COMPONENT_W, \ - VSF_IN_CLASS_TMP, VSF_FLAG_NONE) - -/* components of ATTR register */ -#define VSF_ATTR_X(reg) \ - MAKE_VSF_SOURCE(reg, VSF_IN_COMPONENT_X, VSF_IN_COMPONENT_X, VSF_IN_COMPONENT_X, VSF_IN_COMPONENT_X, \ - VSF_IN_CLASS_ATTR, VSF_FLAG_NONE) -#define VSF_ATTR_Y(reg) \ - MAKE_VSF_SOURCE(reg, VSF_IN_COMPONENT_Y, VSF_IN_COMPONENT_Y, VSF_IN_COMPONENT_Y, VSF_IN_COMPONENT_Y, \ - VSF_IN_CLASS_ATTR, VSF_FLAG_NONE) -#define VSF_ATTR_Z(reg) \ - MAKE_VSF_SOURCE(reg, VSF_IN_COMPONENT_Z, VSF_IN_COMPONENT_Z, VSF_IN_COMPONENT_Z, VSF_IN_COMPONENT_Z, \ - VSF_IN_CLASS_ATTR, VSF_FLAG_NONE) -#define VSF_ATTR_W(reg) \ - MAKE_VSF_SOURCE(reg, VSF_IN_COMPONENT_W, VSF_IN_COMPONENT_W, VSF_IN_COMPONENT_W, VSF_IN_COMPONENT_W, \ - VSF_IN_CLASS_ATTR, VSF_FLAG_NONE) - #if 1 /** |