r300: Removed the (obsolete) special source register macros.
authorOliver McFadden <z3ro.geek@gmail.com>
Wed, 27 Feb 2008 02:10:13 +0000 (02:10 +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.h

index 76a7252f38a3d35bf59aad633970722e8f56ed7a..3b9b19841521698f8e6ac67650ca7641b85065c3 100644 (file)
@@ -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;
                }
        }
index 2bcbf28c8225d9e76785f9f3b8cf9c2274591112..64243927de427fd4cc93cd0bcd49c00d3994f6be 100644 (file)
           | ((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
 
 /**