r300: Updated R300 to use the new SWIZZLE macros.
authorOliver McFadden <z3ro.geek@gmail.com>
Thu, 15 Mar 2007 19:09:10 +0000 (19:09 +0000)
committerOliver McFadden <z3ro.geek@gmail.com>
Thu, 15 Mar 2007 19:09:10 +0000 (19:09 +0000)
src/mesa/drivers/dri/r300/r300_fragprog.c
src/mesa/drivers/dri/r300/r300_vertexprog.c

index d3062a4..82fb5b6 100644 (file)
@@ -1815,7 +1815,7 @@ static void insert_wpos(struct gl_program *prog)
 
        fpi[i].SrcReg[0].File = PROGRAM_INPUT;
        fpi[i].SrcReg[0].Index = FRAG_ATTRIB_WPOS;
-       fpi[i].SrcReg[0].Swizzle = MAKE_SWIZZLE4(SWIZZLE_W, SWIZZLE_W, SWIZZLE_W, SWIZZLE_W);
+       fpi[i].SrcReg[0].Swizzle = SWIZZLE_WWWW;
        i++;
 
        fpi[i].Opcode = OPCODE_MUL;
@@ -1827,11 +1827,11 @@ static void insert_wpos(struct gl_program *prog)
 
        fpi[i].SrcReg[0].File = PROGRAM_INPUT;
        fpi[i].SrcReg[0].Index = FRAG_ATTRIB_WPOS;
-       fpi[i].SrcReg[0].Swizzle = MAKE_SWIZZLE4(SWIZZLE_X, SWIZZLE_Y, SWIZZLE_Z, SWIZZLE_W);
+       fpi[i].SrcReg[0].Swizzle = SWIZZLE_XYZW;
 
        fpi[i].SrcReg[1].File = PROGRAM_TEMPORARY;
        fpi[i].SrcReg[1].Index = tempregi;
-       fpi[i].SrcReg[1].Swizzle = MAKE_SWIZZLE4(SWIZZLE_W, SWIZZLE_W, SWIZZLE_W, SWIZZLE_W);
+       fpi[i].SrcReg[1].Swizzle = SWIZZLE_WWWW;
        i++;
 
        /* viewport transformation */
index 68a11a4..9257ff4 100644 (file)
@@ -908,11 +908,11 @@ static void position_invariant(struct gl_program *prog)
 
                vpi[i].SrcReg[0].File = PROGRAM_STATE_VAR;
                vpi[i].SrcReg[0].Index = idx;
-               vpi[i].SrcReg[0].Swizzle = MAKE_SWIZZLE4(SWIZZLE_X, SWIZZLE_Y, SWIZZLE_Z, SWIZZLE_W);
+               vpi[i].SrcReg[0].Swizzle = SWIZZLE_XYZW;
 
                vpi[i].SrcReg[1].File = PROGRAM_INPUT;
                vpi[i].SrcReg[1].Index = VERT_ATTRIB_POS;
-               vpi[i].SrcReg[1].Swizzle = MAKE_SWIZZLE4(SWIZZLE_X, SWIZZLE_Y, SWIZZLE_Z, SWIZZLE_W);
+               vpi[i].SrcReg[1].Swizzle = SWIZZLE_XYZW;
 #else
                if (i == 0)
                        vpi[i].Opcode = OPCODE_MUL;
@@ -932,7 +932,7 @@ static void position_invariant(struct gl_program *prog)
 
                vpi[i].SrcReg[0].File = PROGRAM_STATE_VAR;
                vpi[i].SrcReg[0].Index = idx;
-               vpi[i].SrcReg[0].Swizzle = MAKE_SWIZZLE4(SWIZZLE_X, SWIZZLE_Y, SWIZZLE_Z, SWIZZLE_W);
+               vpi[i].SrcReg[0].Swizzle = SWIZZLE_XYZW;
 
                vpi[i].SrcReg[1].File = PROGRAM_INPUT;
                vpi[i].SrcReg[1].Index = VERT_ATTRIB_POS;
@@ -941,7 +941,7 @@ static void position_invariant(struct gl_program *prog)
                if (i > 0) {
                        vpi[i].SrcReg[2].File = PROGRAM_TEMPORARY;
                        vpi[i].SrcReg[2].Index = 0;
-                       vpi[i].SrcReg[2].Swizzle = MAKE_SWIZZLE4(SWIZZLE_X, SWIZZLE_Y, SWIZZLE_Z, SWIZZLE_W);
+                       vpi[i].SrcReg[2].Swizzle = SWIZZLE_XYZW;
                }
 #endif                                 
        }
@@ -985,7 +985,7 @@ static void insert_wpos(struct r300_vertex_program *vp,
 
        vpi_insert[i].SrcReg[0].File = PROGRAM_TEMPORARY;
        vpi_insert[i].SrcReg[0].Index = temp_index;
-       vpi_insert[i].SrcReg[0].Swizzle = MAKE_SWIZZLE4(SWIZZLE_X, SWIZZLE_Y, SWIZZLE_Z, SWIZZLE_W);
+       vpi_insert[i].SrcReg[0].Swizzle = SWIZZLE_XYZW;
        i++;
 
        vpi_insert[i].Opcode = OPCODE_MOV;
@@ -997,7 +997,7 @@ static void insert_wpos(struct r300_vertex_program *vp,
 
        vpi_insert[i].SrcReg[0].File = PROGRAM_TEMPORARY;
        vpi_insert[i].SrcReg[0].Index = temp_index;
-       vpi_insert[i].SrcReg[0].Swizzle = MAKE_SWIZZLE4(SWIZZLE_X, SWIZZLE_Y, SWIZZLE_Z, SWIZZLE_W);
+       vpi_insert[i].SrcReg[0].Swizzle = SWIZZLE_XYZW;
        i++;
 
        free(prog->Instructions);