aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/compiler/glsl/list.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/compiler/glsl/list.h b/src/compiler/glsl/list.h
index 979f6fcc539..ed77dcfab41 100644
--- a/src/compiler/glsl/list.h
+++ b/src/compiler/glsl/list.h
@@ -372,6 +372,13 @@ exec_list_is_empty(const struct exec_list *list)
return list->head_sentinel.next == &list->tail_sentinel;
}
+static inline bool
+exec_list_is_singular(const struct exec_list *list)
+{
+ return !exec_list_is_empty(list) &&
+ list->head_sentinel.next->next == &list->tail_sentinel;
+}
+
static inline const struct exec_node *
exec_list_get_head_const(const struct exec_list *list)
{