[Mesa-dev] [PATCH 2/8] i965/fs: Set has_control_flow to true on an IF or WHILE instruction.
Matt Turner
mattst88 at gmail.com
Tue May 6 18:38:31 PDT 2014
All of the other control flow instructions are dependent on the
existence of an IF or WHILE instruction.
---
src/mesa/drivers/dri/i965/brw_fs_generator.cpp | 2 ++
src/mesa/drivers/dri/i965/gen8_fs_generator.cpp | 2 ++
2 files changed, 4 insertions(+)
diff --git a/src/mesa/drivers/dri/i965/brw_fs_generator.cpp b/src/mesa/drivers/dri/i965/brw_fs_generator.cpp
index ae89a50..651b708 100644
--- a/src/mesa/drivers/dri/i965/brw_fs_generator.cpp
+++ b/src/mesa/drivers/dri/i965/brw_fs_generator.cpp
@@ -1606,6 +1606,7 @@ fs_generator::generate_code(exec_list *instructions, bool *has_control_flow,
break;
case BRW_OPCODE_IF:
+ *has_control_flow = true;
if (inst->src[0].file != BAD_FILE) {
/* The instruction has an embedded compare (only allowed on gen6) */
assert(brw->gen == 6);
@@ -1640,6 +1641,7 @@ fs_generator::generate_code(exec_list *instructions, bool *has_control_flow,
break;
case BRW_OPCODE_WHILE:
+ *has_control_flow = true;
brw_WHILE(p);
break;
diff --git a/src/mesa/drivers/dri/i965/gen8_fs_generator.cpp b/src/mesa/drivers/dri/i965/gen8_fs_generator.cpp
index 7009c6b..086c84c 100644
--- a/src/mesa/drivers/dri/i965/gen8_fs_generator.cpp
+++ b/src/mesa/drivers/dri/i965/gen8_fs_generator.cpp
@@ -1057,6 +1057,7 @@ gen8_fs_generator::generate_code(exec_list *instructions,
break;
case BRW_OPCODE_IF:
+ *has_control_flow = true;
IF(BRW_PREDICATE_NORMAL);
break;
@@ -1081,6 +1082,7 @@ gen8_fs_generator::generate_code(exec_list *instructions,
break;
case BRW_OPCODE_WHILE:
+ *has_control_flow = true;
WHILE();
break;
--
1.8.3.2
More information about the mesa-dev
mailing list