Mesa (master): radv: use nir_split_array_vars()

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Thu Oct 18 04:12:14 UTC 2018


Module: Mesa
Branch: master
Commit: 8086fa1bcde4876714c2ad3cb429f90a046c2bbe
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=8086fa1bcde4876714c2ad3cb429f90a046c2bbe

Author: Timothy Arceri <tarceri at itsqueeze.com>
Date:   Thu Oct 18 10:19:16 2018 +1100

radv: use nir_split_array_vars()

We call in the opt loop in case another pass results in an
array with indirect access being turned into direct access.

Totals from affected shaders:
SGPRS: 512 -> 496 (-3.12 %)
VGPRS: 456 -> 452 (-0.88 %)
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: 40040 -> 39664 (-0.94 %) bytes
LDS: 0 -> 0 (0.00 %) blocks
Max Waves: 41 -> 43 (4.88 %)
Wait states: 0 -> 0 (0.00 %)

All affected shaders are from Batman Arkham City.

Reviewed-by: Bas Nieuwenhuizen <bas at basnieuwenhuizen.nl>

---

 src/amd/vulkan/radv_shader.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/amd/vulkan/radv_shader.c b/src/amd/vulkan/radv_shader.c
index 52aa83d4a5..13858b6130 100644
--- a/src/amd/vulkan/radv_shader.c
+++ b/src/amd/vulkan/radv_shader.c
@@ -126,6 +126,8 @@ radv_optimize_nir(struct nir_shader *shader, bool optimize_conservatively,
         do {
                 progress = false;
 
+		NIR_PASS(progress, shader, nir_split_array_vars, nir_var_local);
+
                 NIR_PASS_V(shader, nir_lower_vars_to_ssa);
 		NIR_PASS_V(shader, nir_lower_pack);
 




More information about the mesa-commit mailing list