From 17dde8dbb131a07f4a1109615fa80b60a7857a60 Mon Sep 17 00:00:00 2001 From: Keith Whitwell Date: Thu, 9 Aug 2007 11:22:29 +0100 Subject: Quieten TGSI --- src/mesa/pipe/tgsi/core/tgsi_dump.c | 4 +++- src/mesa/pipe/tgsi/mesa/mesa_to_tgsi.c | 13 +++++++++---- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/src/mesa/pipe/tgsi/core/tgsi_dump.c b/src/mesa/pipe/tgsi/core/tgsi_dump.c index f1773ac9080..c3d796afee5 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 107b6bd2a36..c3201ece2cc 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; } -- cgit v1.2.3