mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-09 06:48:06 +02:00
i965: Handle the negate and abs swizzles on brw_wm_glsl.c immediate args.
Fixes piglit glsl-orangebook-ch06-bump, regressed with
4fc5732225
This commit is contained in:
parent
01f7acb700
commit
3695cdd606
1 changed files with 12 additions and 2 deletions
|
|
@ -583,11 +583,21 @@ static struct brw_reg get_src_reg(struct brw_wm_compile *c,
|
|||
if (component == SWIZZLE_ZERO) {
|
||||
return brw_imm_f(0.0F);
|
||||
} else if (component == SWIZZLE_ONE) {
|
||||
return brw_imm_f(1.0F);
|
||||
if (src->Negate)
|
||||
return brw_imm_f(-1.0F);
|
||||
else
|
||||
return brw_imm_f(1.0F);
|
||||
}
|
||||
|
||||
if (src->File == PROGRAM_CONSTANT) {
|
||||
return brw_imm_f(params->ParameterValues[src->Index][component]);
|
||||
float f = params->ParameterValues[src->Index][component];
|
||||
|
||||
if (src->Abs)
|
||||
f = fabs(f);
|
||||
if (src->Negate)
|
||||
f = -f;
|
||||
|
||||
return brw_imm_f(f);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue