From 4d7e064623ea4db1e5e18e18b0bb958462054ed3 Mon Sep 17 00:00:00 2001 From: Jason Ekstrand Date: Tue, 21 Jul 2020 11:31:00 -0500 Subject: [PATCH] nir/split_per_member_structs: Use nir_variable_with_modes_safe Reviewed-by: Dave Airlie Part-of: --- src/compiler/nir/nir_split_per_member_structs.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/compiler/nir/nir_split_per_member_structs.c b/src/compiler/nir/nir_split_per_member_structs.c index 478d5fe72c3..16cf1f23483 100644 --- a/src/compiler/nir/nir_split_per_member_structs.c +++ b/src/compiler/nir/nir_split_per_member_structs.c @@ -104,12 +104,12 @@ split_variable(struct nir_variable *var, nir_shader *shader, } static bool -split_variables_in_list(struct exec_list *var_list, nir_shader *shader, +split_variables_in_list(nir_shader *shader, nir_variable_mode mode, struct hash_table *var_to_member_map, void *dead_ctx) { bool progress = false; - nir_foreach_variable_safe(var, var_list) { + nir_foreach_variable_with_modes_safe(var, shader, mode) { if (var->num_members == 0) continue; @@ -177,11 +177,11 @@ nir_split_per_member_structs(nir_shader *shader) struct hash_table *var_to_member_map = _mesa_pointer_hash_table_create(dead_ctx); - progress |= split_variables_in_list(&shader->inputs, shader, + progress |= split_variables_in_list(shader, nir_var_shader_in, var_to_member_map, dead_ctx); - progress |= split_variables_in_list(&shader->outputs, shader, + progress |= split_variables_in_list(shader, nir_var_shader_out, var_to_member_map, dead_ctx); - progress |= split_variables_in_list(&shader->system_values, shader, + progress |= split_variables_in_list(shader, nir_var_system_value, var_to_member_map, dead_ctx); if (!progress) { ralloc_free(dead_ctx); -- 2.30.2