diff options
author | Kenneth Graunke <[email protected]> | 2014-03-01 00:11:18 -0800 |
---|---|---|
committer | Kenneth Graunke <[email protected]> | 2014-03-02 13:37:09 -0800 |
commit | c95ec27a4afbc43a226c3be2892598500ab906f7 (patch) | |
tree | 0d50c64f57f1847677fff4664c8175ff7994c8f7 /src/mesa/program | |
parent | 3f37dd913f3461fb197e878739a269e639852667 (diff) |
mesa: Move MESA_GLSL=dump output to stderr.
i965 recently moved debug printfs to use stderr, including ones which
trigger on MESA_GLSL=dump. This resulted in scrambled output.
For drivers using ir_to_mesa, print_program was already using stderr,
yet all the code around it was using stdout.
Signed-off-by: Kenneth Graunke <[email protected]>
Reviewed-by: Brian Paul <[email protected]>
Reviewed-by: Matt Turner <[email protected]>
Diffstat (limited to 'src/mesa/program')
-rw-r--r-- | src/mesa/program/ir_to_mesa.cpp | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/src/mesa/program/ir_to_mesa.cpp b/src/mesa/program/ir_to_mesa.cpp index 06df41f897a..9919874a668 100644 --- a/src/mesa/program/ir_to_mesa.cpp +++ b/src/mesa/program/ir_to_mesa.cpp @@ -2918,16 +2918,17 @@ get_mesa_program(struct gl_context *ctx, set_branchtargets(&v, mesa_instructions, num_instructions); if (ctx->Shader.Flags & GLSL_DUMP) { - printf("\n"); - printf("GLSL IR for linked %s program %d:\n", target_string, - shader_program->Name); - _mesa_print_ir(stdout, shader->ir, NULL); - printf("\n"); - printf("\n"); - printf("Mesa IR for linked %s program %d:\n", target_string, - shader_program->Name); + fprintf(stderr, "\n"); + fprintf(stderr, "GLSL IR for linked %s program %d:\n", target_string, + shader_program->Name); + _mesa_print_ir(stderr, shader->ir, NULL); + fprintf(stderr, "\n"); + fprintf(stderr, "\n"); + fprintf(stderr, "Mesa IR for linked %s program %d:\n", target_string, + shader_program->Name); print_program(mesa_instructions, mesa_instruction_annotation, num_instructions); + fflush(stderr); } prog->Instructions = mesa_instructions; @@ -3097,12 +3098,12 @@ _mesa_glsl_link_shader(struct gl_context *ctx, struct gl_shader_program *prog) if (ctx->Shader.Flags & GLSL_DUMP) { if (!prog->LinkStatus) { - printf("GLSL shader program %d failed to link\n", prog->Name); + fprintf(stderr, "GLSL shader program %d failed to link\n", prog->Name); } if (prog->InfoLog && prog->InfoLog[0] != 0) { - printf("GLSL shader program %d info log:\n", prog->Name); - printf("%s\n", prog->InfoLog); + fprintf(stderr, "GLSL shader program %d info log:\n", prog->Name); + fprintf(stderr, "%s\n", prog->InfoLog); } } } |