summaryrefslogtreecommitdiffstats
path: root/src/mesa/pipe
diff options
context:
space:
mode:
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;
}