compiler/glsl: Return progress from propagate_invariance()
Doing so allow you to easily tell what the pass did using the existing infrastructure in the OPT macro. Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10292>
This commit is contained in:
@@ -113,13 +113,17 @@ ir_invariance_propagation_visitor::visit(ir_dereference_variable *ir)
|
||||
return visit_continue;
|
||||
}
|
||||
|
||||
void
|
||||
bool
|
||||
propagate_invariance(exec_list *instructions)
|
||||
{
|
||||
ir_invariance_propagation_visitor visitor;
|
||||
bool progress = false;
|
||||
|
||||
do {
|
||||
visitor.progress = false;
|
||||
visit_list_elements(&visitor, instructions);
|
||||
progress = progress || visitor.progress;
|
||||
} while (visitor.progress);
|
||||
|
||||
return progress;
|
||||
}
|
||||
|
Reference in New Issue
Block a user