Always use LG2 and EX2 in arb1 profile, even for partial precision. trunk
authorRyan C. Gordon <icculus@icculus.org>
Sun, 27 Jul 2008 02:29:07 -0400
branchtrunk
changeset 434 9d36ff50e897
parent 433 f6d785d7982e
child 435 88abca0babe9
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.
mojoshader.c
--- a/mojoshader.c	Wed Jul 09 19:52:47 2008 -0400
+++ b/mojoshader.c	Sun Jul 27 02:29:07 2008 -0400
@@ -4895,20 +4895,8 @@
 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)