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

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


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

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

i965/cfg: Add a foreach_block_and_inst_safe macro.

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

---

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

diff --git a/src/mesa/drivers/dri/i965/brw_cfg.h b/src/mesa/drivers/dri/i965/brw_cfg.h
index 913a1ed..29e31e7 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)
 




More information about the mesa-commit mailing list