nv50/ir: float(s32 & 0xff) = float(u8), not s8
Make sure to make conversion unsigned when we're ANDing the high bits away. Fixes corruption in dolphin. Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu> Cc: "11.0 11.1" <mesa-stable@lists.freedesktop.org>
This commit is contained in:
parent
581f81860e
commit
724134f683
|
@ -1889,6 +1889,9 @@ AlgebraicOpt::handleCVT_EXTBF(Instruction *cvt)
|
||||||
arg = shift->getSrc(0);
|
arg = shift->getSrc(0);
|
||||||
offset = imm.reg.data.u32;
|
offset = imm.reg.data.u32;
|
||||||
}
|
}
|
||||||
|
// We just AND'd the high bits away, which means this is effectively an
|
||||||
|
// unsigned value.
|
||||||
|
cvt->sType = TYPE_U32;
|
||||||
} else if (insn->op == OP_SHR &&
|
} else if (insn->op == OP_SHR &&
|
||||||
insn->sType == cvt->sType &&
|
insn->sType == cvt->sType &&
|
||||||
insn->src(1).getImmediate(imm)) {
|
insn->src(1).getImmediate(imm)) {
|
||||||
|
|
Loading…
Reference in New Issue