i915: Use nir_group_loads() to reduce texture indirection phases.

total instructions in shared programs: 467049 -> 467040 (<.01%)
instructions in affected programs: 573 -> 564 (-1.57%)

total tex_indirect in shared programs: 14133 -> 14019 (-0.81%)
tex_indirect in affected programs: 491 -> 377 (-23.22%)

total temps in shared programs: 28543 -> 29178 (2.22%)
temps in affected programs: 3307 -> 3942 (19.20%)

LOST:   0
GAINED: 65
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25533>
This commit is contained in:
Emma Anholt
2023-10-03 12:56:28 -07:00
committed by Marge Bot
parent af823b5d58
commit e9e6a67600

View File

@@ -222,6 +222,11 @@ i915_optimize_nir(struct nir_shader *s)
NIR_PASS(progress, s, nir_remove_dead_variables, nir_var_function_temp, NIR_PASS(progress, s, nir_remove_dead_variables, nir_var_function_temp,
NULL); NULL);
/* Group texture loads together to try to avoid hitting the
* texture indirection phase limit.
*/
NIR_PASS_V(s, nir_group_loads, nir_group_all, ~0);
} }
static char * static char *