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: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4562>
This commit is contained in:
Kristian H. Kristensen 2020-04-28 14:29:55 -07:00 committed by Marge Bot
parent dd8d257a30
commit 73f34e0d46

View file

@ -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,