mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-25 00:00:11 +01:00
nir/vars_to_ssa: Handle missing struct members in foreach_deref_node
This can happen if, for instance, you have an array of structs and there are both direct and wildcard references to the same struct and some members only have direct or only have indirect. Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com> Cc: mesa-stable@lists.freedesktop.org
This commit is contained in:
parent
d9015b1eab
commit
ecf91898e0
1 changed files with 6 additions and 2 deletions
|
|
@ -245,8 +245,12 @@ foreach_deref_node_worker(struct deref_node *node, nir_deref *deref,
|
|||
|
||||
case nir_deref_type_struct: {
|
||||
nir_deref_struct *str = nir_deref_as_struct(deref->child);
|
||||
return foreach_deref_node_worker(node->children[str->index],
|
||||
deref->child, cb, state);
|
||||
if (node->children[str->index] &&
|
||||
!foreach_deref_node_worker(node->children[str->index],
|
||||
deref->child, cb, state))
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
default:
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue