diff options
author | Connor Abbott <[email protected]> | 2015-05-08 14:40:58 -0400 |
---|---|---|
committer | Kenneth Graunke <[email protected]> | 2015-09-01 00:58:17 -0700 |
commit | 019eea1c4fadaa86ce88ab81ac2f14613381738b (patch) | |
tree | 42fcb27563328311e57dd3e4b29d58034d93bbc5 /src/glsl/nir/nir.c | |
parent | 89dc0626bd71343312049bdca291704cb2f7fffe (diff) |
nir: add a helper for iterating over blocks in a cf node
We were already doing this internally for iterating over a function
implementation, so just expose it directly.
Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src/glsl/nir/nir.c')
-rw-r--r-- | src/glsl/nir/nir.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/glsl/nir/nir.c b/src/glsl/nir/nir.c index acb251afe8b..3f4bec4625d 100644 --- a/src/glsl/nir/nir.c +++ b/src/glsl/nir/nir.c @@ -1293,6 +1293,13 @@ foreach_cf_node(nir_cf_node *node, nir_foreach_block_cb cb, } bool +nir_foreach_block_in_cf_node(nir_cf_node *node, nir_foreach_block_cb cb, + void *state) +{ + return foreach_cf_node(node, cb, false, state); +} + +bool nir_foreach_block(nir_function_impl *impl, nir_foreach_block_cb cb, void *state) { foreach_list_typed_safe(nir_cf_node, node, node, &impl->body) { |