diff --git a/src/compiler/nir/nir_opt_uniform_atomics.c b/src/compiler/nir/nir_opt_uniform_atomics.c index 6fb583d67c7..e06f5e7d553 100644 --- a/src/compiler/nir/nir_opt_uniform_atomics.c +++ b/src/compiler/nir/nir_opt_uniform_atomics.c @@ -331,7 +331,7 @@ nir_opt_uniform_atomics(nir_shader *shader, bool fs_atomics_predicated) return false; nir_foreach_function_impl(impl, shader) { - nir_metadata_require(impl, nir_metadata_block_index); + nir_metadata_require(impl, nir_metadata_block_index | nir_metadata_divergence); if (opt_uniform_atomics(impl, fs_atomics_predicated)) { progress = true; diff --git a/src/compiler/nir/nir_opt_uniform_subgroup.c b/src/compiler/nir/nir_opt_uniform_subgroup.c index 2cba59c5972..e53e59e1ab6 100644 --- a/src/compiler/nir/nir_opt_uniform_subgroup.c +++ b/src/compiler/nir/nir_opt_uniform_subgroup.c @@ -151,6 +151,8 @@ bool nir_opt_uniform_subgroup(nir_shader *shader, const nir_lower_subgroups_options *options) { + nir_divergence_analysis(shader); + bool progress = nir_shader_lower_instructions(shader, opt_uniform_subgroup_filter, opt_uniform_subgroup_instr,