From: Keith Whitwell Date: Thu, 9 Aug 2007 10:22:29 +0000 (+0100) Subject: Quieten TGSI X-Git-Tag: 062012170305~17580^2~390^2~4466 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=17dde8dbb131a07f4a1109615fa80b60a7857a60;p=profile%2Fivi%2Fmesa.git Quieten TGSI --- diff --git a/src/mesa/pipe/tgsi/core/tgsi_dump.c b/src/mesa/pipe/tgsi/core/tgsi_dump.c index f1773ac..c3d796a 100644 --- a/src/mesa/pipe/tgsi/core/tgsi_dump.c +++ b/src/mesa/pipe/tgsi/core/tgsi_dump.c @@ -1277,6 +1277,8 @@ tgsi_dump( tgsi_parse_free( &parse ); - fclose( dump->file ); + if (dump->file != stderr && + dump->file != stdout) + fclose( dump->file ); } diff --git a/src/mesa/pipe/tgsi/mesa/mesa_to_tgsi.c b/src/mesa/pipe/tgsi/mesa/mesa_to_tgsi.c index 107b6bd..c3201ec 100644 --- a/src/mesa/pipe/tgsi/mesa/mesa_to_tgsi.c +++ b/src/mesa/pipe/tgsi/mesa/mesa_to_tgsi.c @@ -1,6 +1,8 @@ #include "tgsi_platform.h" #include "tgsi_mesa.h" +#define TGSI_DEBUG 0 + /* * Map mesa register file to SBIR register file. */ @@ -571,9 +573,11 @@ tgsi_mesa_compile_fp_program( preamble_size, TGSI_PROCESSOR_FRAGMENT ) ) { assert( i == program->Base.NumInstructions - 1 ); - tgsi_dump( - tokens, - 0/*TGSI_DUMP_VERBOSE | TGSI_DUMP_NO_IGNORED | TGSI_DUMP_NO_DEFAULT*/ ); + + if (TGSI_DEBUG) + tgsi_dump( + tokens, + 0/*TGSI_DUMP_VERBOSE | TGSI_DUMP_NO_IGNORED | TGSI_DUMP_NO_DEFAULT*/ ); break; } @@ -617,7 +621,8 @@ tgsi_mesa_compile_vp_program( 0, TGSI_PROCESSOR_VERTEX ) ) { assert( ii == program->Base.NumInstructions - 1 ); - tgsi_dump( tokens, TGSI_DUMP_NO_IGNORED | TGSI_DUMP_NO_DEFAULT ); + if (TGSI_DEBUG) + tgsi_dump( tokens, TGSI_DUMP_NO_IGNORED | TGSI_DUMP_NO_DEFAULT ); break; }