Added state_BREAKP(). trunk
authorRyan C. Gordon <icculus@icculus.org>
Thu, 03 Apr 2008 05:50:53 -0400
branchtrunk
changeset 62 c504bde0e80c
parent 61 0a1de4d2ba04
child 63 97048a10fc97
Added state_BREAKP().
mojoshader.c
--- a/mojoshader.c	Thu Apr 03 05:49:02 2008 -0400
+++ b/mojoshader.c	Thu Apr 03 05:50:53 2008 -0400
@@ -2646,6 +2646,13 @@
     ctx->loops--;
 } // state_ENDLOOP
 
+static void state_BREAKP(Context *ctx)
+{
+    const RegisterType regtype = ctx->source_args[0].regtype;
+    if (regtype != REGISTER_TYPE_PREDICATE)
+        fail(ctx, "BREAKP argument isn't predicate register");
+} // state_BREAKP
+
 
 // Lookup table for instruction opcodes...
 typedef struct
@@ -2771,7 +2778,7 @@
     INSTRUCTION(TEXLDD, 5, DSSSS, MOJOSHADER_TYPE_ANY),
     INSTRUCTION(SETP, 3, DSS, MOJOSHADER_TYPE_ANY),
     INSTRUCTION(TEXLDL, 3, DSS, MOJOSHADER_TYPE_ANY),
-    INSTRUCTION(BREAKP, 1, S, MOJOSHADER_TYPE_ANY),  // src
+    INSTRUCTION_STATE(BREAKP, 1, S, MOJOSHADER_TYPE_ANY),
 
     #undef INSTRUCTION
     #undef INSTRUCTION_STATE