From 9cc2cd843b76afa4f110dcd4df1dc53843016337 Mon Sep 17 00:00:00 2001 From: Karol Herbst Date: Fri, 13 Mar 2026 11:01:45 +0100 Subject: [PATCH] nak: enable MUFU.F16 on Turing and newer Totals from 1427 (0.12% of 1163204) affected shaders: CodeSize: 18599616 -> 18495424 (-0.56%); split: -0.56%, +0.00% Number of GPRs: 91579 -> 91571 (-0.01%) SLM Size: 14144 -> 14140 (-0.03%) Static cycle count: 96164214 -> 96075886 (-0.09%); split: -0.13%, +0.04% Spills to memory: 2677 -> 2681 (+0.15%) Fills from memory: 2677 -> 2681 (+0.15%) Max warps/SM: 48868 -> 48872 (+0.01%) Reviewed-by: Mel Henning Part-of: --- src/nouveau/compiler/nak_nir.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/nouveau/compiler/nak_nir.c b/src/nouveau/compiler/nak_nir.c index fc07530de04..51bd0254378 100644 --- a/src/nouveau/compiler/nak_nir.c +++ b/src/nouveau/compiler/nak_nir.c @@ -275,6 +275,19 @@ lower_bit_size_cb(const nir_instr *instr, void *data) return 0; break; + case nir_op_fcos: + case nir_op_fcos_normalized_2_pi: + case nir_op_fexp2: + case nir_op_flog2: + case nir_op_frcp: + case nir_op_frsq: + case nir_op_fsin: + case nir_op_fsin_normalized_2_pi: + case nir_op_fsqrt: + if (bit_size == 16 && nak->sm >= 73) + return 0; + break; + case nir_op_fmax: case nir_op_fmin: if (bit_size == 16 && nak->sm >= 80)