Skip to content
Snippets Groups Projects
Commit 2437556d authored by Lionel Landwerlin's avatar Lionel Landwerlin Committed by Marge Bot
Browse files

intel/fs: rerun divergence prior to lowering non-uniform interpolate at sample


Signed-off-by: default avatarLionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: 74a40cc4 ("intel/fs: move lower of non-uniform at_sample barycentric to NIR")
Reviewed-by: Kenneth Graunke's avatarKenneth Graunke <kenneth@whitecape.org>
Part-of: <mesa/mesa!26797>
parent 8f5a7f57
No related branches found
No related tags found
No related merge requests found
......@@ -1686,6 +1686,7 @@ brw_postprocess_nir(nir_shader *nir, const struct brw_compiler *compiler,
OPT(nir_opt_move, nir_move_comparisons);
OPT(nir_opt_dead_cf);
bool divergence_analysis_dirty = false;
NIR_PASS(_, nir, nir_convert_to_lcssa, true, true);
NIR_PASS_V(nir, nir_divergence_analysis);
......@@ -1711,11 +1712,19 @@ brw_postprocess_nir(nir_shader *nir, const struct brw_compiler *compiler,
if (OPT(nir_lower_int64))
brw_nir_optimize(nir, is_scalar, devinfo);
divergence_analysis_dirty = true;
}
/* Do this only after the last opt_gcm. GCM will undo this lowering. */
if (nir->info.stage == MESA_SHADER_FRAGMENT)
if (nir->info.stage == MESA_SHADER_FRAGMENT) {
if (divergence_analysis_dirty) {
NIR_PASS(_, nir, nir_convert_to_lcssa, true, true);
NIR_PASS_V(nir, nir_divergence_analysis);
}
OPT(brw_nir_lower_non_uniform_barycentric_at_sample);
}
/* Clean up LCSSA phis */
OPT(nir_opt_remove_phis);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment