mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-07 04:58:05 +02:00
nvc0/ir: fold postfactor into immediate
SM20-SM50 can't emit a post-factor in the presence of a long immediate.
Make sure to fold it in.
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Cc: "11.0 11.1" <mesa-stable@lists.freedesktop.org>
(cherry picked from commit ff61ac4838)
This commit is contained in:
parent
69df6ac272
commit
75b6f14ab8
1 changed files with 6 additions and 0 deletions
|
|
@ -858,6 +858,12 @@ ConstantFolding::opnd(Instruction *i, ImmediateValue &imm0, int s)
|
|||
i->src(0).mod = i->src(t).mod;
|
||||
i->setSrc(1, new_ImmediateValue(prog, imm0.reg.data.u32));
|
||||
i->src(1).mod = 0;
|
||||
} else
|
||||
if (i->postFactor && i->sType == TYPE_F32) {
|
||||
/* Can't emit a postfactor with an immediate, have to fold it in */
|
||||
i->setSrc(s, new_ImmediateValue(
|
||||
prog, imm0.reg.data.f32 * exp2f(i->postFactor)));
|
||||
i->postFactor = 0;
|
||||
}
|
||||
break;
|
||||
case OP_MAD:
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue