Commit 78f391d3 authored by Timothy Arceri's avatar Timothy Arceri

radeonsi/nir: make use of nir_lower_load_const_to_scalar()

This allows NIR to CSE more operations. LLVM does this also so the
impact is limited, however doing this in NIR allows other opts to
make progress. For example some loops in Civilization Beyond Earth
shaders are unrolled.
Reviewed-by: 's avatarMarek Olšák <marek.olsak@amd.com>
parent 25712807
......@@ -802,6 +802,8 @@ si_lower_nir(struct si_shader_selector* sel)
ac_lower_indirect_derefs(sel->nir, sel->screen->info.chip_class);
NIR_PASS_V(sel->nir, nir_lower_load_const_to_scalar);
bool progress;
do {
progress = false;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment