VIctory e29391f, 13185f5 and 4fc9d70, by hand
16-bit interpolations write the half op_sel picks, with omod and clamp; the device says whether it was removed; detiling ends with its staging buffer. Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
1 parent
64c3178097
commit
b9c18b0685
4 files changed
+157
-2
No files matched your search
@@ -9927,7 +9927,23 @@ impl<'a> Lower<'a> {
|
||||
let f = half(self, h)?.ok_or("a packed input half no element holds")?;
|
||||
self.as_int(f)
|
||||
} else if f16 {
|
||||
let f = half(self, h)?.ok_or("a packed input half no element holds")?;
|
||||
let mut f = half(self, h)?.ok_or("a packed input half no element holds")?;
|
||||
if let Fields::Valu(v) = &inst.fields {
|
||||
// omod, then clamp, before the one rounding to 16 bits; op_sel[3]
|
||||
// picks the destination half (VIctory e29391f: the low half was
|
||||
// always written, the high one's value never arrived).
|
||||
let (omod, clamp) = (v.omod, v.clamp);
|
||||
if omod != 0 {
|
||||
let factor = [1.0f32, 2.0, 4.0, 0.5][usize::from(omod)];
|
||||
let k = self.s.m.f32(factor.to_bits());
|
||||
f = self.s.m.bin(c, Bin::Mul, f, k);
|
||||
}
|
||||
if clamp {
|
||||
f = self.unary(7, f);
|
||||
}
|
||||
let lo = to_f16(self, f);
|
||||
return self.write_half(inst, lo, None);
|
||||
}
|
||||
let lo = to_f16(self, f);
|
||||
self.low_half(inst, reg, lo)
|
||||
} else if matches!(eval, Eval::Mode(1)) {
|
||||
|
||||
Reference in new issue
Block a user