summaryrefslogtreecommitdiff
path: root/src/mesa/shader/nvfragparse.c
diff options
context:
space:
mode:
authorBrian Paul <brian.paul@tungstengraphics.com>2006-05-30 22:17:35 +0000
committerBrian Paul <brian.paul@tungstengraphics.com>2006-05-30 22:17:35 +0000
commita8c4242395b1bce0eac2a20243e5289414a9f511 (patch)
tree7ff0d74522c04fb170ad0ce472c1fe3562de4498 /src/mesa/shader/nvfragparse.c
parente4cb9cd167b2993a4d73871b80216af9766f130b (diff)
Define new NEGATE_* tokens for setting the src register's NegateBase field.
Before, we were using GL_TRUE/GL_FALSE in a few places. Note: only the SWZ instruction can negate individual components.
Diffstat (limited to 'src/mesa/shader/nvfragparse.c')
-rw-r--r--src/mesa/shader/nvfragparse.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/mesa/shader/nvfragparse.c b/src/mesa/shader/nvfragparse.c
index e5a34205fb..14de7cdd52 100644
--- a/src/mesa/shader/nvfragparse.c
+++ b/src/mesa/shader/nvfragparse.c
@@ -983,16 +983,16 @@ Parse_VectorSrc(struct parse_state *parseState,
srcReg->NegateAbs = (sign < 0.0F) ? GL_TRUE : GL_FALSE;
if (Parse_String(parseState, "-"))
- srcReg->NegateBase = 0xf;
+ srcReg->NegateBase = NEGATE_XYZW;
else if (Parse_String(parseState, "+"))
- srcReg->NegateBase = 0;
+ srcReg->NegateBase = NEGATE_NONE;
else
- srcReg->NegateBase = 0;
+ srcReg->NegateBase = NEGATE_NONE;
}
else {
srcReg->Abs = GL_FALSE;
srcReg->NegateAbs = GL_FALSE;
- srcReg->NegateBase = (sign < 0.0F) ? 0xf : 0x0;
+ srcReg->NegateBase = (sign < 0.0F) ? NEGATE_XYZW : NEGATE_NONE;
}
/* This should be the real src vector/register name */
@@ -1107,16 +1107,16 @@ Parse_ScalarSrcReg(struct parse_state *parseState,
srcReg->NegateAbs = (sign < 0.0F) ? GL_TRUE : GL_FALSE;
if (Parse_String(parseState, "-"))
- srcReg->NegateBase = 0xf;
+ srcReg->NegateBase = NEGATE_XYZW;
else if (Parse_String(parseState, "+"))
- srcReg->NegateBase = 0x0;
+ srcReg->NegateBase = NEGATE_NONE;
else
- srcReg->NegateBase = 0x0;
+ srcReg->NegateBase = NEGATE_NONE;
}
else {
srcReg->Abs = GL_FALSE;
srcReg->NegateAbs = GL_FALSE;
- srcReg->NegateBase = (sign < 0.0F) ? 0xf : 0x0;
+ srcReg->NegateBase = (sign < 0.0F) ? NEGATE_XYZW : NEGATE_NONE;
}
if (!Peek_Token(parseState, token))
@@ -1241,7 +1241,7 @@ Parse_PrintInstruction(struct parse_state *parseState,
}
inst->SrcReg[0].Swizzle = SWIZZLE_NOOP;
- inst->SrcReg[0].NegateBase = 0x0;
+ inst->SrcReg[0].NegateBase = NEGATE_NONE;
inst->SrcReg[0].Abs = GL_FALSE;
inst->SrcReg[0].NegateAbs = GL_FALSE;