r300: Removed duplicate source register class defines.
authorOliver McFadden <z3ro.geek@gmail.com>
Wed, 27 Feb 2008 02:34:26 +0000 (02:34 +0000)
committerOliver McFadden <z3ro.geek@gmail.com>
Sat, 1 Mar 2008 06:33:06 +0000 (06:33 +0000)
src/mesa/drivers/dri/r300/r300_state.c
src/mesa/drivers/dri/r300/r300_vertprog.c
src/mesa/drivers/dri/r300/r300_vertprog.h

index f6849b8f6e75b3973da40d15a2d588ffe92d8f8e..64d387247037c92512c076923d6aeaa870d3ab4e 100644 (file)
@@ -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;
                }
        }
index 0f26e5ed5b5f50cea994daffdb3dc2fe6652a8ac..16955d7c0fcef4a73705ee4141675057789db066 100644 (file)
@@ -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;
index 57682dcfbaec321c367c4c723f59c5be4ee18cb8..c0e418a936eb75cb8402ffff504a1a8c690dfaf7 100644 (file)
 
 /* 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