diff options
author | Jason Ekstrand <[email protected]> | 2016-07-15 15:21:19 -0700 |
---|---|---|
committer | Jason Ekstrand <[email protected]> | 2016-07-20 15:29:55 -0700 |
commit | dc9f2436c39d6539b56c9aedceefdc79566e5db8 (patch) | |
tree | f1dc695e7c9572489097bb91d18a04f76bbdb7b3 /src/compiler/nir/nir.h | |
parent | 106946153fb237e0867d65d53fb3a8461f3a13ee (diff) |
nir: Add a nir_deref_foreach_leaf helper
Signed-off-by: Jason Ekstrand <[email protected]>
Reviewed-by: Kenneth Graunke <[email protected]>
Cc: "12.0" <[email protected]>
Diffstat (limited to 'src/compiler/nir/nir.h')
-rw-r--r-- | src/compiler/nir/nir.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/compiler/nir/nir.h b/src/compiler/nir/nir.h index 2873c1529aa..a80f9c997c3 100644 --- a/src/compiler/nir/nir.h +++ b/src/compiler/nir/nir.h @@ -1943,6 +1943,10 @@ nir_deref_struct *nir_deref_struct_create(void *mem_ctx, unsigned field_index); nir_deref *nir_copy_deref(void *mem_ctx, nir_deref *deref); +typedef bool (*nir_deref_foreach_leaf_cb)(nir_deref_var *deref, void *state); +bool nir_deref_foreach_leaf(nir_deref_var *deref, + nir_deref_foreach_leaf_cb cb, void *state); + nir_load_const_instr * nir_deref_get_const_initializer_load(nir_shader *shader, nir_deref_var *deref); |