summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers
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/drivers
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/drivers')
-rw-r--r--src/mesa/drivers/dri/i965/brw_program.c2
-rw-r--r--src/mesa/drivers/dri/i965/brw_shader.cpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_program.c b/src/mesa/drivers/dri/i965/brw_program.c
index 43d29fd4661..4a86e802089 100644
--- a/src/mesa/drivers/dri/i965/brw_program.c
+++ b/src/mesa/drivers/dri/i965/brw_program.c
@@ -593,7 +593,7 @@ brw_dump_ir(struct brw_context *brw, const char *stage,
{
if (shader_prog) {
printf("GLSL IR for native %s shader %d:\n", stage, shader_prog->Name);
- _mesa_print_ir(shader->ir, NULL);
+ _mesa_print_ir(stdout, shader->ir, NULL);
printf("\n\n");
} else {
printf("ARB_%s_program %d ir for native %s shader\n",
diff --git a/src/mesa/drivers/dri/i965/brw_shader.cpp b/src/mesa/drivers/dri/i965/brw_shader.cpp
index 08ceca1571a..48ad8ac12d6 100644
--- a/src/mesa/drivers/dri/i965/brw_shader.cpp
+++ b/src/mesa/drivers/dri/i965/brw_shader.cpp
@@ -255,7 +255,7 @@ brw_link_shader(struct gl_context *ctx, struct gl_shader_program *shProg)
printf("GLSL IR for linked %s program %d:\n",
_mesa_shader_stage_to_string(shader->base.Stage),
shProg->Name);
- _mesa_print_ir(shader->base.ir, NULL);
+ _mesa_print_ir(stdout, shader->base.ir, NULL);
printf("\n");
}
}