diff --git a/src/compiler/nir/nir.h b/src/compiler/nir/nir.h index b7f45070360..9fbe86d0b93 100644 --- a/src/compiler/nir/nir.h +++ b/src/compiler/nir/nir.h @@ -6771,7 +6771,6 @@ void nir_divergence_analysis_impl(nir_function_impl *impl, nir_divergence_option void nir_divergence_analysis(nir_shader *shader); void nir_vertex_divergence_analysis(nir_shader *shader); bool nir_has_divergent_loop(nir_shader *shader); -void nir_clear_divergence_info(nir_shader *nir); void nir_rewrite_uses_to_load_reg(struct nir_builder *b, nir_def *old, diff --git a/src/compiler/nir/nir_divergence_analysis.c b/src/compiler/nir/nir_divergence_analysis.c index 9727d46fa29..2d9853148fa 100644 --- a/src/compiler/nir/nir_divergence_analysis.c +++ b/src/compiler/nir/nir_divergence_analysis.c @@ -1487,23 +1487,3 @@ nir_has_divergent_loop(nir_shader *shader) return false; } - -/* Recommended when computing divergence information in shared code such - * as the GLSL linker. - */ -void -nir_clear_divergence_info(nir_shader *nir) -{ - nir_foreach_function_impl(impl, nir) { - nir_foreach_block(block, impl) { - /* true is the safer value. */ - block->divergent = true; - - nir_foreach_instr(instr, block) { - nir_def *def = nir_instr_def(instr); - if (def) - def->divergent = true; - } - } - } -} diff --git a/src/compiler/nir/nir_opt_varyings.c b/src/compiler/nir/nir_opt_varyings.c index 6eb3b273736..966ac0f19e3 100644 --- a/src/compiler/nir/nir_opt_varyings.c +++ b/src/compiler/nir/nir_opt_varyings.c @@ -5306,14 +5306,5 @@ nir_opt_varyings(nir_shader *producer, nir_shader *consumer, bool spirv, if (progress & nir_progress_consumer) nir_validate_shader(consumer, "nir_opt_varyings"); - if (consumer->info.stage == MESA_SHADER_FRAGMENT) { - /* We have called nir_vertex_divergence_analysis on the producer here. - * We need to reset the divergent field to true, otherwise it will be - * garbage after some other passes are run, and then we end up failing - * assertions in some passes because src is divergent and dst isn't. - */ - nir_clear_divergence_info(producer); - } - return progress; }