diff options
author | Matt Turner <mattst88@gmail.com> | 2014-06-25 10:32:38 -0700 |
---|---|---|
committer | Matt Turner <mattst88@gmail.com> | 2014-07-01 08:55:51 -0700 |
commit | 22cd9173295e2212e355db514bfc52138d03079d (patch) | |
tree | f82f6d94609d7573b5101e5055a8247d1a8ce5fd /src/glsl/list.h | |
parent | d49173a97b2756c3bc12411b26f98c5b22d94e22 (diff) |
mesa: Add and use foreach_in_list_use_after.
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Diffstat (limited to 'src/glsl/list.h')
-rw-r--r-- | src/glsl/list.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/glsl/list.h b/src/glsl/list.h index a4c64082122..77e3aaf26e4 100644 --- a/src/glsl/list.h +++ b/src/glsl/list.h @@ -592,6 +592,11 @@ inline void exec_node::insert_before(exec_list *before) __next != NULL; \ __node = __next, __next = (__type *)__next->next) +#define foreach_in_list_use_after(__type, __inst, __list) \ + __type *(__inst); \ + for ((__inst) = (__type *)(__list)->head; \ + !(__inst)->is_tail_sentinel(); \ + (__inst) = (__type *)(__inst)->next) /** * Iterate through two lists at once. Stops at the end of the shorter list. * |