From: Oliver McFadden Date: Wed, 27 Feb 2008 02:34:26 +0000 (+0000) Subject: r300: Removed duplicate source register class defines. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=2fdd6d87f4923178f7f48c786853092c6a9e43bd;p=mesa.git r300: Removed duplicate source register class defines. --- diff --git a/src/mesa/drivers/dri/r300/r300_state.c b/src/mesa/drivers/dri/r300/r300_state.c index f6849b8f6e7..64d38724703 100644 --- a/src/mesa/drivers/dri/r300/r300_state.c +++ b/src/mesa/drivers/dri/r300/r300_state.c @@ -1668,21 +1668,21 @@ static void r300SetupDefaultVertexProgram(r300ContextPtr rmesa) VSF_IN_COMPONENT_Y, VSF_IN_COMPONENT_Z, VSF_IN_COMPONENT_W, - VSF_IN_CLASS_ATTR, VSF_FLAG_NONE); + 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, - VSF_IN_CLASS_ATTR, VSF_FLAG_NONE); + 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, - VSF_IN_CLASS_NONE, VSF_FLAG_NONE); + /* 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 0f26e5ed5b5..16955d7c0fc 100644 --- a/src/mesa/drivers/dri/r300/r300_vertprog.c +++ b/src/mesa/drivers/dri/r300/r300_vertprog.c @@ -61,10 +61,10 @@ USE OR OTHER DEALINGS IN THE SOFTWARE. /* 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) == VSF_IN_CLASS_PARAM && \ - t_src_class(b.File) == VSF_IN_CLASS_PARAM) || \ - (t_src_class(a.File) == VSF_IN_CLASS_ATTR && \ - t_src_class(b.File) == VSF_IN_CLASS_ATTR)))) \ + ((t_src_class(a.File) == PVS_SRC_REG_CONSTANT && \ + t_src_class(b.File) == PVS_SRC_REG_CONSTANT) || \ + (t_src_class(a.File) == PVS_SRC_REG_INPUT && \ + t_src_class(b.File) == PVS_SRC_REG_INPUT)))) \ #define ZERO_SRC_0 (PVS_SOURCE_OPCODE(t_src_index(vp, &src[0]), \ SWIZZLE_ZERO, SWIZZLE_ZERO, \ @@ -209,16 +209,16 @@ static unsigned long t_src_class(enum register_file file) switch (file) { case PROGRAM_TEMPORARY: - return VSF_IN_CLASS_TMP; + return PVS_SRC_REG_TEMPORARY; case PROGRAM_INPUT: - return VSF_IN_CLASS_ATTR; + return PVS_SRC_REG_INPUT; case PROGRAM_LOCAL_PARAM: case PROGRAM_ENV_PARAM: case PROGRAM_NAMED_PARAM: case PROGRAM_STATE_VAR: - return VSF_IN_CLASS_PARAM; + return PVS_SRC_REG_CONSTANT; /* case PROGRAM_OUTPUT: case PROGRAM_WRITE_ONLY: @@ -596,7 +596,7 @@ static GLuint *t_opcode_flr(struct r300_vertex_program *vp, inst[2] = PVS_SOURCE_OPCODE(*u_temp_i, VSF_IN_COMPONENT_X, VSF_IN_COMPONENT_Y, VSF_IN_COMPONENT_Z, - VSF_IN_COMPONENT_W, VSF_IN_CLASS_TMP, + VSF_IN_COMPONENT_W, PVS_SRC_REG_TEMPORARY, /* Not 100% sure about this */ (!src[0]. NegateBase) ? VSF_FLAG_ALL : VSF_FLAG_NONE @@ -1044,7 +1044,7 @@ static GLuint *t_opcode_xpd(struct r300_vertex_program *vp, 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, VSF_IN_CLASS_TMP, + VSF_IN_COMPONENT_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 57682dcfbae..c0e418a936e 100644 --- a/src/mesa/drivers/dri/r300/r300_vertprog.h +++ b/src/mesa/drivers/dri/r300/r300_vertprog.h @@ -30,11 +30,6 @@ /* according to Nikolai, the subsequent 3 DWORDs are sources, use same define for each */ -#define VSF_IN_CLASS_TMP 0 -#define VSF_IN_CLASS_ATTR 1 -#define VSF_IN_CLASS_PARAM 2 -#define VSF_IN_CLASS_NONE 9 - #define VSF_IN_COMPONENT_X 0 #define VSF_IN_COMPONENT_Y 1 #define VSF_IN_COMPONENT_Z 2