diff options
Diffstat (limited to 'src/mesa/drivers/dri')
-rw-r--r-- | src/mesa/drivers/dri/r300/r300_state.c | 24 | ||||
-rw-r--r-- | src/mesa/drivers/dri/r300/r300_vertprog.c | 33 | ||||
-rw-r--r-- | src/mesa/drivers/dri/r300/r300_vertprog.h | 7 |
3 files changed, 22 insertions, 42 deletions
diff --git a/src/mesa/drivers/dri/r300/r300_state.c b/src/mesa/drivers/dri/r300/r300_state.c index 64d38724703..f4d10d8e176 100644 --- a/src/mesa/drivers/dri/r300/r300_state.c +++ b/src/mesa/drivers/dri/r300/r300_state.c @@ -1664,24 +1664,24 @@ static void r300SetupDefaultVertexProgram(r300ContextPtr rmesa) VSF_FLAG_ALL, PVS_DST_REG_OUT); prog->program.body.i[program_end + 1] = PVS_SOURCE_OPCODE(rmesa->state.sw_tcl_inputs[i], - VSF_IN_COMPONENT_X, - VSF_IN_COMPONENT_Y, - VSF_IN_COMPONENT_Z, - VSF_IN_COMPONENT_W, + PVS_SRC_SELECT_X, + PVS_SRC_SELECT_Y, + PVS_SRC_SELECT_Z, + PVS_SRC_SELECT_W, PVS_SRC_REG_INPUT, VSF_FLAG_NONE); prog->program.body.i[program_end + 2] = PVS_SOURCE_OPCODE(rmesa->state.sw_tcl_inputs[i], - VSF_IN_COMPONENT_ONE, - VSF_IN_COMPONENT_ONE, - VSF_IN_COMPONENT_ONE, - VSF_IN_COMPONENT_ONE, + 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); prog->program.body.i[program_end + 3] = PVS_SOURCE_OPCODE(rmesa->state.sw_tcl_inputs[i], - VSF_IN_COMPONENT_ONE, - VSF_IN_COMPONENT_ONE, - VSF_IN_COMPONENT_ONE, - VSF_IN_COMPONENT_ONE, + PVS_SRC_SELECT_FORCE_1, + PVS_SRC_SELECT_FORCE_1, + PVS_SRC_SELECT_FORCE_1, + PVS_SRC_SELECT_FORCE_1, /* FIXME */ 0, VSF_FLAG_NONE); program_end += 4; } diff --git a/src/mesa/drivers/dri/r300/r300_vertprog.c b/src/mesa/drivers/dri/r300/r300_vertprog.c index 16955d7c0fc..e0946420a48 100644 --- a/src/mesa/drivers/dri/r300/r300_vertprog.c +++ b/src/mesa/drivers/dri/r300/r300_vertprog.c @@ -46,19 +46,6 @@ USE OR OTHER DEALINGS IN THE SOFTWARE. #include "r300_context.h" -#if SWIZZLE_X != VSF_IN_COMPONENT_X || \ - SWIZZLE_Y != VSF_IN_COMPONENT_Y || \ - SWIZZLE_Z != VSF_IN_COMPONENT_Z || \ - SWIZZLE_W != VSF_IN_COMPONENT_W || \ - SWIZZLE_ZERO != VSF_IN_COMPONENT_ZERO || \ - SWIZZLE_ONE != VSF_IN_COMPONENT_ONE || \ - WRITEMASK_X != VSF_FLAG_X || \ - WRITEMASK_Y != VSF_FLAG_Y || \ - WRITEMASK_Z != VSF_FLAG_Z || \ - WRITEMASK_W != VSF_FLAG_W -#error Cannot change these! -#endif - /* TODO: Get rid of t_src_class call */ #define CMP_SRCS(a, b) ((a.RelAddr != b.RelAddr) || (a.Index != b.Index && \ ((t_src_class(a.File) == PVS_SRC_REG_CONSTANT && \ @@ -512,7 +499,7 @@ static GLuint *t_opcode_dph(struct r300_vertex_program *vp, t_swizzle(GET_SWZ(src[0].Swizzle, 0)), t_swizzle(GET_SWZ(src[0].Swizzle, 1)), t_swizzle(GET_SWZ(src[0].Swizzle, 2)), - VSF_IN_COMPONENT_ONE, t_src_class(src[0].File), + PVS_SRC_SELECT_FORCE_1, t_src_class(src[0].File), src[0]. NegateBase ? VSF_FLAG_XYZ : VSF_FLAG_NONE) | (src[0].RelAddr << 4); @@ -594,9 +581,9 @@ static GLuint *t_opcode_flr(struct r300_vertex_program *vp, inst[1] = t_src(vp, &src[0]); inst[2] = - PVS_SOURCE_OPCODE(*u_temp_i, VSF_IN_COMPONENT_X, - VSF_IN_COMPONENT_Y, VSF_IN_COMPONENT_Z, - VSF_IN_COMPONENT_W, PVS_SRC_REG_TEMPORARY, + PVS_SOURCE_OPCODE(*u_temp_i, PVS_SRC_SELECT_X, + PVS_SRC_SELECT_Y, PVS_SRC_SELECT_Z, + PVS_SRC_SELECT_W, PVS_SRC_REG_TEMPORARY, /* Not 100% sure about this */ (!src[0]. NegateBase) ? VSF_FLAG_ALL : VSF_FLAG_NONE @@ -664,7 +651,7 @@ static GLuint *t_opcode_lit(struct r300_vertex_program *vp, /* NOTE: Users swizzling might not work. */ inst[1] = PVS_SOURCE_OPCODE(t_src_index(vp, &src[0]), t_swizzle(GET_SWZ(src[0].Swizzle, 0)), // x t_swizzle(GET_SWZ(src[0].Swizzle, 3)), // w - VSF_IN_COMPONENT_ZERO, // z + PVS_SRC_SELECT_FORCE_0, // z t_swizzle(GET_SWZ(src[0].Swizzle, 1)), // y t_src_class(src[0].File), src[0]. @@ -672,7 +659,7 @@ static GLuint *t_opcode_lit(struct r300_vertex_program *vp, VSF_FLAG_NONE) | (src[0].RelAddr << 4); inst[2] = PVS_SOURCE_OPCODE(t_src_index(vp, &src[0]), t_swizzle(GET_SWZ(src[0].Swizzle, 1)), // y t_swizzle(GET_SWZ(src[0].Swizzle, 3)), // w - VSF_IN_COMPONENT_ZERO, // z + PVS_SRC_SELECT_FORCE_0, // z t_swizzle(GET_SWZ(src[0].Swizzle, 0)), // x t_src_class(src[0].File), src[0]. @@ -680,7 +667,7 @@ static GLuint *t_opcode_lit(struct r300_vertex_program *vp, VSF_FLAG_NONE) | (src[0].RelAddr << 4); inst[3] = PVS_SOURCE_OPCODE(t_src_index(vp, &src[0]), t_swizzle(GET_SWZ(src[0].Swizzle, 1)), // y t_swizzle(GET_SWZ(src[0].Swizzle, 0)), // x - VSF_IN_COMPONENT_ZERO, // z + PVS_SRC_SELECT_FORCE_0, // z t_swizzle(GET_SWZ(src[0].Swizzle, 3)), // w t_src_class(src[0].File), src[0]. @@ -1042,9 +1029,9 @@ static GLuint *t_opcode_xpd(struct r300_vertex_program *vp, VSF_FLAG_NONE) | (src[0].RelAddr << 4); inst[3] = - PVS_SOURCE_OPCODE(*u_temp_i + 1, VSF_IN_COMPONENT_X, - VSF_IN_COMPONENT_Y, VSF_IN_COMPONENT_Z, - VSF_IN_COMPONENT_W, PVS_SRC_REG_TEMPORARY, + PVS_SOURCE_OPCODE(*u_temp_i + 1, PVS_SRC_SELECT_X, + PVS_SRC_SELECT_Y, PVS_SRC_SELECT_Z, + PVS_SRC_SELECT_W, PVS_SRC_REG_TEMPORARY, VSF_FLAG_NONE); return inst; diff --git a/src/mesa/drivers/dri/r300/r300_vertprog.h b/src/mesa/drivers/dri/r300/r300_vertprog.h index c0e418a936e..462f655c00f 100644 --- a/src/mesa/drivers/dri/r300/r300_vertprog.h +++ b/src/mesa/drivers/dri/r300/r300_vertprog.h @@ -30,13 +30,6 @@ /* according to Nikolai, the subsequent 3 DWORDs are sources, use same define for each */ -#define VSF_IN_COMPONENT_X 0 -#define VSF_IN_COMPONENT_Y 1 -#define VSF_IN_COMPONENT_Z 2 -#define VSF_IN_COMPONENT_W 3 -#define VSF_IN_COMPONENT_ZERO 4 -#define VSF_IN_COMPONENT_ONE 5 - #define PVS_SOURCE_OPCODE(in_reg_index, comp_x, comp_y, comp_z, comp_w, class, negate) \ ( ((in_reg_index)<<R300_VPI_IN_REG_INDEX_SHIFT) \ | ((comp_x)<<R300_VPI_IN_X_SHIFT) \ |