aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2008-03-25 11:22:57 -0600
committerBrian Paul <[email protected]>2008-03-25 11:47:35 -0600
commitbedb93e989340a2d65ed2fb28af7410983cb484d (patch)
treeb46daa31bcb74b166f1596d66bbeeca23183f1fa
parent331a56136e96717704788b633c1b2e474b88d8ba (diff)
mesa: when negating scalar src args, use NEGATE_XYZW, not NEGATE_X
This makes things easier on the back-end when generating GPU code.
-rw-r--r--src/mesa/shader/arbprogparse.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/mesa/shader/arbprogparse.c b/src/mesa/shader/arbprogparse.c
index 9e5169eff17..6782491cc50 100644
--- a/src/mesa/shader/arbprogparse.c
+++ b/src/mesa/shader/arbprogparse.c
@@ -2578,7 +2578,7 @@ parse_fp_vector_src_reg(GLcontext * ctx, const GLubyte ** inst,
GLboolean isRelOffset;
/* Grab the sign */
- negate = (parse_sign (inst) == -1) ? 0xf : 0x0;
+ negate = (parse_sign (inst) == -1) ? NEGATE_XYZW : NEGATE_NONE;
/* And the src reg */
if (parse_src_reg(ctx, inst, vc_head, program, &file, &index, &isRelOffset))
@@ -2635,7 +2635,7 @@ parse_fp_scalar_src_reg (GLcontext * ctx, const GLubyte ** inst,
GLboolean IsRelOffset;
/* Grab the sign */
- Negate = (parse_sign (inst) == -1) ? 0x1 : 0x0;
+ Negate = (parse_sign (inst) == -1) ? NEGATE_XYZW : NEGATE_NONE;
/* And the src reg */
if (parse_src_reg (ctx, inst, vc_head, Program, &File, &Index, &IsRelOffset))
@@ -3123,7 +3123,7 @@ parse_vp_vector_src_reg(GLcontext * ctx, const GLubyte ** inst,
GLboolean isRelOffset;
/* Grab the sign */
- negateMask = (parse_sign (inst) == -1) ? 0xf : 0x0;
+ negateMask = (parse_sign (inst) == -1) ? NEGATE_XYZW : NEGATE_NONE;
/* And the src reg */
if (parse_src_reg (ctx, inst, vc_head, program, &file, &index, &isRelOffset))
@@ -3150,12 +3150,12 @@ parse_vp_scalar_src_reg (GLcontext * ctx, const GLubyte ** inst,
{
enum register_file File;
GLint Index;
- GLubyte Negate;
+ GLubyte negateMask;
GLubyte Swizzle[4];
GLboolean IsRelOffset;
/* Grab the sign */
- Negate = (parse_sign (inst) == -1) ? 0x1 : 0x0;
+ negateMask = (parse_sign (inst) == -1) ? NEGATE_XYZW : NEGATE_NONE;
/* And the src reg */
if (parse_src_reg (ctx, inst, vc_head, Program, &File, &Index, &IsRelOffset))
@@ -3167,7 +3167,7 @@ parse_vp_scalar_src_reg (GLcontext * ctx, const GLubyte ** inst,
reg->File = File;
reg->Index = Index;
reg->Swizzle = (Swizzle[0] << 0);
- reg->NegateBase = Negate;
+ reg->NegateBase = negateMask;
reg->RelAddr = IsRelOffset;
return 0;
}