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 <ian.d.romanick@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Matt Turner <mattst88@gmail.com>
This commit is contained in:
Eric Anholt
2014-02-20 18:00:23 -08:00
parent f28c920865
commit 1e3bd9f9a5
11 changed files with 127 additions and 118 deletions
+1 -1
View File
@@ -400,7 +400,7 @@ optimize_split_arrays(exec_list *instructions, bool linked)
visit_list_elements(&split, instructions);
if (debug)
_mesa_print_ir(instructions, NULL);
_mesa_print_ir(stdout, instructions, NULL);
ralloc_free(mem_ctx);