added missing OPCODE_ARL to TGSI_OPCODES[], added sanity check assertion
authorBrian <brian.paul@tungstengraphics.com>
Tue, 24 Jul 2007 19:48:20 +0000 (13:48 -0600)
committerBrian <brian.paul@tungstengraphics.com>
Tue, 24 Jul 2007 19:48:20 +0000 (13:48 -0600)
src/mesa/pipe/tgsi/core/tgsi_dump.c

index 0345fd93f7fc34f1b039b4828daa57ee2dda6447..33a898ea042f1da6aa4209e4d20cf15698025eab 100644 (file)
@@ -179,6 +179,7 @@ static const char *TGSI_IMMS[] =
 
 static const char *TGSI_OPCODES[] =
 {
+   "OPCODE_ARL",
    "OPCODE_MOV",
    "OPCODE_LIT",
    "OPCODE_RCP",
@@ -404,7 +405,7 @@ tgsi_dump(
       static GLuint counter = 0;
       char buffer[64];
 
-      sprintf( buffer, "sbir-dump-%.4u.txt", counter++ );
+      sprintf( buffer, "tgsi-dump-%.4u.txt", counter++ );
       dump.file = fopen( buffer, "wt" );
 #else
       dump.file = stderr;
@@ -412,9 +413,12 @@ tgsi_dump(
 #endif
    }
 
+   /* sanity check */
+   assert(strcmp(TGSI_OPCODES[TGSI_OPCODE_CONT], "OPCODE_CONT") == 0);
+
    tgsi_parse_init( &parse, tokens );
 
-   TXT( "sbir-dump" );
+   TXT( "tgsi-dump begin" );
 
    CHR( '\n' );
    TXT( "\nMajorVersion: " );
@@ -868,6 +872,8 @@ tgsi_dump(
       }
    }
 
+   TXT( "\ntgsi-dump end\n" );
+
    tgsi_parse_free( &parse );
 
    fclose( dump.file );