summaryrefslogtreecommitdiff
path: root/src/mesa
diff options
context:
space:
mode:
authorBrian <brian.paul@tungstengraphics.com>2008-03-27 16:01:53 -0600
committerBrian <brian.paul@tungstengraphics.com>2008-03-27 16:06:36 -0600
commit21454f86369e3290a4667037263399b1217d74b6 (patch)
tree01d3e45e4527a0d8ea984ea6c8329442085670bf /src/mesa
parent978145a075255ae153ee05c2a037400e61558079 (diff)
when negating scalar src args, use NEGATE_XYZW, not NEGATE_X
This makes things easier on the back-end when generating GPU code. cherry-picked from gallium-0.1
Diffstat (limited to 'src/mesa')
-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 1a3d232e0f..c55f2aaa9b 100644
--- a/src/mesa/shader/arbprogparse.c
+++ b/src/mesa/shader/arbprogparse.c
@@ -2598,7 +2598,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))
@@ -2655,7 +2655,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))
@@ -3143,7 +3143,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))
@@ -3170,12 +3170,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))
@@ -3187,7 +3187,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;
}