diff options
author | Eric Anholt <[email protected]> | 2014-02-20 18:00:23 -0800 |
---|---|---|
committer | Eric Anholt <[email protected]> | 2014-02-22 19:23:21 -0800 |
commit | 1e3bd9f9a5af90295788c5d71ea27c61eb7bd984 (patch) | |
tree | 04fe9e73cb62284f72031e76741a63b9b8a3d638 /src/glsl/ir.h | |
parent | f28c9208652143b4925bd97ce9823728c34d34a5 (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/glsl/ir.h')
-rw-r--r-- | src/glsl/ir.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/glsl/ir.h b/src/glsl/ir.h index e27e30adc80..5da61d5cfe5 100644 --- a/src/glsl/ir.h +++ b/src/glsl/ir.h @@ -106,6 +106,7 @@ public: /** ir_print_visitor helper for debugging. */ void print(void) const; + void fprint(FILE *f) const; virtual void accept(ir_visitor *) = 0; virtual ir_visitor_status accept(ir_hierarchical_visitor *) = 0; @@ -2353,7 +2354,7 @@ mode_string(const ir_variable *var); extern "C" { #endif /* __cplusplus */ -extern void _mesa_print_ir(struct exec_list *instructions, +extern void _mesa_print_ir(FILE *f, struct exec_list *instructions, struct _mesa_glsl_parse_state *state); #ifdef __cplusplus |