summaryrefslogtreecommitdiffstats
path: root/src/glsl/nir/nir.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/glsl/nir/nir.h')
-rw-r--r--src/glsl/nir/nir.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/glsl/nir/nir.h b/src/glsl/nir/nir.h
index 222a219d0e6..52f84c4d62c 100644
--- a/src/glsl/nir/nir.h
+++ b/src/glsl/nir/nir.h
@@ -1309,7 +1309,7 @@ typedef struct {
struct exec_list body; /** < list of nir_cf_node */
- nir_block *start_block, *end_block;
+ nir_block *end_block;
/** list for all local variables in the function */
struct exec_list locals;
@@ -1336,6 +1336,12 @@ typedef struct {
nir_metadata valid_metadata;
} nir_function_impl;
+static inline nir_block *
+nir_start_block(nir_function_impl *impl)
+{
+ return (nir_block *) exec_list_get_head(&impl->body);
+}
+
static inline nir_cf_node *
nir_cf_node_next(nir_cf_node *node)
{