Commit 2f80a54f authored by Timothy Arceri's avatar Timothy Arceri

nir: allow nir_intrinsic_load_ubo in opt_peephole_select

This makes this opt behave more like the GLSL IR opt
lower_if_to_cond_assign(). With this we can disable that GLSL IR
opt on drivers with a NIR backend without causing spill
regressions.

shader-db results for radeonsi (RX580):

Totals from affected shaders:
SGPRS: 12200 -> 13072 (7.15 %)
VGPRS: 13496 -> 11840 (-12.27 %)
Spilled SGPRs: 285 -> 290 (1.75 %)
Spilled VGPRs: 115 -> 0 (-100.00 %)
Private memory VGPRs: 0 -> 0 (0.00 %)
Scratch size: 116 -> 0 (-100.00 %) dwords per thread
Code Size: 781304 -> 770168 (-1.43 %) bytes
LDS: 0 -> 0 (0.00 %) blocks
Max Waves: 1558 -> 1586 (1.80 %)
Wait states: 0 -> 0 (0.00 %)

Cc: Eric Anholt <eric@anholt.net>
parent 3ea31f7a
......@@ -77,6 +77,7 @@ block_check_for_allowed_instrs(nir_block *block, unsigned *count, bool alu_ok)
}
break;
case nir_intrinsic_load_ubo:
case nir_intrinsic_load_uniform:
if (!alu_ok)
return 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