mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-06 02:58:05 +02:00
pan/bi: Use nir_opt_sink/move for constants
Fixes excessive (and failing) spilling in dEQP-GLES31.functional.ssbo.layout.* shader-db results are a toss up (I suspect we'd see better results if we tracked register pressure directly): total instructions in shared programs: 161377 -> 161377 (0.00%) total nops in shared programs: 121159 -> 121203 (0.04%) nops in affected programs: 1839 -> 1883 (2.39%) Nops are HURT. total clauses in shared programs: 31604 -> 31606 (<.01%) clauses in affected programs: 38 -> 40 (5.26%) Inconclusive result (value mean confidence interval includes 0). total quadwords in shared programs: 130847 -> 130845 (<.01%) quadwords in affected programs: 1246 -> 1244 (-0.16%) Inconclusive result (value mean confidence interval includes 0). total loops in shared programs: 18 -> 18 (0.00%) total spills in shared programs: 705 -> 705 (0.00%) total fills in shared programs: 1645 -> 1645 (0.00%) Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9164>
This commit is contained in:
parent
5eff64e3a3
commit
3a4d985997
1 changed files with 6 additions and 0 deletions
|
|
@ -2817,6 +2817,12 @@ bi_optimize_nir(nir_shader *nir)
|
|||
NIR_PASS(progress, nir, nir_lower_bool_to_int32);
|
||||
NIR_PASS(progress, nir, bifrost_nir_lower_algebraic_late);
|
||||
NIR_PASS(progress, nir, nir_lower_alu_to_scalar, NULL, NULL);
|
||||
|
||||
/* Backend scheduler is purely local, so do some global optimizations
|
||||
* to reduce register pressure */
|
||||
NIR_PASS_V(nir, nir_opt_sink, nir_move_const_undef);
|
||||
NIR_PASS_V(nir, nir_opt_move, nir_move_const_undef);
|
||||
|
||||
NIR_PASS(progress, nir, nir_lower_load_const_to_scalar);
|
||||
|
||||
/* Take us out of SSA */
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue