diff --git a/src/amd/vulkan/radv_shader.c b/src/amd/vulkan/radv_shader.c index 5f7422765d1..63bcecaf651 100644 --- a/src/amd/vulkan/radv_shader.c +++ b/src/amd/vulkan/radv_shader.c @@ -588,7 +588,8 @@ radv_shader_spirv_to_nir(struct radv_device *device, const struct radv_shader_st .lower_relative_shuffle = 1, .lower_rotate_to_shuffle = use_llvm, .lower_shuffle_to_32bit = 1, - .lower_vote_eq = 1, + .lower_vote_feq = 1, + .lower_vote_ieq = 1, .lower_vote_bool_eq = 1, .lower_quad_broadcast_dynamic = 1, .lower_quad_broadcast_dynamic_to_const = gfx7minus, diff --git a/src/compiler/nir/nir.h b/src/compiler/nir/nir.h index 03151ed5e41..6870a2822e7 100644 --- a/src/compiler/nir/nir.h +++ b/src/compiler/nir/nir.h @@ -5356,7 +5356,8 @@ typedef struct nir_lower_subgroups_options { uint8_t ballot_components; bool lower_to_scalar : 1; bool lower_vote_trivial : 1; - bool lower_vote_eq : 1; + bool lower_vote_feq : 1; + bool lower_vote_ieq : 1; bool lower_vote_bool_eq : 1; bool lower_first_invocation_to_ballot : 1; bool lower_read_first_invocation : 1; diff --git a/src/compiler/nir/nir_lower_subgroups.c b/src/compiler/nir/nir_lower_subgroups.c index 73e7cbdd2e2..6bfceee1909 100644 --- a/src/compiler/nir/nir_lower_subgroups.c +++ b/src/compiler/nir/nir_lower_subgroups.c @@ -1035,7 +1035,11 @@ lower_subgroups_instr(nir_builder *b, nir_instr *instr, void *_options) if (options->lower_vote_bool_eq) return lower_vote_eq(b, intrin); } else { - if (options->lower_vote_eq) + if (intrin->intrinsic == nir_intrinsic_vote_feq && + options->lower_vote_feq) + return lower_vote_eq(b, intrin); + if (intrin->intrinsic == nir_intrinsic_vote_ieq && + options->lower_vote_ieq) return lower_vote_eq(b, intrin); } diff --git a/src/freedreno/ir3/ir3_nir.c b/src/freedreno/ir3/ir3_nir.c index 0b1d8b51d21..b93a362a3bf 100644 --- a/src/freedreno/ir3/ir3_nir.c +++ b/src/freedreno/ir3/ir3_nir.c @@ -888,7 +888,8 @@ ir3_nir_post_finalize(struct ir3_shader *shader) .ballot_bit_size = 32, .ballot_components = max_subgroup_size / 32, .lower_to_scalar = true, - .lower_vote_eq = true, + .lower_vote_feq = true, + .lower_vote_ieq = true, .lower_vote_bool_eq = true, .lower_subgroup_masks = true, .lower_read_invocation_to_cond = true, diff --git a/src/gallium/drivers/radeonsi/si_shader.c b/src/gallium/drivers/radeonsi/si_shader.c index f7dff13181a..d048183d61b 100644 --- a/src/gallium/drivers/radeonsi/si_shader.c +++ b/src/gallium/drivers/radeonsi/si_shader.c @@ -1646,7 +1646,8 @@ static void run_late_optimization_and_lowering_passes(struct si_nir_shader_ctx * .lower_relative_shuffle = true, .lower_rotate_to_shuffle = !nir->info.use_aco_amd, .lower_shuffle_to_32bit = true, - .lower_vote_eq = true, + .lower_vote_feq = true, + .lower_vote_ieq = true, .lower_vote_bool_eq = true, .lower_quad_broadcast_dynamic = true, .lower_quad_broadcast_dynamic_to_const = sel->screen->info.gfx_level <= GFX7, diff --git a/src/nouveau/compiler/nak_nir.c b/src/nouveau/compiler/nak_nir.c index 31a21167843..63020addf92 100644 --- a/src/nouveau/compiler/nak_nir.c +++ b/src/nouveau/compiler/nak_nir.c @@ -948,7 +948,8 @@ nak_postprocess_nir(nir_shader *nir, .ballot_bit_size = 32, .ballot_components = 1, .lower_to_scalar = true, - .lower_vote_eq = true, + .lower_vote_feq = true, + .lower_vote_ieq = true, .lower_first_invocation_to_ballot = true, .lower_read_first_invocation = true, .lower_elect = true, diff --git a/src/panfrost/compiler/bifrost_compile.c b/src/panfrost/compiler/bifrost_compile.c index babaf5c3f14..d892632e069 100644 --- a/src/panfrost/compiler/bifrost_compile.c +++ b/src/panfrost/compiler/bifrost_compile.c @@ -5929,7 +5929,8 @@ bifrost_preprocess_nir(nir_shader *nir, unsigned gpu_id) .ballot_bit_size = 32, .ballot_components = 1, .lower_to_scalar = true, - .lower_vote_eq = true, + .lower_vote_feq = true, + .lower_vote_ieq = true, .lower_vote_bool_eq = true, .lower_first_invocation_to_ballot = true, .lower_read_first_invocation = true,