Attempt at DSX and DSY in nv2 profile.
I'm not sure if these map directly to the Direct3D opcodes, though...
--- a/mojoshader.c Sun Jul 06 21:53:41 2008 -0400
+++ b/mojoshader.c Sun Jul 06 21:57:10 2008 -0400
@@ -4827,8 +4827,23 @@
} // emit_ARB1_DP2ADD
-EMIT_ARB1_OPCODE_UNIMPLEMENTED_FUNC(DSX)
-EMIT_ARB1_OPCODE_UNIMPLEMENTED_FUNC(DSY)
+static void emit_ARB1_DSX(Context *ctx)
+{
+ if (ctx->support_nv2) // nv2 has a built-in equivalent to DSX.
+ emit_ARB1_opcode_ds(ctx, "DDX");
+ else
+ failf(ctx, "DSX unsupported in %s profile", ctx->profile->name);
+} // emit_ARB1_DSX
+
+
+static void emit_ARB1_DSY(Context *ctx)
+{
+ if (ctx->support_nv2) // nv2 has a built-in equivalent to DSY.
+ emit_ARB1_opcode_ds(ctx, "DDY");
+ else
+ failf(ctx, "DSY unsupported in %s profile", ctx->profile->name);
+} // emit_ARB1_DSY
+
EMIT_ARB1_OPCODE_UNIMPLEMENTED_FUNC(TEXLDD)