From 1e3bd9f9a5af90295788c5d71ea27c61eb7bd984 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Thu, 20 Feb 2014 18:00:23 -0800 Subject: glsl: Add a file argument to the IR printer. While we want to be able to print to stdout for glsl_compiler, for debugging drivers we want to be able to dump to stderr because that's where other driver debug (like LIBGL_DEBUG) tends to go, and because some apps actually close stdout to shut up their own messages (such as the X Server, or NWN). Reviewed-by: Ian Romanick Reviewed-by: Kenneth Graunke Reviewed-by: Matt Turner --- src/mesa/main/shaderapi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/mesa/main/shaderapi.c') diff --git a/src/mesa/main/shaderapi.c b/src/mesa/main/shaderapi.c index 3dc073ff3f9..cbf83900d72 100644 --- a/src/mesa/main/shaderapi.c +++ b/src/mesa/main/shaderapi.c @@ -855,7 +855,7 @@ compile_shader(struct gl_context *ctx, GLuint shaderObj) if (ctx->Shader.Flags & GLSL_DUMP) { if (sh->CompileStatus) { printf("GLSL IR for shader %d:\n", sh->Name); - _mesa_print_ir(sh->ir, NULL); + _mesa_print_ir(stdout, sh->ir, NULL); printf("\n\n"); } else { printf("GLSL shader %d failed to compile.\n", sh->Name); -- cgit v1.2.3