aboutsummaryrefslogtreecommitdiffstats
path: root/src/compiler
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2016-07-03 15:03:54 +0200
committerMarek Olšák <[email protected]>2016-11-15 20:22:52 +0100
commit654e9466b5304b040374e72c9e9a524bd1268362 (patch)
treee8ceac8a07138151b2fa1d7f8bd9e50b2cabd90e /src/compiler
parent68f35005ed9b4ccda2179bff86a511f20cd34f1b (diff)
glsl/lower_if: check more node types in check_control_flow -> check_ir_node
Reviewed-by: Nicolai Hähnle <[email protected]>
Diffstat (limited to 'src/compiler')
-rw-r--r--src/compiler/glsl/lower_if_to_cond_assign.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/compiler/glsl/lower_if_to_cond_assign.cpp b/src/compiler/glsl/lower_if_to_cond_assign.cpp
index 2875e7902d1..01a73357d45 100644
--- a/src/compiler/glsl/lower_if_to_cond_assign.cpp
+++ b/src/compiler/glsl/lower_if_to_cond_assign.cpp
@@ -97,7 +97,7 @@ lower_if_to_cond_assign(exec_list *instructions, unsigned max_depth)
}
void
-check_control_flow(ir_instruction *ir, void *data)
+check_ir_node(ir_instruction *ir, void *data)
{
ir_if_to_cond_assign_visitor *v = (ir_if_to_cond_assign_visitor *)data;
@@ -107,6 +107,9 @@ check_control_flow(ir_instruction *ir, void *data)
case ir_type_loop:
case ir_type_loop_jump:
case ir_type_return:
+ case ir_type_emit_vertex:
+ case ir_type_end_primitive:
+ case ir_type_barrier:
v->found_unsupported_op = true;
break;
default:
@@ -183,10 +186,10 @@ ir_if_to_cond_assign_visitor::visit_leave(ir_if *ir)
/* Check that both blocks don't contain anything we can't support. */
foreach_in_list(ir_instruction, then_ir, &ir->then_instructions) {
- visit_tree(then_ir, check_control_flow, this);
+ visit_tree(then_ir, check_ir_node, this);
}
foreach_in_list(ir_instruction, else_ir, &ir->else_instructions) {
- visit_tree(else_ir, check_control_flow, this);
+ visit_tree(else_ir, check_ir_node, this);
}
if (this->found_unsupported_op)
return visit_continue; /* can't handle inner unsupported opcodes */