summaryrefslogtreecommitdiffstats
path: root/src/mesa/pipe
diff options
context:
space:
mode:
authorKeith Whitwell <[email protected]>2007-08-09 11:22:29 +0100
committerKeith Whitwell <[email protected]>2007-08-09 11:23:18 +0100
commit17dde8dbb131a07f4a1109615fa80b60a7857a60 (patch)
treec7c67f7d9f6c3df641a98ada2315199c90ffacc6 /src/mesa/pipe
parent4e517f9b0aed27b49c6050a3d7c279efc625f352 (diff)
Quieten TGSI
Diffstat (limited to 'src/mesa/pipe')
-rw-r--r--src/mesa/pipe/tgsi/core/tgsi_dump.c4
-rw-r--r--src/mesa/pipe/tgsi/mesa/mesa_to_tgsi.c13
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;
}