nir: Add trivial nir_src_* getters
These will become nontrivial later in the series. For now these have no smarts in them, in order to make the conversion completely mechanical. Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io> Reviewed-by: Rhys Perry <pendingchaos02@gmail.com> Acked-by: Faith Ekstrand <faith.ekstrand@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24671>
This commit is contained in:
@@ -1009,6 +1009,24 @@ typedef struct nir_src {
|
||||
bool is_if;
|
||||
} nir_src;
|
||||
|
||||
static inline bool
|
||||
nir_src_is_if(const nir_src *src)
|
||||
{
|
||||
return src->is_if;
|
||||
}
|
||||
|
||||
static inline nir_instr *
|
||||
nir_src_parent_instr(const nir_src *src)
|
||||
{
|
||||
return src->parent_instr;
|
||||
}
|
||||
|
||||
static inline struct nir_if *
|
||||
nir_src_parent_if(const nir_src *src)
|
||||
{
|
||||
return src->parent_if;
|
||||
}
|
||||
|
||||
static inline void
|
||||
nir_src_set_parent_instr(nir_src *src, nir_instr *parent_instr)
|
||||
{
|
||||
|
Reference in New Issue
Block a user