freedreno/ir3: Drop hack to clean up split vars
authorKristian H. Kristensen <hoegsberg@google.com>
Tue, 28 Apr 2020 21:29:55 +0000 (14:29 -0700)
committerMarge Bot <eric+marge@anholt.net>
Fri, 1 May 2020 16:26:31 +0000 (16:26 +0000)
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>

src/freedreno/ir3/ir3_nir_lower_tess.c

index 9c398f82d2c43ce284da742ff9194d92b7105c3a..7a30ef09d9760114228d7fe438c78325523eaf12 100644 (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,