mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-09 04:38:03 +02:00
nir: handle wildcard array deref
Here we add handling of wildcard array derefs when attempting to mark an io as partially used rather than hitting an assert. Acked-by: Marek Olšák <marek.olsak@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31137>
This commit is contained in:
parent
6bb6b0e5ad
commit
fe9b93fc1c
1 changed files with 4 additions and 0 deletions
|
|
@ -235,6 +235,10 @@ get_io_offset(nir_deref_instr *deref, nir_variable *var, bool is_arrayed,
|
|||
assert(glsl_type_is_array(var->type));
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (deref->deref_type == nir_deref_type_array_wildcard)
|
||||
return -1;
|
||||
|
||||
assert(deref->deref_type == nir_deref_type_array);
|
||||
return nir_src_is_const(deref->arr.index) ? (nir_src_as_uint(deref->arr.index) + var->data.location_frac) / 4u : (unsigned)-1;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue