gallium: Print texture target for short dumps.
authorMichal Krol <michal@tungstengraphics.com>
Tue, 26 Feb 2008 19:32:42 +0000 (20:32 +0100)
committerMichal Krol <michal@tungstengraphics.com>
Tue, 26 Feb 2008 21:10:52 +0000 (22:10 +0100)
src/gallium/auxiliary/tgsi/util/tgsi_dump.c

index ff74e6117c4de77a222864fb51c413a0b9e83b41..59be14a748c7a721741e90b8152ce8313b5ed449 100644 (file)
@@ -664,6 +664,19 @@ static const char *TGSI_TEXTURES[] =
    "TEXTURE_SHADOWRECT"
 };
 
+static const char *TGSI_TEXTURES_SHORT[] =
+{
+   "UNKNOWN",
+   "1D",
+   "2D",
+   "3D",
+   "CUBE",
+   "RECT",
+   "SHADOW1D",
+   "SHADOW2D",
+   "SHADOWRECT"
+};
+
 static const char *TGSI_SRC_REGISTER_EXTS[] =
 {
    "SRC_REGISTER_EXT_TYPE_SWZ",
@@ -1037,6 +1050,11 @@ dump_instruction_short(
       first_reg = FALSE;
    }
 
+   if (inst->InstructionExtTexture.Texture != TGSI_TEXTURE_UNKNOWN) {
+      TXT( ", " );
+      ENM( inst->InstructionExtTexture.Texture, TGSI_TEXTURES_SHORT );
+   }
+
    switch( inst->Instruction.Opcode ) {
    case TGSI_OPCODE_IF:
    case TGSI_OPCODE_ELSE: