summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/mesa/drivers/dri/r300/r300_fragprog.c6
-rw-r--r--src/mesa/drivers/dri/r300/r300_vertexprog.c12
2 files changed, 9 insertions, 9 deletions
diff --git a/src/mesa/drivers/dri/r300/r300_fragprog.c b/src/mesa/drivers/dri/r300/r300_fragprog.c
index d3062a41450..82fb5b66ed2 100644
--- a/src/mesa/drivers/dri/r300/r300_fragprog.c
+++ b/src/mesa/drivers/dri/r300/r300_fragprog.c
@@ -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 */
diff --git a/src/mesa/drivers/dri/r300/r300_vertexprog.c b/src/mesa/drivers/dri/r300/r300_vertexprog.c
index 68a11a42b3a..9257ff44e3e 100644
--- a/src/mesa/drivers/dri/r300/r300_vertexprog.c
+++ b/src/mesa/drivers/dri/r300/r300_vertexprog.c
@@ -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);