nir: Make nir_deref_instr::mode a bitfield
We rename it to "modes" to make it clear that it may contain more than one mode and adjust all the uses of nir_deref_instr::modes to attempt to handle multiple modes. Reviewed-by: Jesse Natalie <jenatali@microsoft.com> Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6332>
This commit is contained in:

committed by
Marge Bot

parent
7d5f3b5c0e
commit
9d377c01d0
@@ -484,7 +484,7 @@ add_var_use_deref(nir_deref_instr *deref, struct hash_table *live,
|
||||
util_dynarray_append(ainfo->deref_list, nir_deref_instr *, deref);
|
||||
}
|
||||
|
||||
assert(deref->mode == deref->var->data.mode);
|
||||
assert(deref->modes == deref->var->data.mode);
|
||||
_mesa_hash_table_insert(live, deref->var->name, ainfo);
|
||||
}
|
||||
|
||||
|
@@ -209,7 +209,7 @@ lower_buffer_interface_derefs_impl(nir_function_impl *impl,
|
||||
break;
|
||||
}
|
||||
|
||||
nir_deref_instr *cast = nir_build_deref_cast(&b, ptr, deref->mode,
|
||||
nir_deref_instr *cast = nir_build_deref_cast(&b, ptr, deref->modes,
|
||||
deref->type, 0);
|
||||
/* Set the alignment on the cast so that we get good alignment out
|
||||
* of nir_lower_explicit_io. Our offset to the start of the UBO
|
||||
|
Reference in New Issue
Block a user