Mesa (master): i965: Add a second successor to BRW_OPCODE_WHILE
Neil Roberts
nroberts at kemper.freedesktop.org
Fri Oct 9 13:34:26 UTC 2015
Module: Mesa
Branch: master
Commit: 728d7bc85f1f101875349690bf1637037a5a1817
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=728d7bc85f1f101875349690bf1637037a5a1817
Author: Neil Roberts <neil at linux.intel.com>
Date: Mon Oct 5 13:50:56 2015 +0200
i965: Add a second successor to BRW_OPCODE_WHILE
It is possible to directly predicate the WHILE instruction. In this
case there will be a second successor block because the execution can
resume from the instruction after the loop. This will be used in a
subsequent patch.
Reviewed-by: Matt Turner <mattst88 at gmail.com>
---
src/mesa/drivers/dri/i965/brw_cfg.cpp | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/src/mesa/drivers/dri/i965/brw_cfg.cpp b/src/mesa/drivers/dri/i965/brw_cfg.cpp
index 91d53ef..531fa16 100644
--- a/src/mesa/drivers/dri/i965/brw_cfg.cpp
+++ b/src/mesa/drivers/dri/i965/brw_cfg.cpp
@@ -305,6 +305,10 @@ cfg_t::cfg_t(exec_list *instructions)
assert(cur_do != NULL && cur_while != NULL);
cur->add_successor(mem_ctx, cur_do);
+
+ if (inst->predicate)
+ cur->add_successor(mem_ctx, cur_while);
+
set_next_block(&cur, cur_while, ip);
/* Pop the stack so we're in the previous loop */
More information about the mesa-commit
mailing list