nir: Add a pass for lowering IO back to vector when possible

This pass tries to turn scalar and array-of-scalar IO variables into
vector IO variables whenever possible.

Reviewed-by: Connor Abbott <cwabbott0@gmail.com>
Cc: "19.0" <mesa-stable@lists.freedesktop.org>
This commit is contained in:
Jason Ekstrand
2019-03-06 15:21:51 -06:00
committed by Jason Ekstrand
parent 0f025bbccc
commit 5ef2b8f1f2
5 changed files with 392 additions and 1 deletions

View File

@@ -3061,6 +3061,7 @@ void nir_lower_io_arrays_to_elements_no_indirects(nir_shader *shader,
bool outputs_only);
void nir_lower_io_to_scalar(nir_shader *shader, nir_variable_mode mask);
void nir_lower_io_to_scalar_early(nir_shader *shader, nir_variable_mode mask);
bool nir_lower_io_to_vector(nir_shader *shader, nir_variable_mode mask);
bool nir_lower_uniforms_to_ubo(nir_shader *shader, int multiplier);