From 272107e3884af257996c1bf53a1068a4c37ab558 Mon Sep 17 00:00:00 2001 From: "Ryan C. Gordon" Date: Sun, 6 Jul 2008 21:57:10 -0400 Subject: [PATCH] Attempt at DSX and DSY in nv2 profile. I'm not sure if these map directly to the Direct3D opcodes, though... --HG-- branch : trunk --- mojoshader.c | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/mojoshader.c b/mojoshader.c index 7ec6f012..01c0616f 100644 --- a/mojoshader.c +++ b/mojoshader.c @@ -4827,8 +4827,23 @@ static void emit_ARB1_DP2ADD(Context *ctx) } // 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)