mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-02-04 23:40:33 +01:00
nir: Handle array-deref-of-vector case in loop analysis
SPIR-V can produce those for SSBO and UBO access. Found when testing the ARB_gl_spirv series. Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
This commit is contained in:
parent
cdd90a7502
commit
e5830e1132
1 changed files with 6 additions and 3 deletions
|
|
@ -480,9 +480,12 @@ find_array_access_via_induction(loop_info_state *state,
|
|||
*array_index_out = array_index;
|
||||
|
||||
nir_deref_instr *parent = nir_deref_instr_parent(d);
|
||||
assert(glsl_type_is_array_or_matrix(parent->type));
|
||||
|
||||
return glsl_get_length(parent->type);
|
||||
if (glsl_type_is_array_or_matrix(parent->type)) {
|
||||
return glsl_get_length(parent->type);
|
||||
} else {
|
||||
assert(glsl_type_is_vector(parent->type));
|
||||
return glsl_get_vector_elements(parent->type);
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue