diff options
author | Brian Paul <brian.paul@tungstengraphics.com> | 2006-05-30 22:17:35 +0000 |
---|---|---|
committer | Brian Paul <brian.paul@tungstengraphics.com> | 2006-05-30 22:17:35 +0000 |
commit | a8c4242395b1bce0eac2a20243e5289414a9f511 (patch) | |
tree | 7ff0d74522c04fb170ad0ce472c1fe3562de4498 /src/mesa/shader/nvvertparse.c | |
parent | e4cb9cd167b2993a4d73871b80216af9766f130b (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/nvvertparse.c')
-rw-r--r-- | src/mesa/shader/nvvertparse.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/mesa/shader/nvvertparse.c b/src/mesa/shader/nvvertparse.c index a7e062c61c..ebfe1fdeef 100644 --- a/src/mesa/shader/nvvertparse.c +++ b/src/mesa/shader/nvvertparse.c @@ -642,12 +642,12 @@ Parse_SwizzleSrcReg(struct parse_state *parseState, struct prog_src_register *sr RETURN_ERROR; if (token[0] == '-') { (void) Parse_String(parseState, "-"); - srcReg->NegateBase = GL_TRUE; + srcReg->NegateBase = NEGATE_XYZW; if (!Peek_Token(parseState, token)) RETURN_ERROR; } else { - srcReg->NegateBase = GL_FALSE; + srcReg->NegateBase = NEGATE_NONE; } /* Src reg can be R<n>, c[n], c[n +/- offset], or a named vertex attrib */ @@ -735,13 +735,13 @@ Parse_ScalarSrcReg(struct parse_state *parseState, struct prog_src_register *src if (!Peek_Token(parseState, token)) RETURN_ERROR; if (token[0] == '-') { - srcReg->NegateBase = GL_TRUE; + srcReg->NegateBase = NEGATE_XYZW; (void) Parse_String(parseState, "-"); /* consume '-' */ if (!Peek_Token(parseState, token)) RETURN_ERROR; } else { - srcReg->NegateBase = GL_FALSE; + srcReg->NegateBase = NEGATE_NONE; } /* Src reg can be R<n>, c[n], c[n +/- offset], or a named vertex attrib */ @@ -1070,7 +1070,7 @@ Parse_PrintInstruction(struct parse_state *parseState, struct prog_instruction * RETURN_ERROR; srcReg->RelAddr = GL_FALSE; - srcReg->NegateBase = GL_FALSE; + srcReg->NegateBase = NEGATE_NONE; srcReg->Swizzle = SWIZZLE_NOOP; /* Register can be R<n>, c[n], c[n +/- offset], a named vertex attrib, |