Mesa (master): r300: Debug messages are written to stderr, so fflush that
Nicolai Hähnle
nh at kemper.freedesktop.org
Thu Aug 27 16:20:29 UTC 2009
Module: Mesa
Branch: master
Commit: eb6e281966f603fff4ec525250b4b22c9f90f98b
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=eb6e281966f603fff4ec525250b4b22c9f90f98b
Author: Nicolai Hähnle <nhaehnle at gmail.com>
Date: Thu Aug 27 17:12:22 2009 +0200
r300: Debug messages are written to stderr, so fflush that
Signed-off-by: Nicolai Hähnle <nhaehnle at gmail.com>
---
src/mesa/drivers/dri/r300/compiler/r3xx_fragprog.c | 4 ++--
src/mesa/drivers/dri/r300/compiler/r3xx_vertprog.c | 8 ++++----
.../dri/r300/compiler/radeon_program_pair.c | 2 +-
src/mesa/drivers/dri/r300/r300_fragprog_common.c | 4 ++--
src/mesa/drivers/dri/r300/r300_vertprog.c | 2 +-
5 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/src/mesa/drivers/dri/r300/compiler/r3xx_fragprog.c b/src/mesa/drivers/dri/r300/compiler/r3xx_fragprog.c
index d39b82b..76c3a7e 100644
--- a/src/mesa/drivers/dri/r300/compiler/r3xx_fragprog.c
+++ b/src/mesa/drivers/dri/r300/compiler/r3xx_fragprog.c
@@ -106,7 +106,7 @@ void r3xx_compile_fragment_program(struct r300_fragment_program_compiler* c)
if (c->Base.Debug) {
_mesa_printf("Fragment Program: After native rewrite:\n");
rc_print_program(&c->Base.Program);
- fflush(stdout);
+ fflush(stderr);
}
if (c->is_r500) {
@@ -128,7 +128,7 @@ void r3xx_compile_fragment_program(struct r300_fragment_program_compiler* c)
if (c->Base.Debug) {
_mesa_printf("Compiler: after NqSSA-DCE:\n");
rc_print_program(&c->Base.Program);
- fflush(stdout);
+ fflush(stderr);
}
if (c->is_r500) {
diff --git a/src/mesa/drivers/dri/r300/compiler/r3xx_vertprog.c b/src/mesa/drivers/dri/r300/compiler/r3xx_vertprog.c
index 6c1a038..93a5161 100644
--- a/src/mesa/drivers/dri/r300/compiler/r3xx_vertprog.c
+++ b/src/mesa/drivers/dri/r300/compiler/r3xx_vertprog.c
@@ -603,7 +603,7 @@ void r3xx_compile_vertex_program(struct r300_vertex_program_compiler* compiler)
if (compiler->Base.Debug) {
fprintf(stderr, "Vertex program after native rewrite:\n");
rc_print_program(&compiler->Base.Program);
- fflush(stdout);
+ fflush(stderr);
}
{
@@ -620,7 +620,7 @@ void r3xx_compile_vertex_program(struct r300_vertex_program_compiler* compiler)
if (compiler->Base.Debug) {
fprintf(stderr, "Vertex program after source conflict resolve:\n");
rc_print_program(&compiler->Base.Program);
- fflush(stdout);
+ fflush(stderr);
}
{
@@ -637,7 +637,7 @@ void r3xx_compile_vertex_program(struct r300_vertex_program_compiler* compiler)
if (compiler->Base.Debug) {
fprintf(stderr, "Vertex program after NQSSADCE:\n");
rc_print_program(&compiler->Base.Program);
- fflush(stdout);
+ fflush(stderr);
}
}
@@ -649,7 +649,7 @@ void r3xx_compile_vertex_program(struct r300_vertex_program_compiler* compiler)
compiler->code->OutputsWritten = compiler->Base.Program.OutputsWritten;
if (compiler->Base.Debug) {
- printf("Final vertex program code:\n");
+ fprintf(stderr, "Final vertex program code:\n");
r300_vertex_program_dump(compiler->code);
}
}
diff --git a/src/mesa/drivers/dri/r300/compiler/radeon_program_pair.c b/src/mesa/drivers/dri/r300/compiler/radeon_program_pair.c
index 48616ac..4c26db5 100644
--- a/src/mesa/drivers/dri/r300/compiler/radeon_program_pair.c
+++ b/src/mesa/drivers/dri/r300/compiler/radeon_program_pair.c
@@ -549,7 +549,7 @@ static void emit_all_tex(struct pair_state *s)
if (s->Compiler->Base.Debug) {
_mesa_printf(" ");
_mesa_print_instruction(inst);
- fflush(stdout);
+ fflush(stderr);
}
struct radeon_pair_texture_instruction rpti;
diff --git a/src/mesa/drivers/dri/r300/r300_fragprog_common.c b/src/mesa/drivers/dri/r300/r300_fragprog_common.c
index 6674efc..e1dc231 100644
--- a/src/mesa/drivers/dri/r300/r300_fragprog_common.c
+++ b/src/mesa/drivers/dri/r300/r300_fragprog_common.c
@@ -212,10 +212,10 @@ static void translate_fragment_program(GLcontext *ctx, struct r300_fragment_prog
compiler.AllocateHwInputs = &allocate_hw_inputs;
if (compiler.Base.Debug) {
- fflush(stdout);
+ fflush(stderr);
_mesa_printf("Fragment Program: Initial program:\n");
_mesa_print_program(&cont->Base.Base);
- fflush(stdout);
+ fflush(stderr);
}
rc_mesa_to_rc_program(&compiler.Base, &cont->Base.Base);
diff --git a/src/mesa/drivers/dri/r300/r300_vertprog.c b/src/mesa/drivers/dri/r300/r300_vertprog.c
index 862f212..9fe6c18 100644
--- a/src/mesa/drivers/dri/r300/r300_vertprog.c
+++ b/src/mesa/drivers/dri/r300/r300_vertprog.c
@@ -225,7 +225,7 @@ static struct r300_vertex_program *build_program(GLcontext *ctx,
if (compiler.Base.Debug) {
fprintf(stderr, "Initial vertex program:\n");
_mesa_print_program(&vp->Base->Base);
- fflush(stdout);
+ fflush(stderr);
}
if (mesa_vp->IsPositionInvariant) {
More information about the mesa-commit
mailing list