diff options
author | Brian Paul <[email protected]> | 2009-03-31 14:25:32 -0600 |
---|---|---|
committer | Brian Paul <[email protected]> | 2009-04-03 09:07:04 -0600 |
commit | a9c62a2340794977a87cba4a352c02fc16f81505 (patch) | |
tree | df0ddcba56715eae02071c6aaaff02e5ee611910 /src | |
parent | 5f1ce6b87e837b9f6bc2a4f3e81cf8feea4af2df (diff) |
i965: do negation and Abs in get_src_reg_imm()
Fixes regression seen with progs/glsl/bump.c
Diffstat (limited to 'src')
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_wm_glsl.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_wm_glsl.c b/src/mesa/drivers/dri/i965/brw_wm_glsl.c index 4e99611be81..67ba59c3252 100644 --- a/src/mesa/drivers/dri/i965/brw_wm_glsl.c +++ b/src/mesa/drivers/dri/i965/brw_wm_glsl.c @@ -276,7 +276,12 @@ static struct brw_reg get_src_reg_imm(struct brw_wm_compile *c, const int component = GET_SWZ(src->Swizzle, index); const GLfloat *param = c->fp->program.Base.Parameters->ParameterValues[src->Index]; - return brw_imm_f(param[component]); + GLfloat value = param[component]; + if (src->NegateBase) + value = -value; + if (src->Abs) + value = FABSF(value); + return brw_imm_f(value); } else { return get_src_reg(c, src, index); |