summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers
diff options
context:
space:
mode:
authorMatt Turner <[email protected]>2014-07-14 11:15:51 -0700
committerMatt Turner <[email protected]>2014-08-18 19:05:59 -0700
commitc51b0861e4559c13bee0d6fb0da2575b39e50e38 (patch)
tree60d1002f9f43a9009666bec48638c7eacf485e3d /src/mesa/drivers
parenta3d0ccb037082f3aa66bd558dfbe89f63a6eedd3 (diff)
i965/cfg: Add a foreach_block_safe macro.
Reviewed-by: Topi Pohjolainen <[email protected]>
Diffstat (limited to 'src/mesa/drivers')
-rw-r--r--src/mesa/drivers/dri/i965/brw_cfg.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_cfg.h b/src/mesa/drivers/dri/i965/brw_cfg.h
index f7203e25dad..a5d2df58fa4 100644
--- a/src/mesa/drivers/dri/i965/brw_cfg.h
+++ b/src/mesa/drivers/dri/i965/brw_cfg.h
@@ -112,6 +112,9 @@ struct cfg_t {
#define foreach_block(__block, __cfg) \
foreach_list_typed (bblock_t, __block, link, &(__cfg)->block_list)
+#define foreach_block_safe(__block, __cfg) \
+ foreach_list_typed_safe (bblock_t, __block, link, &(__cfg)->block_list)
+
#define foreach_inst_in_block(__type, __inst, __block) \
for (__type *__inst = (__type *)__block->start; \
__inst != __block->end->next; \