mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-20 20:20:18 +01:00
Revert "nir: add nir_clear_divergence_info, use it in nir_opt_varyings"
This reverts commit 9d043e138d.
It is no longer needed. nir_convert_from_ssa() is now capable to
ignore divergence information.
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33009>
This commit is contained in:
parent
f3be7ce01b
commit
1feb733cd4
3 changed files with 0 additions and 30 deletions
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue