summaryrefslogtreecommitdiffstats
path: root/src/glsl/ir_hierarchical_visitor.h
diff options
context:
space:
mode:
authorPaul Berry <[email protected]>2011-08-18 21:37:31 -0700
committerPaul Berry <[email protected]>2011-09-23 13:28:00 -0700
commitcc81eb09b928389f926b3512c18b3298777d2928 (patch)
tree8e9c7047d6d18eb740b2e512894d3c8898ff3bcf /src/glsl/ir_hierarchical_visitor.h
parentdeff7fff494a04314fe9ad859029f0436bcc9e9f (diff)
glsl hierarchical visitor: Do not overwrite base_ir for parameter lists.
This patch fixes a bug in ir_hirearchical_visitor: when traversing an exec_list representing the formal or actual parameters of a function, it modified base_ir to point to each parameter in turn, rather than leaving it as a pointer to the enclosing statement. This was a problem, since base_ir is used by visitor classes to locate the statement containing the node being visited (usually so that additional statements can be inserted before or after it). Without this fix, visitors might attempt to insert statements into parameter lists. Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src/glsl/ir_hierarchical_visitor.h')
-rw-r--r--src/glsl/ir_hierarchical_visitor.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/glsl/ir_hierarchical_visitor.h b/src/glsl/ir_hierarchical_visitor.h
index dc177f5eb0d..bba046db424 100644
--- a/src/glsl/ir_hierarchical_visitor.h
+++ b/src/glsl/ir_hierarchical_visitor.h
@@ -178,6 +178,7 @@ void visit_tree(ir_instruction *ir,
void (*callback)(class ir_instruction *ir, void *data),
void *data);
-ir_visitor_status visit_list_elements(ir_hierarchical_visitor *v, exec_list *l);
+ir_visitor_status visit_list_elements(ir_hierarchical_visitor *v, exec_list *l,
+ bool statement_list = true);
#endif /* IR_HIERARCHICAL_VISITOR_H */