More explicit testing for coissue bit conditions. trunk
authorRyan C. Gordon <icculus@icculus.org>
Sun, 20 Apr 2008 15:50:29 -0400
branchtrunk
changeset 157 b94a6f5031be
parent 156 c2a933029495
child 158 f8b5c2b29569
More explicit testing for coissue bit conditions. I _still_ don't know what this does or how to express it in d3d asm, though!
mojoshader.c
--- a/mojoshader.c	Sun Apr 20 03:24:27 2008 -0400
+++ b/mojoshader.c	Sun Apr 20 15:50:29 2008 -0400
@@ -3989,8 +3989,15 @@
     if ((token & 0x80000000) != 0)
         return fail(ctx, "instruction token high bit must be zero.");  // so says msdn.
 
-    if (coissue)  // !!! FIXME: I'm not sure what this means, yet.
+    if (coissue)
+    {
+        if (!shader_is_pixel(ctx))
+            return fail(ctx, "coissue instruction on non-pixel shader");
+        else if (shader_version_atleast(ctx, 2, 0))
+            return fail(ctx, "coissue instruction in Shader Model >= 2.0");
+        // !!! FIXME: I'm not sure what this actually means, yet.
         return fail(ctx, "coissue instructions unsupported");
+    } // if
 
     if ((ctx->shader_type & instruction->shader_types) == 0)
     {