aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
authorJason Ekstrand <[email protected]>2017-09-28 09:58:38 -0700
committerJordan Justen <[email protected]>2017-09-28 16:20:35 -0700
commit006533d5ef0914ae7be258dc5b7d47ba5339ca20 (patch)
tree1dd5d018301f1f06b937a9af790b0d778da0cc07 /src/mesa
parent69ed3244d4d9898e5353d34be6a160db409b6dc8 (diff)
i965/link: Make more use of NIR_PASS
[[email protected]: Tested NIR_TEST_CLONE=1 with valgrind] Tested-by: Jordan Justen <[email protected]> Reviewed-by: Jordan Justen <[email protected]>
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/drivers/dri/i965/brw_link.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_link.cpp b/src/mesa/drivers/dri/i965/brw_link.cpp
index 80868569ed7..dd6f895db07 100644
--- a/src/mesa/drivers/dri/i965/brw_link.cpp
+++ b/src/mesa/drivers/dri/i965/brw_link.cpp
@@ -278,12 +278,12 @@ brw_link_shader(struct gl_context *ctx, struct gl_shader_program *shProg)
nir_shader *producer = shProg->_LinkedShaders[i]->Program->nir;
nir_shader *consumer = shProg->_LinkedShaders[next]->Program->nir;
- nir_remove_dead_variables(producer, nir_var_shader_out);
- nir_remove_dead_variables(consumer, nir_var_shader_in);
+ NIR_PASS_V(producer, nir_remove_dead_variables, nir_var_shader_out);
+ NIR_PASS_V(consumer, nir_remove_dead_variables, nir_var_shader_in);
if (nir_remove_unused_varyings(producer, consumer)) {
- nir_lower_global_vars_to_local(producer);
- nir_lower_global_vars_to_local(consumer);
+ NIR_PASS_V(producer, nir_lower_global_vars_to_local);
+ NIR_PASS_V(consumer, nir_lower_global_vars_to_local);
nir_variable_mode indirect_mask = (nir_variable_mode) 0;
if (compiler->glsl_compiler_options[i].EmitNoIndirectTemp)
@@ -293,8 +293,8 @@ brw_link_shader(struct gl_context *ctx, struct gl_shader_program *shProg)
* temporaries so we need to lower indirects on any of the
* varyings we have demoted here.
*/
- nir_lower_indirect_derefs(producer, indirect_mask);
- nir_lower_indirect_derefs(consumer, indirect_mask);
+ NIR_PASS_V(producer, nir_lower_indirect_derefs, indirect_mask);
+ NIR_PASS_V(consumer, nir_lower_indirect_derefs, indirect_mask);
const bool p_is_scalar = compiler->scalar_stage[producer->stage];
producer = brw_nir_optimize(producer, compiler, p_is_scalar);