mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-04-26 09:00:37 +02:00
pan/bi: Add node_to_index helper
To invert index_to_node for RA. Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8215>
This commit is contained in:
parent
b85f317017
commit
06f52fe0b1
1 changed files with 9 additions and 0 deletions
|
|
@ -778,6 +778,15 @@ bi_get_node(bi_index index)
|
|||
return (index.value << 1) | index.reg;
|
||||
}
|
||||
|
||||
static inline bi_index
|
||||
bi_node_to_index(unsigned node, unsigned node_count)
|
||||
{
|
||||
assert(node < node_count);
|
||||
assert(node_count < ~0);
|
||||
|
||||
return bi_get_index(node >> 1, node & PAN_IS_REG, 0);
|
||||
}
|
||||
|
||||
/* Iterators for Bifrost IR */
|
||||
|
||||
#define bi_foreach_block(ctx, v) \
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue