From 73f34e0d4677aaa705e49ba5bcf498d5e6d673d8 Mon Sep 17 00:00:00 2001 From: "Kristian H. Kristensen" Date: Tue, 28 Apr 2020 14:29:55 -0700 Subject: [PATCH] freedreno/ir3: Drop hack to clean up split vars When the GS lowering was working on store_output intrinsics, we had to clean up the split vars to avoid getting confused. Now that we shadow the output vars instead, there's no confusion and we can drop this hack. Part-of: --- src/freedreno/ir3/ir3_nir_lower_tess.c | 24 ------------------------ 1 file changed, 24 deletions(-) diff --git a/src/freedreno/ir3/ir3_nir_lower_tess.c b/src/freedreno/ir3/ir3_nir_lower_tess.c index 9c398f82d2c..7a30ef09d97 100644 --- a/src/freedreno/ir3/ir3_nir_lower_tess.c +++ b/src/freedreno/ir3/ir3_nir_lower_tess.c @@ -830,27 +830,6 @@ lower_gs_block(nir_block *block, nir_builder *b, struct state *state) } } -static void -clean_up_split_vars(nir_shader *shader, struct exec_list *list) -{ - uint32_t components[32] = {}; - - nir_foreach_variable (var, list) { - uint32_t mask = - ((1 << glsl_get_components(glsl_without_array(var->type))) - 1) << var->data.location_frac; - components[var->data.driver_location] |= mask; - } - - nir_foreach_variable_safe (var, list) { - uint32_t mask = - ((1 << glsl_get_components(glsl_without_array(var->type))) - 1) << var->data.location_frac; - bool subset = - (components[var->data.driver_location] | mask) != mask; - if (subset) - exec_node_remove(&var->node); - } -} - void ir3_nir_lower_gs(nir_shader *shader) { @@ -861,9 +840,6 @@ ir3_nir_lower_gs(nir_shader *shader) nir_print_shader(shader, stderr); } - clean_up_split_vars(shader, &shader->inputs); - clean_up_split_vars(shader, &shader->outputs); - build_primitive_map(shader, &state.map, &shader->inputs); /* Create an output var for vertex_flags. This will be shadowed below, -- 2.30.2