summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorTimothy Arceri <[email protected]>2018-11-07 14:29:18 +1100
committerTimothy Arceri <[email protected]>2018-11-13 14:06:32 +1100
commit3561108de089f383bb7733eaf49e3d517994b51c (patch)
tree21b2322fbb06dff0b9b5f7f99cd5d668509d8270 /src
parent621b0fa8922ade0a8122b868177308e65e6d3595 (diff)
anv/i965: make use of nir_link_constant_varyings()
shader-db results for SLK: total instructions in shared programs: 13106498 -> 13091573 (-0.11%) instructions in affected programs: 1186244 -> 1171319 (-1.26%) helped: 6186 HURT: 0 total cycles in shared programs: 332062633 -> 331961653 (-0.03%) cycles in affected programs: 8537165 -> 8436185 (-1.18%) helped: 5371 HURT: 862 LOST: 6 GAINED: 14 Reviewed-by: Jason Ekstrand <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/intel/compiler/brw_nir.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/intel/compiler/brw_nir.c b/src/intel/compiler/brw_nir.c
index 26a5ea04605..80fa5a1a81f 100644
--- a/src/intel/compiler/brw_nir.c
+++ b/src/intel/compiler/brw_nir.c
@@ -740,6 +740,9 @@ brw_nir_link_shaders(const struct brw_compiler *compiler,
*consumer = brw_nir_optimize(*consumer, compiler, c_is_scalar, false);
}
+ if (nir_link_constant_varyings(*producer, *consumer))
+ *consumer = brw_nir_optimize(*consumer, compiler, c_is_scalar, false);
+
NIR_PASS_V(*producer, nir_remove_dead_variables, nir_var_shader_out);
NIR_PASS_V(*consumer, nir_remove_dead_variables, nir_var_shader_in);