From b22fff90d521112b5c8b029bc406852cee4002d8 Mon Sep 17 00:00:00 2001 From: Ian Romanick Date: Thu, 11 Jan 2024 14:15:39 -0800 Subject: [PATCH] intel/fs: Enable nir_opt_uniform_atomics in all shader stages The problem seems to have been related to nir_intrinsic_load_global_block_intel being marked as non-divergent. No shader-db or fossil-db changes on any Intel platform. v2: Rebase on splitting ELK from BRW. Remove devinfo->ver >= 8 check. Reviewed-by: Lionel Landwerlin Part-of: --- src/intel/compiler/brw_nir.c | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/src/intel/compiler/brw_nir.c b/src/intel/compiler/brw_nir.c index 122c862b9c1..729c9b5f2cc 100644 --- a/src/intel/compiler/brw_nir.c +++ b/src/intel/compiler/brw_nir.c @@ -1699,19 +1699,7 @@ brw_postprocess_nir(nir_shader *nir, const struct brw_compiler *compiler, NIR_PASS(_, nir, nir_convert_to_lcssa, true, true); NIR_PASS_V(nir, nir_divergence_analysis); - /* TODO: Enable nir_opt_uniform_atomics on Gfx7.x too. - * It currently fails Vulkan tests on Haswell for an unknown reason. - * - * TODO: Using this optimization on RT/OpenCL kernels also seems to cause - * issues. Until we can understand those issues, disable it. - */ - bool opt_uniform_atomic_stage_allowed = - devinfo->ver >= 8 && - nir->info.stage != MESA_SHADER_KERNEL && - nir->info.stage != MESA_SHADER_RAYGEN && - !gl_shader_stage_is_callable(nir->info.stage); - - if (opt_uniform_atomic_stage_allowed && OPT(nir_opt_uniform_atomics)) { + if (OPT(nir_opt_uniform_atomics)) { const nir_lower_subgroups_options subgroups_options = { .ballot_bit_size = 32, .ballot_components = 1,