From 00eaca4c8f95235257e71056f10e561d95ab3af0 Mon Sep 17 00:00:00 2001 From: Faith Ekstrand Date: Mon, 26 May 2025 16:42:04 -0400 Subject: [PATCH] nak/sm20: Fix the encoding of fset We weren't setting the accum src (which should be pT for now) and we put ftz in the wrong place. Bit 5 is actually .bf which we want to set all the time in order to get a float output. (Otherwise it gives an integer output.) Fixes: a3330f1d466d ("nak/sm20: Add float ops") Part-of: --- src/nouveau/compiler/nak/sm20.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/nouveau/compiler/nak/sm20.rs b/src/nouveau/compiler/nak/sm20.rs index 2f59826af8d..84fcb40a3e0 100644 --- a/src/nouveau/compiler/nak/sm20.rs +++ b/src/nouveau/compiler/nak/sm20.rs @@ -812,12 +812,14 @@ impl SM20Op for OpFSet { None, ); - e.set_bit(5, self.ftz); + e.set_bit(5, true); // .bf e.set_bit(6, self.srcs[1].src_mod.has_fabs()); e.set_bit(7, self.srcs[0].src_mod.has_fabs()); e.set_bit(8, self.srcs[1].src_mod.has_fneg()); e.set_bit(9, self.srcs[0].src_mod.has_fneg()); + e.set_pred_src(49..53, &SrcRef::True.into()); e.set_float_cmp_op(55..59, self.cmp_op); + e.set_bit(59, self.ftz); } }