diff options
author | Timothy Arceri <[email protected]> | 2018-11-10 09:20:10 +1100 |
---|---|---|
committer | Timothy Arceri <[email protected]> | 2018-11-10 11:41:00 +1100 |
commit | 590fcb50e745a2d8a62dafa157f06d2bb7c590dc (patch) | |
tree | 40905cc6654237e25baa30ce434c336e1e5d0a3f /src | |
parent | d40dd05553e548b648c77394424b59cc0abca199 (diff) |
st/mesa: make use of nir_link_constant_varyings()
Shader-db results radeonsi (VEGA):
Totals from affected shaders:
SGPRS: 161464 -> 161368 (-0.06 %)
VGPRS: 86904 -> 86292 (-0.70 %)
Spilled SGPRs: 296 -> 314 (6.08 %)
Spilled VGPRs: 0 -> 0 (0.00 %)
Private memory VGPRs: 0 -> 0 (0.00 %)
Scratch size: 0 -> 0 (0.00 %) dwords per thread
Code Size: 3618596 -> 3573852 (-1.24 %) bytes
LDS: 0 -> 0 (0.00 %) blocks
Max Waves: 26189 -> 26276 (0.33 %)
Wait states: 0 -> 0 (0.00 %)
Reviewed-by: Eric Anholt <[email protected]>
Diffstat (limited to 'src')
-rw-r--r-- | src/mesa/state_tracker/st_glsl_to_nir.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/mesa/state_tracker/st_glsl_to_nir.cpp b/src/mesa/state_tracker/st_glsl_to_nir.cpp index dcf8c2b638e..d0475fb538a 100644 --- a/src/mesa/state_tracker/st_glsl_to_nir.cpp +++ b/src/mesa/state_tracker/st_glsl_to_nir.cpp @@ -588,6 +588,9 @@ st_nir_link_shaders(nir_shader **producer, nir_shader **consumer, bool scalar) { nir_lower_io_arrays_to_elements(*producer, *consumer); + if (nir_link_constant_varyings(*producer, *consumer)) + st_nir_opts(*consumer, scalar); + NIR_PASS_V(*producer, nir_remove_dead_variables, nir_var_shader_out); NIR_PASS_V(*consumer, nir_remove_dead_variables, nir_var_shader_in); |