summaryrefslogtreecommitdiff
path: root/dist/Mesa/src/glsl/ir_hierarchical_visitor.h
diff options
context:
space:
mode:
Diffstat (limited to 'dist/Mesa/src/glsl/ir_hierarchical_visitor.h')
-rw-r--r--dist/Mesa/src/glsl/ir_hierarchical_visitor.h35
1 files changed, 8 insertions, 27 deletions
diff --git a/dist/Mesa/src/glsl/ir_hierarchical_visitor.h b/dist/Mesa/src/glsl/ir_hierarchical_visitor.h
index faa52fd79..647d2e002 100644
--- a/dist/Mesa/src/glsl/ir_hierarchical_visitor.h
+++ b/dist/Mesa/src/glsl/ir_hierarchical_visitor.h
@@ -87,6 +87,8 @@ public:
virtual ir_visitor_status visit(class ir_variable *);
virtual ir_visitor_status visit(class ir_constant *);
virtual ir_visitor_status visit(class ir_loop_jump *);
+ virtual ir_visitor_status visit(class ir_emit_vertex *);
+ virtual ir_visitor_status visit(class ir_end_primitive *);
/**
* ir_dereference_variable isn't technically a leaf, but it is treated as a
@@ -135,10 +137,6 @@ public:
virtual ir_visitor_status visit_leave(class ir_discard *);
virtual ir_visitor_status visit_enter(class ir_if *);
virtual ir_visitor_status visit_leave(class ir_if *);
- virtual ir_visitor_status visit_enter(class ir_emit_vertex *);
- virtual ir_visitor_status visit_leave(class ir_emit_vertex *);
- virtual ir_visitor_status visit_enter(class ir_end_primitive *);
- virtual ir_visitor_status visit_leave(class ir_end_primitive *);
/*@}*/
@@ -163,29 +161,14 @@ public:
* \warning
* Visitor classes derived from \c ir_hierarchical_visitor \b may \b not
* invoke this function. This can be used, for example, to cause the
- * callback to be invoked on every node type except one.
+ * callback to be invoked on every node type execpt one.
*/
- void (*callback_enter)(class ir_instruction *ir, void *data);
+ void (*callback)(class ir_instruction *ir, void *data);
/**
- * Callback function that is invoked on exit of each node visited.
- *
- * \warning
- * Visitor classes derived from \c ir_hierarchical_visitor \b may \b not
- * invoke this function. This can be used, for example, to cause the
- * callback to be invoked on every node type except one.
- */
- void (*callback_leave)(class ir_instruction *ir, void *data);
-
- /**
- * Extra data parameter passed to the per-node callback_enter function
- */
- void *data_enter;
-
- /**
- * Extra data parameter passed to the per-node callback_leave function
+ * Extra data parameter passed to the per-node callback function
*/
- void *data_leave;
+ void *data;
/**
* Currently in the LHS of an assignment?
@@ -196,10 +179,8 @@ public:
};
void visit_tree(ir_instruction *ir,
- void (*callback_enter)(class ir_instruction *ir, void *data),
- void *data_enter,
- void (*callback_leave)(class ir_instruction *ir, void *data) = NULL,
- void *data_leave = NULL);
+ void (*callback)(class ir_instruction *ir, void *data),
+ void *data);
ir_visitor_status visit_list_elements(ir_hierarchical_visitor *v, exec_list *l,
bool statement_list = true);