mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 09:38:07 +02:00
glsl2: Use new foreach_list_safe abstraction.
This commit is contained in:
parent
f3290e950c
commit
a4dde28ee6
1 changed files with 3 additions and 7 deletions
|
|
@ -32,20 +32,16 @@
|
|||
/**
|
||||
* Process a list of nodes using a hierarchical vistor
|
||||
*
|
||||
* \warning
|
||||
* This function will operate correctly if a node being processed is removed
|
||||
* from list. However, if nodes are added to the list after the node being
|
||||
* processed, some of the added noded may not be processed.
|
||||
* from the list. If nodes are inserted before the current node, they will be
|
||||
* processed next.
|
||||
*/
|
||||
ir_visitor_status
|
||||
visit_list_elements(ir_hierarchical_visitor *v, exec_list *l)
|
||||
{
|
||||
exec_node *next;
|
||||
ir_instruction *prev_base_ir = v->base_ir;
|
||||
|
||||
for (exec_node *n = l->head; n->next != NULL; n = next) {
|
||||
next = n->next;
|
||||
|
||||
foreach_list_safe(n, l) {
|
||||
ir_instruction *const ir = (ir_instruction *) n;
|
||||
v->base_ir = ir;
|
||||
ir_visitor_status s = ir->accept(v);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue