From cc7be2b2b33e8cd6b70d2dc675067533bf51da16 Mon Sep 17 00:00:00 2001 From: Connor Abbott Date: Fri, 17 May 2024 11:06:10 -0400 Subject: [PATCH] ir3: Use nir_split_struct_vars for temporaries This should let us lower the RT query stack to registers instead of scratch by getting rid of the rest of the members of the ray query struct. This gives a 24% decrease in total time for 3DMark InVitro. Part-of: --- src/freedreno/ir3/ir3_nir.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/freedreno/ir3/ir3_nir.c b/src/freedreno/ir3/ir3_nir.c index d0991fca1ad..49dd25d3164 100644 --- a/src/freedreno/ir3/ir3_nir.c +++ b/src/freedreno/ir3/ir3_nir.c @@ -328,6 +328,7 @@ ir3_optimize_loop(struct ir3_compiler *compiler, progress |= OPT(s, nir_opt_find_array_copies); progress |= OPT(s, nir_opt_copy_prop_vars); progress |= OPT(s, nir_opt_dead_write_vars); + progress |= OPT(s, nir_split_struct_vars, nir_var_function_temp); static int gcm = -1; if (gcm == -1)