mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-03 22:20:09 +01:00
nir: Add nir_before/after_impl cursors
These are common enough to merit their own helpers. Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io> Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24910>
This commit is contained in:
parent
bd0d3c7b1c
commit
4c45503aae
1 changed files with 12 additions and 0 deletions
|
|
@ -4293,6 +4293,18 @@ nir_after_cf_list(struct exec_list *cf_list)
|
|||
return nir_after_cf_node(last_node);
|
||||
}
|
||||
|
||||
static inline nir_cursor
|
||||
nir_before_impl(nir_function_impl *impl)
|
||||
{
|
||||
return nir_before_cf_list(&impl->body);
|
||||
}
|
||||
|
||||
static inline nir_cursor
|
||||
nir_after_impl(nir_function_impl *impl)
|
||||
{
|
||||
return nir_after_cf_list(&impl->body);
|
||||
}
|
||||
|
||||
/**
|
||||
* Insert a NIR instruction at the given cursor.
|
||||
*
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue