tgsi: More debug printing on sanity check error
authorJakob Bornecrantz <jakob@tungstengraphics.com>
Wed, 17 Sep 2008 16:08:03 +0000 (18:08 +0200)
committerJakob Bornecrantz <jakob@tungstengraphics.com>
Wed, 17 Sep 2008 16:13:17 +0000 (18:13 +0200)
src/mesa/state_tracker/st_mesa_to_tgsi.c

index e822c8ac61bbd40e1bc709d6e801784de6f9322a..49abee15a1755acf66f3672e255de46913fd43e8 100644 (file)
@@ -984,9 +984,12 @@ tgsi_translate_mesa_program(
 
 #if DEBUG
    if(!tgsi_sanity_check(tokens)) {
-      //debug_printf("Due to sanity check failure the following shader program is invalid\n");
+      debug_printf("Due to sanity check failure(s) above the following shader program is invalid:\n");
+      debug_printf("\nOriginal program:\n%s", program->String);
+      debug_printf("\nMesa program:\n");
+      _mesa_print_program(program);
+      debug_printf("\nTGSI program:\n");
       tgsi_dump(tokens, 0);
-
       assert(0);
    }
 #endif