SRCMOD_NOT apparently is allowed in SM3 for predicate registers...?!
authorRyan C. Gordon <icculus@icculus.org>
Wed, 10 Dec 2008 05:21:21 -0500
changeset 494 309f60d7cf8c
parent 493 e2c930ab84b5
child 495 93ede2fba3c6
SRCMOD_NOT apparently is allowed in SM3 for predicate registers...?!
mojoshader.c
--- a/mojoshader.c	Wed Dec 10 05:10:08 2008 -0500
+++ b/mojoshader.c	Wed Dec 10 05:21:21 2008 -0500
@@ -5284,11 +5284,18 @@
         case SRCMOD_X2:
         case SRCMOD_DZ:
         case SRCMOD_DW:
-        case SRCMOD_NOT:
             if (shader_version_atleast(ctx, 2, 0))
                 return fail(ctx, "illegal source mod for this Shader Model.");
             break;
 
+        case SRCMOD_NOT:  // !!! FIXME: I _think_ this is right...
+            if (shader_version_atleast(ctx, 2, 0))
+            {
+                if (info->regtype != REG_TYPE_PREDICATE)
+                    return fail(ctx, "NOT only allowed on predicate register.");
+            } // if
+            break;
+
         default:
             return fail(ctx, "Unknown source modifier");
     } // switch