diff --git a/src/nouveau/compiler/nak/ir.rs b/src/nouveau/compiler/nak/ir.rs index f8e096349c7..06bfd2d6d9d 100644 --- a/src/nouveau/compiler/nak/ir.rs +++ b/src/nouveau/compiler/nak/ir.rs @@ -3977,7 +3977,9 @@ pub struct OpF2F { pub dst_type: FloatType, pub rnd_mode: FRndMode, pub ftz: bool, - /// Place the result into the upper 16 bits of the destination register + /// For 16-bit up-conversions, take the high 16 bits of the source register. + /// For 16-bit down-conversions, place the result into the upper 16 bits of + /// the destination register pub high: bool, /// Round to the nearest integer rather than nearest float /// diff --git a/src/nouveau/compiler/nak/sm50.rs b/src/nouveau/compiler/nak/sm50.rs index 99097729e80..74a59d72755 100644 --- a/src/nouveau/compiler/nak/sm50.rs +++ b/src/nouveau/compiler/nak/sm50.rs @@ -1698,6 +1698,7 @@ impl SM50Op for OpF2F { e.set_field(10..12, (self.src_type.bits() / 8).ilog2()); e.set_rnd_mode(39..41, self.rnd_mode); + e.set_bit(41, self.high); e.set_bit(42, self.integer_rnd); e.set_bit(44, self.ftz); e.set_bit(50, false); // saturate