mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 09:38:07 +02:00
pco: support shader i/o arrays of structs
Signed-off-by: Simon Perretta <simon.perretta@imgtec.com> Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36412>
This commit is contained in:
parent
d038d9181c
commit
195cb4bfce
1 changed files with 5 additions and 0 deletions
|
|
@ -701,10 +701,15 @@ void pco_lower_nir(pco_ctx *ctx, nir_shader *nir, pco_data *data)
|
|||
NIR_PASS(_, nir, pco_nir_lower_io);
|
||||
NIR_PASS(_, nir, pco_nir_lower_atomics, &uses_usclib);
|
||||
|
||||
NIR_PASS(_, nir, nir_opt_constant_folding);
|
||||
|
||||
if (nir->info.stage == MESA_SHADER_VERTEX) {
|
||||
/* TODO: false? */
|
||||
NIR_PASS(_, nir, nir_lower_io_array_vars_to_elements_no_indirects, true);
|
||||
NIR_PASS(_, nir, nir_split_struct_vars, nir_var_shader_out);
|
||||
NIR_PASS(_, nir, nir_split_struct_vars, nir_var_shader_in);
|
||||
} else if (nir->info.stage == MESA_SHADER_FRAGMENT) {
|
||||
NIR_PASS(_, nir, nir_lower_io_array_vars_to_elements_no_indirects, false);
|
||||
NIR_PASS(_, nir, nir_split_struct_vars, nir_var_shader_in);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue