From 08b58c3fac0df423dd7f820b988159ade5babb31 Mon Sep 17 00:00:00 2001 From: Georg Lehmann Date: Wed, 3 Sep 2025 14:54:04 +0200 Subject: [PATCH] nir/lower_subgroups: remove lower_fp64 option This was incorrect (it also lowered int64 reductions/scans), and the only user can just use the general callback to precisely only lower what it wants. Reviewed-by: Alyssa Rosenzweig Reviewed-by: Emma Anholt Part-of: --- src/compiler/nir/nir.h | 1 - src/compiler/nir/nir_lower_subgroups.c | 9 +++------ 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/src/compiler/nir/nir.h b/src/compiler/nir/nir.h index 4b7ca4e2460..0239906fbd5 100644 --- a/src/compiler/nir/nir.h +++ b/src/compiler/nir/nir.h @@ -5515,7 +5515,6 @@ typedef struct nir_lower_subgroups_options { uint8_t ballot_bit_size; uint8_t ballot_components; bool lower_to_scalar : 1; - bool lower_fp64 : 1; bool lower_vote_trivial : 1; bool lower_vote_feq : 1; bool lower_vote_ieq : 1; diff --git a/src/compiler/nir/nir_lower_subgroups.c b/src/compiler/nir/nir_lower_subgroups.c index 1f2ac17dda0..b3316045a94 100644 --- a/src/compiler/nir/nir_lower_subgroups.c +++ b/src/compiler/nir/nir_lower_subgroups.c @@ -1077,8 +1077,7 @@ lower_subgroups_instr(nir_builder *b, nir_instr *instr, void *_options) return lower_vote_eq(b, intrin); } else { if (intrin->intrinsic == nir_intrinsic_vote_feq && - (options->lower_vote_feq || - (options->lower_fp64 && intrin->src[0].ssa->bit_size == 64))) + options->lower_vote_feq) return lower_vote_eq(b, intrin); if (intrin->intrinsic == nir_intrinsic_vote_ieq && options->lower_vote_ieq) @@ -1339,8 +1338,7 @@ lower_subgroups_instr(nir_builder *b, nir_instr *instr, void *_options) if (intrin->def.bit_size == 1 && options->ballot_components == 1 && (options->lower_boolean_reduce || options->lower_reduce)) return lower_boolean_reduce(b, intrin, options); - if (options->lower_reduce || - (options->lower_fp64 && intrin->def.bit_size == 64)) + if (options->lower_reduce) return lower_scan_reduce(b, intrin, options); return ret; } @@ -1351,8 +1349,7 @@ lower_subgroups_instr(nir_builder *b, nir_instr *instr, void *_options) if (intrin->def.bit_size == 1 && options->ballot_components == 1 && (options->lower_boolean_reduce || options->lower_reduce)) return lower_boolean_reduce(b, intrin, options); - if (options->lower_reduce || - (options->lower_fp64 && intrin->def.bit_size == 64)) + if (options->lower_reduce) return lower_scan_reduce(b, intrin, options); break;