glsl: fix the type of ir_constant_data::u16
[mesa.git] / src / compiler / glsl / ir_hierarchical_visitor.h
index 28517b6e4f47c7527d79aaced98c0441a71b4847..dff6a39a6a43db18ca423226deda2495245b1a94 100644 (file)
@@ -22,7 +22,6 @@
  * DEALINGS IN THE SOFTWARE.
  */
 
-#pragma once
 #ifndef IR_HIERARCHICAL_VISITOR_H
 #define IR_HIERARCHICAL_VISITOR_H
 
@@ -55,7 +54,7 @@ enum ir_visitor_status {
  * returning \c visit_stop), or stop visiting sibling nodes (by returning \c
  * visit_continue_with_parent).
  *
- * These two changes combine to allow nagivation of children to be implemented
+ * These two changes combine to allow navigation of children to be implemented
  * in the composite's \c accept method.  The \c accept method for a leaf-node
  * class will simply call the \c visit method, as usual, and pass its return
  * value on.  The \c accept method for internal-node classes will call the \c
@@ -134,6 +133,8 @@ public:
    virtual ir_visitor_status visit_leave(class ir_return *);
    virtual ir_visitor_status visit_enter(class ir_discard *);
    virtual ir_visitor_status visit_leave(class ir_discard *);
+   virtual ir_visitor_status visit_enter(class ir_demote *);
+   virtual ir_visitor_status visit_leave(class ir_demote *);
    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 *);
@@ -148,6 +149,12 @@ public:
     */
    void run(struct exec_list *instructions);
 
+   /**
+    * Utility function to call both the leave and enter callback functions.
+    * This is used for leaf nodes.
+    */
+   void call_enter_leave_callbacks(class ir_instruction *ir);
+
    /* Some visitors may need to insert new variable declarations and
     * assignments for portions of a subtree, which means they need a
     * pointer to the current instruction in the stream, not just their