fix logic for printing extended swizzles
authorBrian <brian.paul@tungstengraphics.com>
Mon, 15 Oct 2007 17:48:20 +0000 (11:48 -0600)
committerBrian <brian.paul@tungstengraphics.com>
Mon, 15 Oct 2007 17:48:20 +0000 (11:48 -0600)
src/mesa/pipe/tgsi/exec/tgsi_dump.c

index 76241748c725baf14dbdbe1da84b26801e5f63f6..7fd503d81b7bbb9a302d1deb655d2af0aeb1283a 100755 (executable)
@@ -910,20 +910,22 @@ dump_instruction_short(
       SID( src->SrcRegister.Index );
       CHR( ']' );
 
-      if (src->SrcRegisterExtSwz.ExtSwizzleX != TGSI_EXTSWIZZLE_X ||
-          src->SrcRegisterExtSwz.ExtSwizzleY != TGSI_EXTSWIZZLE_Y ||
-          src->SrcRegisterExtSwz.ExtSwizzleZ != TGSI_EXTSWIZZLE_Z ||
-          src->SrcRegisterExtSwz.ExtSwizzleW != TGSI_EXTSWIZZLE_W) {
-         CHR( '.' );
-         ENM( src->SrcRegisterExtSwz.ExtSwizzleX, TGSI_EXTSWIZZLES_SHORT );
-         ENM( src->SrcRegisterExtSwz.ExtSwizzleY, TGSI_EXTSWIZZLES_SHORT );
-         ENM( src->SrcRegisterExtSwz.ExtSwizzleZ, TGSI_EXTSWIZZLES_SHORT );
-         ENM( src->SrcRegisterExtSwz.ExtSwizzleW, TGSI_EXTSWIZZLES_SHORT );
+      if (src->SrcRegister.Extended) {
+         if (src->SrcRegisterExtSwz.ExtSwizzleX != TGSI_EXTSWIZZLE_X ||
+             src->SrcRegisterExtSwz.ExtSwizzleY != TGSI_EXTSWIZZLE_Y ||
+             src->SrcRegisterExtSwz.ExtSwizzleZ != TGSI_EXTSWIZZLE_Z ||
+             src->SrcRegisterExtSwz.ExtSwizzleW != TGSI_EXTSWIZZLE_W) {
+            CHR( '.' );
+            ENM( src->SrcRegisterExtSwz.ExtSwizzleX, TGSI_EXTSWIZZLES_SHORT );
+            ENM( src->SrcRegisterExtSwz.ExtSwizzleY, TGSI_EXTSWIZZLES_SHORT );
+            ENM( src->SrcRegisterExtSwz.ExtSwizzleZ, TGSI_EXTSWIZZLES_SHORT );
+            ENM( src->SrcRegisterExtSwz.ExtSwizzleW, TGSI_EXTSWIZZLES_SHORT );
+         }
       }
-      if( src->SrcRegister.SwizzleX != TGSI_SWIZZLE_X ||
-            src->SrcRegister.SwizzleY != TGSI_SWIZZLE_Y ||
-            src->SrcRegister.SwizzleZ != TGSI_SWIZZLE_Z ||
-            src->SrcRegister.SwizzleW != TGSI_SWIZZLE_W ) {
+      else if( src->SrcRegister.SwizzleX != TGSI_SWIZZLE_X ||
+               src->SrcRegister.SwizzleY != TGSI_SWIZZLE_Y ||
+               src->SrcRegister.SwizzleZ != TGSI_SWIZZLE_Z ||
+               src->SrcRegister.SwizzleW != TGSI_SWIZZLE_W ) {
          CHR( '.' );
          ENM( src->SrcRegister.SwizzleX, TGSI_SWIZZLES_SHORT );
          ENM( src->SrcRegister.SwizzleY, TGSI_SWIZZLES_SHORT );