r300: Converted to the new src/dest register defines.
authorOliver McFadden <z3ro.geek@gmail.com>
Mon, 25 Feb 2008 13:09:15 +0000 (13:09 +0000)
committerOliver McFadden <z3ro.geek@gmail.com>
Sat, 1 Mar 2008 06:33:06 +0000 (06:33 +0000)
src/mesa/drivers/dri/r300/r300_ioctl.c
src/mesa/drivers/dri/r300/r300_reg.h
src/mesa/drivers/dri/r300/r300_vertprog.h

index 082cb6b6e3e520bb3cb7143a355e24c2d1a84c98..ae2dcffe3816b3a9b1d03d1edcbc021ab3ac108c 100644 (file)
@@ -327,12 +327,12 @@ static void r300EmitClearState(GLcontext * ctx)
                R300_STATECHANGE(r300, vpi);
                vsf_start_fragment(0x0, 8);
                e32(VP_OUT(ADD, OUT, 0, XYZW));
-               e32(VP_IN(IN, 0));
+               e32(VP_IN(INPUT, 0));
                e32(VP_ZERO());
                e32(0x0);
 
                e32(VP_OUT(ADD, OUT, 1, XYZW));
-               e32(VP_IN(IN, 1));
+               e32(VP_IN(INPUT, 1));
                e32(VP_ZERO());
                e32(0x0);
        }
index f852660dcc3ce309e6b386c6c2a118c62d7938af..ac04f84b836c4b13ca936e9275852c40e57771ac 100644 (file)
@@ -2502,11 +2502,6 @@ enum {
 /* FIXME */
 #define R300_VPI_OUT_OP_MAD_2                   (128 << 0)
 
-#define R300_VPI_OUT_REG_CLASS_TEMPORARY        (0 << 8)
-#define R300_VPI_OUT_REG_CLASS_ADDR             (1 << 8)
-#define R300_VPI_OUT_REG_CLASS_RESULT           (2 << 8)
-#define R300_VPI_OUT_REG_CLASS_MASK             (31 << 8)
-
 #define R300_VPI_OUT_REG_INDEX_SHIFT            13
        /* GUESS based on fglrx native limits */
 #define R300_VPI_OUT_REG_INDEX_MASK             (31 << 13)
@@ -2516,12 +2511,6 @@ enum {
 #define R300_VPI_OUT_WRITE_Z                    (1 << 22)
 #define R300_VPI_OUT_WRITE_W                    (1 << 23)
 
-#define R300_VPI_IN_REG_CLASS_TEMPORARY         (0 << 0)
-#define R300_VPI_IN_REG_CLASS_ATTRIBUTE         (1 << 0)
-#define R300_VPI_IN_REG_CLASS_PARAMETER         (2 << 0)
-#define R300_VPI_IN_REG_CLASS_NONE              (9 << 0)
-#define R300_VPI_IN_REG_CLASS_MASK              (31 << 0)
-
 #define R300_VPI_IN_REG_INDEX_SHIFT             5
        /* GUESS based on fglrx native limits */
 #define R300_VPI_IN_REG_INDEX_MASK              (255 << 5)
index 006dddacc8f9a5fc687fb557b918635666ad658d..b0b81b5e748f793cbe8739a9b0b1c46d2391ef83 100644 (file)
  * Vertex program helper macros
  */
 
-/* Produce out dword */
-#define VP_OUTCLASS_TMP                R300_VPI_OUT_REG_CLASS_TEMPORARY
-#define VP_OUTCLASS_OUT                R300_VPI_OUT_REG_CLASS_RESULT
-
 #define VP_OUTMASK_X   R300_VPI_OUT_WRITE_X
 #define VP_OUTMASK_Y   R300_VPI_OUT_WRITE_Y
 #define VP_OUTMASK_Z   R300_VPI_OUT_WRITE_Z
 #define VP_OUT(instr,outclass,outidx,outmask) \
        (VE_##instr |                           \
        ((outidx) << R300_VPI_OUT_REG_INDEX_SHIFT) |            \
-       VP_OUTCLASS_##outclass |                                \
+       (PVS_DST_REG_##outclass << 8) |         \
        VP_OUTMASK_##outmask)
 
-/* Produce in dword */
-#define VP_INCLASS_TMP         R300_VPI_IN_REG_CLASS_TEMPORARY
-#define VP_INCLASS_IN          R300_VPI_IN_REG_CLASS_ATTRIBUTE
-#define VP_INCLASS_CONST       R300_VPI_IN_REG_CLASS_PARAMETER
-
 #define VP_IN(class,idx) \
        (((idx) << R300_VPI_IN_REG_INDEX_SHIFT) |               \
-       VP_INCLASS_##class |                                    \
+       (PVS_SRC_REG_##class << 0) |                    \
        (R300_VPI_IN_SELECT_X << R300_VPI_IN_X_SHIFT) |         \
        (R300_VPI_IN_SELECT_Y << R300_VPI_IN_Y_SHIFT) |         \
        (R300_VPI_IN_SELECT_Z << R300_VPI_IN_Z_SHIFT) |         \