[svn] Source swizzle fix. trunk
authoricculus
Sun, 16 Mar 2008 23:05:23 -0400
branchtrunk
changeset 26 ed1dc1eca8b2
parent 25 9664b0f62af6
child 27 3524701d26fb
[svn] Source swizzle fix.
d3d2glsl.c
--- a/d3d2glsl.c	Sun Mar 16 22:37:05 2008 -0400
+++ b/d3d2glsl.c	Sun Mar 16 23:05:23 2008 -0400
@@ -601,7 +601,7 @@
 
     char swizzle_str[6];
     int i = 0;
-    if (arg->swizzle != 0xE4)  // E4 == 11100100 ... 3 2 1 0. No swizzle.
+    if (arg->swizzle != 0xE4)  // 0xE4 == 11100100 ... 3 2 1 0. No swizzle.
     {
         static const char channel[] = { 'x', 'y', 'z', 'w' };
         swizzle_str[i++] = '.';
@@ -1433,7 +1433,7 @@
     info->token = ctx->tokens;
     info->regnum = (int) (token & 0x7ff);  // bits 0 through 10
     info->relative = (int) ((token >> 13) & 0x1); // bit 13
-    info->swizzle = (int) ((token >> 16) & 0xF); // bits 16 through 23
+    info->swizzle = (int) ((token >> 16) & 0xFF); // bits 16 through 23
     info->swizzle_x = (int) ((token >> 16) & 0x3); // bits 16 through 17
     info->swizzle_y = (int) ((token >> 18) & 0x3); // bits 18 through 19
     info->swizzle_z = (int) ((token >> 20) & 0x3); // bits 20 through 21