Mesa (master): glsl: remove needless conditional

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


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

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

glsl: remove needless conditional

---

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

diff --git a/src/mesa/program/ir_to_mesa.cpp b/src/mesa/program/ir_to_mesa.cpp
index b7746a6..08b624f 100644
--- a/src/mesa/program/ir_to_mesa.cpp
+++ b/src/mesa/program/ir_to_mesa.cpp
@@ -1494,20 +1494,16 @@ ir_to_mesa_visitor::visit(ir_dereference_variable *ir)
 	  * FINISHME: We would hit this path for function arguments.  Fix!
 	  */
 	 assert(var->location != -1);
-	 if (var->mode == ir_var_in ||
-	     var->mode == ir_var_inout) {
-	    entry = new(mem_ctx) variable_storage(var,
-						  PROGRAM_INPUT,
-						  var->location);
-
-	    if (this->prog->Target == GL_VERTEX_PROGRAM_ARB &&
-		var->location >= VERT_ATTRIB_GENERIC0) {
-	       _mesa_add_attribute(prog->Attributes,
-				   var->name,
-				   _mesa_sizeof_glsl_type(var->type->gl_type),
-				   var->type->gl_type,
-				   var->location - VERT_ATTRIB_GENERIC0);
-	    }
+         entry = new(mem_ctx) variable_storage(var,
+                                               PROGRAM_INPUT,
+                                               var->location);
+         if (this->prog->Target == GL_VERTEX_PROGRAM_ARB &&
+             var->location >= VERT_ATTRIB_GENERIC0) {
+            _mesa_add_attribute(prog->Attributes,
+                                var->name,
+                                _mesa_sizeof_glsl_type(var->type->gl_type),
+                                var->type->gl_type,
+                                var->location - VERT_ATTRIB_GENERIC0);
          }
          break;
       case ir_var_out:




More information about the mesa-commit mailing list