mojoshader.c
branchtrunk
changeset 177 ca94ec9366f7
parent 176 e0e7def8f876
child 178 b1d354511685
--- a/mojoshader.c	Tue Apr 22 02:17:32 2008 -0400
+++ b/mojoshader.c	Tue Apr 22 02:18:44 2008 -0400
@@ -3721,6 +3721,12 @@
         fail(ctx, "MOVA argument isn't address register");
 } // state_MOVA
 
+static void state_RCP(Context *ctx)
+{
+    if (!replicate_swizzle(ctx->source_args[0].swizzle))
+        fail(ctx, "RCP without replicate swizzzle");
+} // state_RCP
+
 static void state_LOOP(Context *ctx)
 {
     if (ctx->source_args[0].regtype != REG_TYPE_LOOP)
@@ -3914,7 +3920,7 @@
     INSTRUCTION(SUB, DSS, MOJOSHADER_TYPE_ANY),
     INSTRUCTION(MAD, DSSS, MOJOSHADER_TYPE_ANY),
     INSTRUCTION(MUL, DSS, MOJOSHADER_TYPE_ANY),
-    INSTRUCTION(RCP, DS, MOJOSHADER_TYPE_ANY),
+    INSTRUCTION_STATE(RCP, DS, MOJOSHADER_TYPE_ANY),
     INSTRUCTION(RSQ, DS, MOJOSHADER_TYPE_ANY),
     INSTRUCTION(DP3, DSS, MOJOSHADER_TYPE_ANY),
     INSTRUCTION(DP4, DSS, MOJOSHADER_TYPE_ANY),