Use line number information from entire function expression
[mesa.git] / src / glsl / lower_output_reads.cpp
index 5ba9720d0dc36239a15b24bf5ed20461a6cacdc5..afe17766beb17982824a36141d77777c2f13b005 100644 (file)
@@ -37,6 +37,8 @@
  * main() function to copy the final values to the actual shader outputs.
  */
 
+namespace {
+
 class output_read_remover : public ir_hierarchical_visitor {
 protected:
    /**
@@ -55,6 +57,8 @@ public:
    virtual ir_visitor_status visit_leave(class ir_function_signature *);
 };
 
+} /* anonymous namespace */
+
 /**
  * Hash function for the output variables - computes the hash of the name.
  * NOTE: We're using the name string to ensure that the hash doesn't depend
@@ -87,7 +91,7 @@ output_read_remover::~output_read_remover()
 ir_visitor_status
 output_read_remover::visit(ir_dereference_variable *ir)
 {
-   if (ir->var->mode != ir_var_shader_out)
+   if (ir->var->data.mode != ir_var_shader_out)
       return visit_continue;
 
    ir_variable *temp = (ir_variable *) hash_table_find(replacements, ir->var);