mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-25 19:30:11 +01:00
nir: Add nir_deref_instr_is_arr() helper
Reviewed-by: Marek Olšák <marek.olsak@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38856>
This commit is contained in:
parent
8ba197c9ef
commit
263a82f49b
1 changed files with 8 additions and 0 deletions
|
|
@ -1789,6 +1789,14 @@ nir_deref_mode_is_in_set(const nir_deref_instr *deref, nir_variable_mode modes)
|
|||
|
||||
static inline nir_deref_instr *nir_src_as_deref(nir_src src);
|
||||
|
||||
/** Returns true if deref->arr is valid */
|
||||
static inline bool
|
||||
nir_deref_instr_is_arr(const nir_deref_instr *deref)
|
||||
{
|
||||
return deref->deref_type == nir_deref_type_array ||
|
||||
deref->deref_type == nir_deref_type_ptr_as_array;
|
||||
}
|
||||
|
||||
static inline nir_deref_instr *
|
||||
nir_deref_instr_parent(const nir_deref_instr *instr)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue