diff options
author | Oliver McFadden <[email protected]> | 2008-02-25 12:15:22 +0000 |
---|---|---|
committer | Oliver McFadden <[email protected]> | 2008-03-01 06:33:05 +0000 |
commit | 8a646b80ef518fd36bc5643ee91c0339d4ccb2fb (patch) | |
tree | 2fd4fe1848a6c749b8c294ce879610a6e413ce57 /src/mesa | |
parent | ea8299040f3a70b2912723bdea00778512da2897 (diff) |
r300: Removed the duplicate "easy" vertex program macros.
Diffstat (limited to 'src/mesa')
-rw-r--r-- | src/mesa/drivers/dri/r300/r300_state.c | 2 | ||||
-rw-r--r-- | src/mesa/drivers/dri/r300/r300_vertprog.h | 38 |
2 files changed, 19 insertions, 21 deletions
diff --git a/src/mesa/drivers/dri/r300/r300_state.c b/src/mesa/drivers/dri/r300/r300_state.c index 3cd009904e9..488ed3d3cc2 100644 --- a/src/mesa/drivers/dri/r300/r300_state.c +++ b/src/mesa/drivers/dri/r300/r300_state.c @@ -1659,7 +1659,7 @@ 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] = EASY_VSF_OP(MUL, o_reg++, ALL, RESULT); + prog->program.body.i[program_end + 0] = MAKE_VSF_OP(R300_VPI_OUT_OP_MUL, o_reg++, VSF_FLAG_ALL, VSF_OUT_CLASS_RESULT); 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]); diff --git a/src/mesa/drivers/dri/r300/r300_vertprog.h b/src/mesa/drivers/dri/r300/r300_vertprog.h index 786fb6c466e..62e5c70a4fe 100644 --- a/src/mesa/drivers/dri/r300/r300_vertprog.h +++ b/src/mesa/drivers/dri/r300/r300_vertprog.h @@ -27,9 +27,6 @@ | ((out_reg_fields) << 20) \ | ( (class) << 8 ) ) -#define EASY_VSF_OP(op, out_reg_index, out_reg_fields, class) \ - MAKE_VSF_OP(R300_VPI_OUT_OP_##op, out_reg_index, VSF_FLAG_##out_reg_fields, VSF_OUT_CLASS_##class) \ - /* according to Nikolai, the subsequent 3 DWORDs are sources, use same define for each */ #define VSF_IN_CLASS_TMP 0 @@ -52,34 +49,35 @@ | ((comp_w)<<R300_VPI_IN_W_SHIFT) \ | ((negate)<<25) | ((class))) -#define EASY_VSF_SOURCE(in_reg_index, comp_x, comp_y, comp_z, comp_w, class, negate) \ - MAKE_VSF_SOURCE(in_reg_index, \ - VSF_IN_COMPONENT_##comp_x, \ - VSF_IN_COMPONENT_##comp_y, \ - VSF_IN_COMPONENT_##comp_z, \ - VSF_IN_COMPONENT_##comp_w, \ - VSF_IN_CLASS_##class, VSF_FLAG_##negate) - /* special sources: */ /* (1.0,1.0,1.0,1.0) vector (ATTR, plain ) */ -#define VSF_ATTR_UNITY(reg) EASY_VSF_SOURCE(reg, ONE, ONE, ONE, ONE, ATTR, NONE) -#define VSF_UNITY(reg) EASY_VSF_SOURCE(reg, ONE, ONE, ONE, ONE, NONE, NONE) +#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) EASY_VSF_SOURCE(reg, X, Y, Z, W, ATTR, NONE) +#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) EASY_VSF_SOURCE(reg, X, Y, Z, W, PARAM, NONE) +#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) EASY_VSF_SOURCE(reg, X, Y, Z, W, TMP, NONE) +#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) EASY_VSF_SOURCE(reg, X, X, X, X, ATTR, NONE) -#define VSF_ATTR_Y(reg) EASY_VSF_SOURCE(reg, Y, Y, Y, Y, ATTR, NONE) -#define VSF_ATTR_Z(reg) EASY_VSF_SOURCE(reg, Z, Z, Z, Z, ATTR, NONE) -#define VSF_ATTR_W(reg) EASY_VSF_SOURCE(reg, W, W, W, W, ATTR, NONE) +#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 |