mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-04-21 01:10:44 +02:00
zink: unroll array loop when copying vars for passthrough shaders
wildcard derefs aren't supported in ntv Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22376>
This commit is contained in:
parent
26f767d524
commit
0c730f98c5
1 changed files with 4 additions and 1 deletions
|
|
@ -1139,7 +1139,10 @@ copy_vars(nir_builder *b, nir_deref_instr *dst, nir_deref_instr *src)
|
|||
copy_vars(b, nir_build_deref_struct(b, dst, i), nir_build_deref_struct(b, src, i));
|
||||
}
|
||||
} else if (glsl_type_is_array_or_matrix(dst->type)) {
|
||||
copy_vars(b, nir_build_deref_array_wildcard(b, dst), nir_build_deref_array_wildcard(b, src));
|
||||
unsigned count = glsl_type_is_array(dst->type) ? glsl_array_size(dst->type) : glsl_get_matrix_columns(dst->type);
|
||||
for (unsigned i = 0; i < count; i++) {
|
||||
copy_vars(b, nir_build_deref_array_imm(b, dst, i), nir_build_deref_array_imm(b, src, i));
|
||||
}
|
||||
} else {
|
||||
nir_ssa_def *load = nir_load_deref(b, src);
|
||||
nir_store_deref(b, dst, load, BITFIELD_MASK(load->num_components));
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue