summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBrian Paul <brian.paul@tungstengraphics.com>2005-11-03 02:35:15 +0000
committerBrian Paul <brian.paul@tungstengraphics.com>2005-11-03 02:35:15 +0000
commitccfe3d4683bb6c97ffacd67267aa002dcb060433 (patch)
tree17d28d38968a548a51ca2d9982da5cbec3d5988e /src
parent7ae9713a609531164b3c7690e0d5b993a00eaa77 (diff)
use WRITEMASK_* tokens
Diffstat (limited to 'src')
-rw-r--r--src/mesa/shader/nvfragparse.c12
-rw-r--r--src/mesa/shader/nvvertparse.c12
2 files changed, 12 insertions, 12 deletions
diff --git a/src/mesa/shader/nvfragparse.c b/src/mesa/shader/nvfragparse.c
index e1eeebd9a3..2e1113267a 100644
--- a/src/mesa/shader/nvfragparse.c
+++ b/src/mesa/shader/nvfragparse.c
@@ -1705,15 +1705,15 @@ PrintDstReg(const struct fp_dst_register *dst)
_mesa_printf("???");
}
- if (dst->WriteMask != 0 && dst->WriteMask != 0xf) {
+ if (dst->WriteMask != 0 && dst->WriteMask != WRITEMASK_XYZW) {
_mesa_printf(".");
- if (dst->WriteMask & 0x1)
+ if (dst->WriteMask & WRITEMASK_X)
_mesa_printf("x");
- if (dst->WriteMask & 0x2)
+ if (dst->WriteMask & WRITEMASK_Y)
_mesa_printf("y");
- if (dst->WriteMask & 0x4)
+ if (dst->WriteMask & WRITEMASK_Z)
_mesa_printf("z");
- if (dst->WriteMask & 0x8)
+ if (dst->WriteMask & WRITEMASK_W)
_mesa_printf("w");
}
@@ -1834,7 +1834,7 @@ _mesa_init_fp_instruction(struct fp_instruction *inst)
inst->SrcReg[2].File = PROGRAM_UNDEFINED;
inst->SrcReg[2].Swizzle = SWIZZLE_NOOP;
inst->DstReg.File = PROGRAM_UNDEFINED;
- inst->DstReg.WriteMask = 0xf;
+ inst->DstReg.WriteMask = WRITEMASK_XYZW;
inst->DstReg.CondSwizzle = SWIZZLE_NOOP;
inst->Precision = FLOAT32;
inst->DstReg.CondMask = COND_TR;
diff --git a/src/mesa/shader/nvvertparse.c b/src/mesa/shader/nvvertparse.c
index 24882a2897..c36d43dd24 100644
--- a/src/mesa/shader/nvvertparse.c
+++ b/src/mesa/shader/nvvertparse.c
@@ -1478,15 +1478,15 @@ PrintDstReg(const struct vp_dst_register *dst)
_mesa_printf("R%d", dst->Index);
}
- if (dst->WriteMask != 0 && dst->WriteMask != 0xf) {
+ if (dst->WriteMask != 0 && dst->WriteMask != WRITEMASK_XYZW) {
_mesa_printf(".");
- if (dst->WriteMask & 0x1)
+ if (dst->WriteMask & WRITEMASK_X)
_mesa_printf("x");
- if (dst->WriteMask & 0x2)
+ if (dst->WriteMask & WRITEMASK_Y)
_mesa_printf("y");
- if (dst->WriteMask & 0x4)
+ if (dst->WriteMask & WRITEMASK_Z)
_mesa_printf("z");
- if (dst->WriteMask & 0x8)
+ if (dst->WriteMask & WRITEMASK_W)
_mesa_printf("w");
}
}
@@ -1614,6 +1614,6 @@ _mesa_init_vp_instruction(struct vp_instruction *inst)
inst->SrcReg[2].File = PROGRAM_UNDEFINED;
inst->SrcReg[2].Swizzle = SWIZZLE_NOOP;
inst->DstReg.File = PROGRAM_UNDEFINED;
- inst->DstReg.WriteMask = 0xf;
+ inst->DstReg.WriteMask = WRITEMASK_XYZW;
}