mojoshader_internal.h
changeset 491 bcc3c215807a
parent 484 dfce8e965115
child 493 e2c930ab84b5
--- a/mojoshader_internal.h	Wed Dec 10 05:04:52 2008 -0500
+++ b/mojoshader_internal.h	Wed Dec 10 05:05:55 2008 -0500
@@ -227,13 +227,13 @@
 } DestArgInfo;
 
 
-static inline int scalar_register(const RegisterType regtype, const int regnum)
+static inline int scalar_register(const MOJOSHADER_shaderType shader_type,
+                                  const RegisterType regtype, const int regnum)
 {
     switch (regtype)
     {
         case REG_TYPE_DEPTHOUT:
         case REG_TYPE_CONSTBOOL:
-        case REG_TYPE_PREDICATE:
         case REG_TYPE_LOOP:
             return 1;
 
@@ -242,6 +242,9 @@
                 return 1;
             return 0;
 
+        case REG_TYPE_PREDICATE:
+            return (shader_type == MOJOSHADER_TYPE_PIXEL) ? 1 : 0;
+
         default: break;
     } // switch