summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorNeil Roberts <neil@linux.intel.com>2015-06-26 17:54:15 +0100
committerEmil Velikov <emil.l.velikov@gmail.com>2015-07-08 16:09:27 +0100
commit5e9254194594b863f55f4efcafca7fbb5b21ec8f (patch)
tree84747dbb631f2efc51f9d3d00f239213d649014e /src
parent6b6e14ac35750e0a7f8194923877a842f9a43e3f (diff)
i965: Don't try to print the GLSL IR if it has been freed
Since commit 104c8fc2c2aa5621261f8 the GLSL IR will be freed if NIR is being used. This was causing it to segfault if INTEL_DEBUG=wm is set. This patch just makes it avoid dumping the GLSL IR in that case. Reviewed-by: Ben Widawsky <ben@bwidawsk.net> Reviewed-by: Tapani Pälli <tapani.palli@intel.com> (cherry picked from commit c0ca6c30eaf7f488f154c462a01a8945cb4a3103)
Diffstat (limited to 'src')
-rw-r--r--src/mesa/drivers/dri/i965/brw_program.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_program.c b/src/mesa/drivers/dri/i965/brw_program.c
index e5c0d3c7604..3b424f5d902 100644
--- a/src/mesa/drivers/dri/i965/brw_program.c
+++ b/src/mesa/drivers/dri/i965/brw_program.c
@@ -599,10 +599,13 @@ brw_dump_ir(const char *stage, struct gl_shader_program *shader_prog,
struct gl_shader *shader, struct gl_program *prog)
{
if (shader_prog) {
- fprintf(stderr,
- "GLSL IR for native %s shader %d:\n", stage, shader_prog->Name);
- _mesa_print_ir(stderr, shader->ir, NULL);
- fprintf(stderr, "\n\n");
+ if (shader->ir) {
+ fprintf(stderr,
+ "GLSL IR for native %s shader %d:\n",
+ stage, shader_prog->Name);
+ _mesa_print_ir(stderr, shader->ir, NULL);
+ fprintf(stderr, "\n\n");
+ }
} else {
fprintf(stderr, "ARB_%s_program %d ir for native %s shader\n",
stage, prog->Id, stage);