mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-25 17:20:10 +01:00
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:
parent
4753ce7d72
commit
19f8e0e3aa
1 changed files with 18 additions and 0 deletions
|
|
@ -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)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue