From 6f63ac1ad890ff81454bdefc3ca0ad9e620a8033 Mon Sep 17 00:00:00 2001 From: "Ryan C. Gordon" Date: Sat, 6 Sep 2008 15:27:18 -0400 Subject: [PATCH] Realy fix TEXKILL in arb1 profile this time. The instruction takes a destination register, not a source register! And we can count on a fill writemask, so don't screw with swizzle, but just hardcode it instead. --- mojoshader.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/mojoshader.c b/mojoshader.c index d374c229..0136fc8f 100644 --- a/mojoshader.c +++ b/mojoshader.c @@ -4833,11 +4833,7 @@ static void emit_ARB1_TEXKILL(Context *ctx) // We just map the x component to w. If it's negative, the fragment // would discard anyhow, otherwise, it'll pass through okay. This saves // us a temp register. - const int origswiz = ctx->source_args[0].swizzle; - ctx->source_args[0].swizzle = (origswiz & 0x3F) | ((origswiz & 0x3) << 6); - ctx->source_args[0].swizzle_w = ctx->source_args[0].swizzle_x; - const char *src0 = make_ARB1_srcarg_string(ctx, 0); - output_line(ctx, "KIL %s;", src0); + output_line(ctx, "KIL %s.xyzx;", get_ARB1_destarg_varname(ctx)); } // emit_ARB1_TEXKILL EMIT_ARB1_OPCODE_UNIMPLEMENTED_FUNC(TEXBEM)