From 44768ab156434d4d54e0e16d9c1b18f94ebe1469 Mon Sep 17 00:00:00 2001 From: "Ryan C. Gordon" Date: Fri, 9 May 2008 02:33:01 -0400 Subject: [PATCH] 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! --HG-- branch : trunk --- mojoshader.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mojoshader.c b/mojoshader.c index 6f7133e3..b61199f1 100644 --- a/mojoshader.c +++ b/mojoshader.c @@ -1034,7 +1034,7 @@ static const char *make_D3D_srcarg_string_in_buf(Context *ctx, 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 @@ static int parse_predicated_token(Context *ctx) 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");