mesa: remove the redundant check
authorYuanhan Liu <yuanhan.liu@linux.intel.com>
Fri, 21 Oct 2011 03:24:18 +0000 (11:24 +0800)
committerYuanhan Liu <yuanhan.liu@linux.intel.com>
Thu, 3 Nov 2011 02:18:58 +0000 (10:18 +0800)
Signed-off-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
src/mesa/main/texparam.c

index a2424484422dc90d22bf46499f5d3745ebd6e9ad..6da730d6711d3ed646b92e18b04744abc25473ea 100644 (file)
@@ -394,12 +394,11 @@ set_tex_parameteri(struct gl_context *ctx,
             return GL_FALSE;
          }
          ASSERT(comp < 4);
-         if (swz >= 0) {
-            flush(ctx);
-            texObj->Swizzle[comp] = params[0];
-            set_swizzle_component(&texObj->_Swizzle, comp, swz);
-            return GL_TRUE;
-         }
+
+         flush(ctx);
+         texObj->Swizzle[comp] = params[0];
+         set_swizzle_component(&texObj->_Swizzle, comp, swz);
+         return GL_TRUE;
       }
       goto invalid_pname;