summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/shaderapi.c
diff options
context:
space:
mode:
authorEric Anholt <[email protected]>2014-02-20 18:00:23 -0800
committerEric Anholt <[email protected]>2014-02-22 19:23:21 -0800
commit1e3bd9f9a5af90295788c5d71ea27c61eb7bd984 (patch)
tree04fe9e73cb62284f72031e76741a63b9b8a3d638 /src/mesa/main/shaderapi.c
parentf28c9208652143b4925bd97ce9823728c34d34a5 (diff)
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 <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Matt Turner <[email protected]>
Diffstat (limited to 'src/mesa/main/shaderapi.c')
-rw-r--r--src/mesa/main/shaderapi.c2
1 files changed, 1 insertions, 1 deletions
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);