From 26eb077ec486d0daf5a72d20bb5c03509592dce4 Mon Sep 17 00:00:00 2001 From: Jason Ekstrand Date: Tue, 24 Jul 2018 10:08:06 -0700 Subject: nir: Add a structure splitting pass This pass doesn't really do much now because nir_lower_vars_to_ssa can already see through structures and considers them to be "split". This pass exists to help other passes more easily see through structure variables. If a back-end does implement arrays using scratch or indirects on registers, having more smaller arrays is likely to have better memory efficiency. Reviewed-by: Caio Marcelo de Oliveira Filho --- src/compiler/nir/nir.h | 1 + 1 file changed, 1 insertion(+) (limited to 'src/compiler/nir/nir.h') diff --git a/src/compiler/nir/nir.h b/src/compiler/nir/nir.h index d0fa693884b..62baa33633f 100644 --- a/src/compiler/nir/nir.h +++ b/src/compiler/nir/nir.h @@ -2661,6 +2661,7 @@ int nir_gs_count_vertices(const nir_shader *shader); bool nir_split_var_copies(nir_shader *shader); bool nir_split_per_member_structs(nir_shader *shader); +bool nir_split_struct_vars(nir_shader *shader, nir_variable_mode modes); bool nir_lower_returns_impl(nir_function_impl *impl); bool nir_lower_returns(nir_shader *shader); -- cgit v1.2.3