mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-29 05:50:11 +01:00
intel/nir: Split IO arrays into elements
The NIR nir_lower_io_arrays_to_elements pass attempts to split I/O
variables which are arrays or matrices into a sequence of separate
variables. This can help link-time optimization by allowing us to
remove varyings at a more granular level.
Shader-db results on Kaby Lake:
total instructions in shared programs: 15177645 -> 15168494 (-0.06%)
instructions in affected programs: 79857 -> 70706 (-11.46%)
helped: 392
HURT: 0
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
This commit is contained in:
parent
57804efa88
commit
b0bb547f78
1 changed files with 4 additions and 0 deletions
|
|
@ -709,6 +709,10 @@ void
|
|||
brw_nir_link_shaders(const struct brw_compiler *compiler,
|
||||
nir_shader **producer, nir_shader **consumer)
|
||||
{
|
||||
nir_lower_io_arrays_to_elements(*producer, *consumer);
|
||||
nir_validate_shader(*producer);
|
||||
nir_validate_shader(*consumer);
|
||||
|
||||
NIR_PASS_V(*producer, nir_remove_dead_variables, nir_var_shader_out);
|
||||
NIR_PASS_V(*consumer, nir_remove_dead_variables, nir_var_shader_in);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue