Commit 3ea31f7a authored by Timothy Arceri's avatar Timothy Arceri

radv: call nir_opt_algebraic_before_ffma()

My vkpipeline-db database only has 3 games currently so maybe
someone else should give this a run for better stats.

Totals from affected shaders:
SGPRS: 8976 -> 7880 (-12.21 %)
VGPRS: 7756 -> 7748 (-0.10 %)
Spilled SGPRs: 0 -> 0 (0.00 %)
Spilled VGPRs: 0 -> 0 (0.00 %)
Private memory VGPRs: 0 -> 0 (0.00 %)
Scratch size: 0 -> 0 (0.00 %) dwords per thread
Code Size: 696460 -> 696620 (0.02 %) bytes
LDS: 0 -> 0 (0.00 %) blocks
Max Waves: 378 -> 380 (0.53 %)
Wait states: 0 -> 0 (0.00 %)
parent a610ba21
......@@ -317,6 +317,17 @@ radv_shader_compile_to_nir(struct radv_device *device,
if (!(flags & VK_PIPELINE_CREATE_DISABLE_OPTIMIZATION_BIT))
radv_optimize_nir(nir, false);
/* This unfortunately named pass contains optimisations that conflict
* with the regular nir_opt_algebraic() pass and therefore should be
* called after radv_optimize_nir() but before calling it for the
* final time.
*/
bool progress;
do {
progress = false;
NIR_PASS(progress, nir, nir_opt_algebraic_before_ffma);
} while (progress);
/* Indirect lowering must be called after the radv_optimize_nir() loop
* has been called at least once. Otherwise indirect lowering can
* bloat the instruction count of the loop and cause it to be
......
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