summaryrefslogtreecommitdiffstats
path: root/src/mesa/shader/arbfragparse.c
diff options
context:
space:
mode:
authorKeith Whitwell <[email protected]>2005-09-08 18:35:48 +0000
committerKeith Whitwell <[email protected]>2005-09-08 18:35:48 +0000
commit5cf13977106d9d7b75da0621a1a2c0bc299f4b3a (patch)
tree6e68695d0b83c3b1fc3ff73dc7c3fb0d46031b46 /src/mesa/shader/arbfragparse.c
parent4618a9bfc2cd57c47ddf3590782c751ec194d362 (diff)
be consistent in populating NegateBase field
Diffstat (limited to 'src/mesa/shader/arbfragparse.c')
-rw-r--r--src/mesa/shader/arbfragparse.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/mesa/shader/arbfragparse.c b/src/mesa/shader/arbfragparse.c
index 725ae545803..51aa3426ac4 100644
--- a/src/mesa/shader/arbfragparse.c
+++ b/src/mesa/shader/arbfragparse.c
@@ -124,8 +124,7 @@ _mesa_debug_fp_inst(GLint num, struct fp_instruction *fp)
_mesa_printf("_SAT");
if (fp[a].DstReg.File != 0xf) {
- if (fp[a].DstReg.WriteMask != 0xf ||
- fp[a].SrcReg[0].NegateBase)
+ if (fp[a].DstReg.WriteMask != 0xf)
_mesa_printf(" %s[%d].%s%s%s%s ", file_string[fp[a].DstReg.File], fp[a].DstReg.Index,
GET_BIT(fp[a].DstReg.WriteMask, 0) ? "x" : "",
GET_BIT(fp[a].DstReg.WriteMask, 1) ? "y" : "",
@@ -135,14 +134,19 @@ _mesa_debug_fp_inst(GLint num, struct fp_instruction *fp)
_mesa_printf(" %s[%d] ", file_string[fp[a].DstReg.File], fp[a].DstReg.Index);
}
+ /* Examine each bit of negatebase here as this may be a SWZ instruction
+ */
if (fp[a].SrcReg[0].File != 0xf) {
if (fp[a].SrcReg[0].Swizzle != SWIZZLE_NOOP ||
fp[a].SrcReg[0].NegateBase)
- _mesa_printf("%s[%d].%s%c%c%c%c ", file_string[fp[a].SrcReg[0].File], fp[a].SrcReg[0].Index,
- fp[a].SrcReg[0].NegateBase ? "-" : "",
+ _mesa_printf("%s[%d].%s%c%s%c%s%c%s%c ", file_string[fp[a].SrcReg[0].File], fp[a].SrcReg[0].Index,
+ GET_BIT(fp[a].SrcReg[0].NegateBase, 0) ? "-" : "",
swz[GET_SWZ(fp[a].SrcReg[0].Swizzle, 0)],
+ GET_BIT(fp[a].SrcReg[0].NegateBase, 0) ? "-" : "",
swz[GET_SWZ(fp[a].SrcReg[0].Swizzle, 1)],
+ GET_BIT(fp[a].SrcReg[0].NegateBase, 0) ? "-" : "",
swz[GET_SWZ(fp[a].SrcReg[0].Swizzle, 2)],
+ GET_BIT(fp[a].SrcReg[0].NegateBase, 0) ? "-" : "",
swz[GET_SWZ(fp[a].SrcReg[0].Swizzle, 3)]);
else
_mesa_printf("%s[%d] ", file_string[fp[a].SrcReg[0].File], fp[a].SrcReg[0].Index);