Commit c8eea804 authored by Timothy Arceri's avatar Timothy Arceri

radv: 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.

I didn't have a large vkpipeline-db to run this against but for
radeonsi enabling this allowed some loops in Civilization Beyond
Earth shaders to unroll.
parent 2f80a54f
......@@ -314,6 +314,8 @@ radv_shader_compile_to_nir(struct radv_device *device,
.lower_vote_eq_to_ballot = 1,
NIR_PASS_V(nir, nir_lower_load_const_to_scalar);
radv_optimize_nir(nir, 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