mojoshader.c
changeset 491 bcc3c215807a
parent 476 def04fdc464a
child 493 e2c930ab84b5
--- a/mojoshader.c	Wed Dec 10 05:04:52 2008 -0500
+++ b/mojoshader.c	Wed Dec 10 05:05:55 2008 -0500
@@ -895,7 +895,7 @@
 
     char swizzle_str[6];
     int i = 0;
-    const int scalar = scalar_register(arg->regtype, arg->regnum);
+    const int scalar = scalar_register(ctx->shader_type, arg->regtype, arg->regnum);
     if (!scalar && !no_swizzle(arg->swizzle))
     {
         swizzle_str[i++] = '.';
@@ -952,7 +952,7 @@
 
     char writemask_str[6];
     int i = 0;
-    const int scalar = scalar_register(arg->regtype, arg->regnum);
+    const int scalar = scalar_register(ctx->shader_type, arg->regtype, arg->regnum);
     if (!scalar && !writemask_xyzw(arg->writemask))
     {
         writemask_str[i++] = '.';
@@ -1723,7 +1723,7 @@
                                                        sizeof (regnum_str));
     char writemask_str[6];
     int i = 0;
-    const int scalar = scalar_register(arg->regtype, arg->regnum);
+    const int scalar = scalar_register(ctx->shader_type, arg->regtype, arg->regnum);
     if (!scalar && !writemask_xyzw(arg->writemask))
     {
         writemask_str[i++] = '.';
@@ -1890,7 +1890,7 @@
     } // if
 
     char swiz_str[6] = { '\0' };
-    if (!scalar_register(arg->regtype, arg->regnum))
+    if (!scalar_register(ctx->shader_type, arg->regtype, arg->regnum))
     {
         make_GLSL_swizzle_string(swiz_str, sizeof (swiz_str),
                                  arg->swizzle, writemask);
@@ -2962,7 +2962,7 @@
                 return;
         } // switch
 
-        assert(!scalar_register(samp_arg->regtype, samp_arg->regnum));
+        assert(!scalar_register(ctx->shader_type, samp_arg->regtype, samp_arg->regnum));
         char swiz_str[6] = { '\0' };
         make_GLSL_swizzle_string(swiz_str, sizeof (swiz_str),
                                  samp_arg->swizzle, ctx->dest_arg.writemask);
@@ -3381,7 +3381,7 @@
         } // if
     } // if
 
-    const int scalar = scalar_register(arg->regtype, arg->regnum);
+    const int scalar = scalar_register(ctx->shader_type, arg->regtype, arg->regnum);
     if (!scalar && !no_swizzle(arg->swizzle))
     {
         swizzle_str[i++] = '.';
@@ -3469,7 +3469,7 @@
 
     char writemask_str[6];
     int i = 0;
-    const int scalar = scalar_register(arg->regtype, arg->regnum);
+    const int scalar = scalar_register(ctx->shader_type, arg->regtype, arg->regnum);
     if (!scalar && !writemask_xyzw(arg->writemask))
     {
         writemask_str[i++] = '.';
@@ -4929,7 +4929,7 @@
     info->regtype = (RegisterType) (((token >> 28) & 0x7) | ((token >> 8) & 0x18));  // bits 28-30, 11-12
 
     int writemask;
-    if (scalar_register(info->regtype, info->regnum))
+    if (scalar_register(ctx->shader_type, info->regtype, info->regnum))
         writemask = 0x1;  // just x.
     else
         writemask = info->orig_writemask;