d3d2glsl.c
branchtrunk
changeset 26 ed1dc1eca8b2
parent 25 9664b0f62af6
child 27 3524701d26fb
equal deleted inserted replaced
25:9664b0f62af6 26:ed1dc1eca8b2
   599         return "";
   599         return "";
   600     } // if
   600     } // if
   601 
   601 
   602     char swizzle_str[6];
   602     char swizzle_str[6];
   603     int i = 0;
   603     int i = 0;
   604     if (arg->swizzle != 0xE4)  // E4 == 11100100 ... 3 2 1 0. No swizzle.
   604     if (arg->swizzle != 0xE4)  // 0xE4 == 11100100 ... 3 2 1 0. No swizzle.
   605     {
   605     {
   606         static const char channel[] = { 'x', 'y', 'z', 'w' };
   606         static const char channel[] = { 'x', 'y', 'z', 'w' };
   607         swizzle_str[i++] = '.';
   607         swizzle_str[i++] = '.';
   608         swizzle_str[i++] = channel[arg->swizzle_x];
   608         swizzle_str[i++] = channel[arg->swizzle_x];
   609         swizzle_str[i++] = channel[arg->swizzle_y];
   609         swizzle_str[i++] = channel[arg->swizzle_y];
  1431     const int reserved2 = (int) ((token >> 31) & 0x1); // bit 31
  1431     const int reserved2 = (int) ((token >> 31) & 0x1); // bit 31
  1432 
  1432 
  1433     info->token = ctx->tokens;
  1433     info->token = ctx->tokens;
  1434     info->regnum = (int) (token & 0x7ff);  // bits 0 through 10
  1434     info->regnum = (int) (token & 0x7ff);  // bits 0 through 10
  1435     info->relative = (int) ((token >> 13) & 0x1); // bit 13
  1435     info->relative = (int) ((token >> 13) & 0x1); // bit 13
  1436     info->swizzle = (int) ((token >> 16) & 0xF); // bits 16 through 23
  1436     info->swizzle = (int) ((token >> 16) & 0xFF); // bits 16 through 23
  1437     info->swizzle_x = (int) ((token >> 16) & 0x3); // bits 16 through 17
  1437     info->swizzle_x = (int) ((token >> 16) & 0x3); // bits 16 through 17
  1438     info->swizzle_y = (int) ((token >> 18) & 0x3); // bits 18 through 19
  1438     info->swizzle_y = (int) ((token >> 18) & 0x3); // bits 18 through 19
  1439     info->swizzle_z = (int) ((token >> 20) & 0x3); // bits 20 through 21
  1439     info->swizzle_z = (int) ((token >> 20) & 0x3); // bits 20 through 21
  1440     info->swizzle_w = (int) ((token >> 22) & 0x3); // bits 22 through 23
  1440     info->swizzle_w = (int) ((token >> 22) & 0x3); // bits 22 through 23
  1441     info->src_mod = (int) ((token >> 24) & 0xF); // bits 24 through 27
  1441     info->src_mod = (int) ((token >> 24) & 0xF); // bits 24 through 27