diff options
author | Jason Ekstrand <[email protected]> | 2019-04-17 17:18:19 -0500 |
---|---|---|
committer | Jason Ekstrand <[email protected]> | 2019-04-18 17:12:44 +0000 |
commit | c6463f8ac2a9f85874c882fd5307eefb29f86bc1 (patch) | |
tree | 63a286384c4e9ffa41d3001bc1b308b7571cb07e /src/compiler/nir/nir.h | |
parent | 85c35885b383477ac4f92a11695fc85c6d45c98c (diff) |
nir: Add a nir_src_as_intrinsic() helper
Reviewed-by: Eric Anholt <[email protected]>
Reviewed-by: Caio Marcelo de Oliveira Filho <[email protected]>
Diffstat (limited to 'src/compiler/nir/nir.h')
-rw-r--r-- | src/compiler/nir/nir.h | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/src/compiler/nir/nir.h b/src/compiler/nir/nir.h index 91ab40a9482..2a381d28d7c 100644 --- a/src/compiler/nir/nir.h +++ b/src/compiler/nir/nir.h @@ -2748,12 +2748,6 @@ bool nir_foreach_src(nir_instr *instr, nir_foreach_src_cb cb, void *state); nir_const_value *nir_src_as_const_value(nir_src src); -static inline struct nir_instr * -nir_src_instr(const struct nir_src *src) -{ - return src->is_ssa ? src->ssa->parent_instr : NULL; -} - #define NIR_SRC_AS_(name, c_type, type_enum, cast_macro) \ static inline c_type * \ nir_src_as_ ## name (nir_src src) \ @@ -2763,6 +2757,8 @@ nir_src_as_ ## name (nir_src src) \ } NIR_SRC_AS_(alu_instr, nir_alu_instr, nir_instr_type_alu, nir_instr_as_alu) +NIR_SRC_AS_(intrinsic, nir_intrinsic_instr, + nir_instr_type_intrinsic, nir_instr_as_intrinsic) bool nir_src_is_dynamically_uniform(nir_src src); bool nir_srcs_equal(nir_src src1, nir_src src2); |