Mesa (master): glsl: move ir_var_out code

Brian Paul brianp at kemper.freedesktop.org
Thu Jan 27 04:19:18 UTC 2011


Module: Mesa
Branch: master
Commit: 86471246f0f3c4c122f605fdd56dd0f5864fc307
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=86471246f0f3c4c122f605fdd56dd0f5864fc307

Author: Brian Paul <brianp at vmware.com>
Date:   Wed Jan 26 21:16:14 2011 -0700

glsl: move ir_var_out code

---

 src/mesa/program/ir_to_mesa.cpp |   14 +++++++-------
 1 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/src/mesa/program/ir_to_mesa.cpp b/src/mesa/program/ir_to_mesa.cpp
index daedcad..b7746a6 100644
--- a/src/mesa/program/ir_to_mesa.cpp
+++ b/src/mesa/program/ir_to_mesa.cpp
@@ -1485,7 +1485,6 @@ ir_to_mesa_visitor::visit(ir_dereference_variable *ir)
 	 this->variables.push_tail(entry);
 	 break;
       case ir_var_in:
-      case ir_var_out:
       case ir_var_inout:
 	 /* The linker assigns locations for varyings and attributes,
 	  * including deprecated builtins (like gl_Color), user-assign
@@ -1509,12 +1508,13 @@ ir_to_mesa_visitor::visit(ir_dereference_variable *ir)
 				   var->type->gl_type,
 				   var->location - VERT_ATTRIB_GENERIC0);
 	    }
-	 } else {
-	    entry = new(mem_ctx) variable_storage(var,
-						  PROGRAM_OUTPUT,
-						  var->location);
-	 }
-
+         }
+         break;
+      case ir_var_out:
+	 assert(var->location != -1);
+         entry = new(mem_ctx) variable_storage(var,
+                                               PROGRAM_OUTPUT,
+                                               var->location);
 	 break;
       case ir_var_system_value:
          entry = new(mem_ctx) variable_storage(var,




More information about the mesa-commit mailing list