summaryrefslogtreecommitdiffstats
path: root/src/amd/vulkan
diff options
context:
space:
mode:
authorTimothy Arceri <[email protected]>2018-11-07 15:20:41 +1100
committerTimothy Arceri <[email protected]>2018-11-14 09:41:50 +1100
commit95b513c937346f179cbddc8ac6e512a634aeab9e (patch)
tree41da94338c490ed6338acf1af4a3344c44002a6c /src/amd/vulkan
parentea53f76d7b96cb32bde493a7c7548bf9c8c794f3 (diff)
radv: make use of nir_move_out_const_to_consumer()
vkpipeline-db results: Totals from affected shaders: SGPRS: 28400 -> 28576 (0.62 %) VGPRS: 27916 -> 27692 (-0.80 %) Spilled SGPRs: 140 -> 138 (-1.43 %) Spilled VGPRs: 0 -> 0 (0.00 %) Private memory VGPRs: 0 -> 0 (0.00 %) Scratch size: 0 -> 0 (0.00 %) dwords per thread Code Size: 1534456 -> 1520560 (-0.91 %) bytes LDS: 0 -> 0 (0.00 %) blocks Max Waves: 3541 -> 3582 (1.16 %) Wait states: 0 -> 0 (0.00 %) Reviewed-by: Samuel Pitoiset <[email protected]>
Diffstat (limited to 'src/amd/vulkan')
-rw-r--r--src/amd/vulkan/radv_pipeline.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/amd/vulkan/radv_pipeline.c b/src/amd/vulkan/radv_pipeline.c
index a126c036073..33076cc2bd2 100644
--- a/src/amd/vulkan/radv_pipeline.c
+++ b/src/amd/vulkan/radv_pipeline.c
@@ -1814,6 +1814,10 @@ radv_link_shaders(struct radv_pipeline *pipeline, nir_shader **shaders)
nir_lower_io_arrays_to_elements(ordered_shaders[i],
ordered_shaders[i - 1]);
+ if (nir_link_constant_varyings(ordered_shaders[i],
+ ordered_shaders[i - 1]))
+ radv_optimize_nir(ordered_shaders[i - 1], false, false);
+
nir_remove_dead_variables(ordered_shaders[i],
nir_var_shader_out);
nir_remove_dead_variables(ordered_shaders[i - 1],