More logic errors in the switch to use no_swizzle(). trunk
authorRyan C. Gordon <icculus@icculus.org>
Fri, 09 May 2008 02:33:01 -0400
branchtrunk
changeset 305 d1d0c6111f79
parent 304 e0920b542bdf
child 306 053aaa9b4fb1
More logic errors in the switch to use no_swizzle(). This is exactly why you shouldn't use "no" in a function name...it causes double-negatives!
mojoshader.c
--- a/mojoshader.c	Thu May 08 20:39:40 2008 -0400
+++ b/mojoshader.c	Fri May 09 02:33:01 2008 -0400
@@ -1034,7 +1034,7 @@
 
     char swizzle_str[6];
     int i = 0;
-    if (no_swizzle(arg->swizzle))
+    if (!no_swizzle(arg->swizzle))
     {
         swizzle_str[i++] = '.';
         swizzle_str[i++] = swizzle_channels[arg->swizzle_x];
@@ -3477,7 +3477,7 @@
         return fail(ctx, "Predicated instruction but not predicate register!");
     else if ((arg->src_mod != SRCMOD_NONE) && (arg->src_mod != SRCMOD_NOT))
         return fail(ctx, "Predicated instruction register is not NONE or NOT");
-    else if ( no_swizzle(arg->swizzle) && !replicate_swizzle(arg->swizzle) )
+    else if ( !no_swizzle(arg->swizzle) && !replicate_swizzle(arg->swizzle) )
         return fail(ctx, "Predicated instruction register has wrong swizzle");
     else if (arg->relative)  // I'm pretty sure this is illegal...?
         return fail(ctx, "relative addressing in predicated token");