From 018843ade6bfd4ebd8433fec937c5f8fd3af5522 Mon Sep 17 00:00:00 2001 From: "Ryan C. Gordon" Date: Sun, 27 Jul 2008 02:29:07 -0400 Subject: [PATCH] Always use LG2 and EX2 in arb1 profile, even for partial precision. LOG and EXP have details that don't match Direct3D's instructions, so just use the full-precision versions all the time. --HG-- branch : trunk --- mojoshader.c | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/mojoshader.c b/mojoshader.c index 2f98dcea..a22beef4 100644 --- a/mojoshader.c +++ b/mojoshader.c @@ -4895,20 +4895,8 @@ EMIT_ARB1_OPCODE_UNIMPLEMENTED_FUNC(TEXM3X3TEX) EMIT_ARB1_OPCODE_UNIMPLEMENTED_FUNC(TEXM3X3SPEC) EMIT_ARB1_OPCODE_UNIMPLEMENTED_FUNC(TEXM3X3VSPEC) -static void emit_ARB1_EXPP(Context *ctx) -{ - // EXP was removed in nv4: no benefit over full-precision EX2. - if (ctx->support_nv4) - emit_ARB1_opcode_ds(ctx, "EX2"); - else - emit_ARB1_opcode_ds(ctx, "EXP"); -} // emit_ARB1_EXPP - -static void emit_ARB1_LOGP(Context *ctx) -{ - // LOG was removed in nv4: no benefit over full-precision LG2. - arb1_log(ctx, (ctx->support_nv4) ? "LG2" : "LOG"); -} // emit_ARB1_LOGP +static void emit_ARB1_EXPP(Context *ctx) { emit_ARB1_opcode_ds(ctx, "EX2"); } +static void emit_ARB1_LOGP(Context *ctx) { arb1_log(ctx, "LG2"); } EMIT_ARB1_OPCODE_UNIMPLEMENTED_FUNC(CND) EMIT_ARB1_OPCODE_UNIMPLEMENTED_FUNC(TEXREG2RGB)