summaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
authorMatt Turner <[email protected]>2014-07-14 19:48:15 -0700
committerMatt Turner <[email protected]>2014-08-18 19:08:53 -0700
commita4359bcaa599291ef1588376a419a0bcfbd02396 (patch)
treed7d228a64c15ec41660ff77190a7d50ab7c0175b /src/mesa
parent26624b85e70cc4fdf77d7a4be15c154644db5894 (diff)
i965/cfg: Add a foreach_block_and_inst_safe macro.
Reviewed-by: Topi Pohjolainen <[email protected]>
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/drivers/dri/i965/brw_cfg.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_cfg.h b/src/mesa/drivers/dri/i965/brw_cfg.h
index 913a1ed85de..29e31e77efb 100644
--- a/src/mesa/drivers/dri/i965/brw_cfg.h
+++ b/src/mesa/drivers/dri/i965/brw_cfg.h
@@ -109,6 +109,10 @@ struct cfg_t {
foreach_block (__block, __cfg) \
foreach_inst_in_block (__type, __inst, __block)
+#define foreach_block_and_inst_safe(__block, __type, __inst, __cfg) \
+ foreach_block_safe (__block, __cfg) \
+ foreach_inst_in_block_safe (__type, __inst, __block)
+
#define foreach_block(__block, __cfg) \
foreach_list_typed (bblock_t, __block, link, &(__cfg)->block_list)