Mesa (master): i965/cfg: Add a foreach_block_safe macro.

Matt Turner mattst88 at kemper.freedesktop.org
Tue Aug 19 02:06:31 UTC 2014


Module: Mesa
Branch: master
Commit: c51b0861e4559c13bee0d6fb0da2575b39e50e38
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=c51b0861e4559c13bee0d6fb0da2575b39e50e38

Author: Matt Turner <mattst88 at gmail.com>
Date:   Mon Jul 14 11:15:51 2014 -0700

i965/cfg: Add a foreach_block_safe macro.

Reviewed-by: Topi Pohjolainen <topi.pohjolainen at intel.com>

---

 src/mesa/drivers/dri/i965/brw_cfg.h |    3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/mesa/drivers/dri/i965/brw_cfg.h b/src/mesa/drivers/dri/i965/brw_cfg.h
index f7203e2..a5d2df5 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;                          \




More information about the mesa-commit mailing list