diff options
author | Brian Paul <brianp@vmware.com> | 2009-04-16 22:02:54 -0600 |
---|---|---|
committer | Brian Paul <brianp@vmware.com> | 2009-04-16 22:02:54 -0600 |
commit | eb0d46490332091b2ee247f32a1f08a04e1fe00f (patch) | |
tree | cfb8e07d4e2a8c4ddbd20c8a17e847ab3fed42b3 /src/mesa/drivers/dri/i965/brw_wm_glsl.c | |
parent | 7571d5d3b013e544a9fbde91e4aec05e0b13b4cb (diff) | |
parent | 7db7ff878d3e5a6b345228e6eaee4797bb68b360 (diff) |
Merge branch 'register-negate'
Diffstat (limited to 'src/mesa/drivers/dri/i965/brw_wm_glsl.c')
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_wm_glsl.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_wm_glsl.c b/src/mesa/drivers/dri/i965/brw_wm_glsl.c index 634648ad5b..2d13088ddb 100644 --- a/src/mesa/drivers/dri/i965/brw_wm_glsl.c +++ b/src/mesa/drivers/dri/i965/brw_wm_glsl.c @@ -340,7 +340,7 @@ get_src_reg_const(struct brw_wm_compile *c, const_reg = stride(const_reg, 0, 1, 0); const_reg.subnr = component * 4; - if (src->NegateBase) + if (src->Negate & (1 << component)) const_reg = negate(const_reg); if (src->Abs) const_reg = brw_abs(const_reg); @@ -377,7 +377,7 @@ static struct brw_reg get_src_reg(struct brw_wm_compile *c, else { /* other type of source register */ return get_reg(c, src->File, src->Index, component, nr, - src->NegateBase, src->Abs); + src->Negate, src->Abs); } } @@ -402,7 +402,7 @@ static struct brw_reg get_src_reg_imm(struct brw_wm_compile *c, const GLfloat *param = c->fp->program.Base.Parameters->ParameterValues[src->Index]; GLfloat value = param[component]; - if (src->NegateBase) + if (src->Negate & (1 << channel)) value = -value; if (src->Abs) value = FABSF(value); |