diff options
author | Eric Anholt <eric@anholt.net> | 2010-08-04 22:57:08 -0700 |
---|---|---|
committer | Eric Anholt <eric@anholt.net> | 2010-08-05 09:17:45 -0700 |
commit | 8f6a0c9ed985267c2d202cf85d17ac04bddfb9d2 (patch) | |
tree | 29a5c104bac6bb6c0eeb52d2c297ef9a09f881a4 /src/mesa/program/ir_to_mesa.cpp | |
parent | 9de2c4fc8e620ffe7faecd499c82d9d38ec538a6 (diff) |
glsl2: Don't try to dump GLSL IR for a shader that didn't compile.
Diffstat (limited to 'src/mesa/program/ir_to_mesa.cpp')
-rw-r--r-- | src/mesa/program/ir_to_mesa.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/mesa/program/ir_to_mesa.cpp b/src/mesa/program/ir_to_mesa.cpp index f0e013369a..74996ae480 100644 --- a/src/mesa/program/ir_to_mesa.cpp +++ b/src/mesa/program/ir_to_mesa.cpp @@ -2646,9 +2646,11 @@ _mesa_glsl_compile_shader(GLcontext *ctx, struct gl_shader *shader) printf("GLSL source for shader %d:\n", shader->Name); printf("%s\n", shader->Source); - printf("GLSL IR for shader %d:\n", shader->Name); - _mesa_print_ir(shader->ir, NULL); - printf("\n\n"); + if (shader->CompileStatus) { + printf("GLSL IR for shader %d:\n", shader->Name); + _mesa_print_ir(shader->ir, NULL); + printf("\n\n"); + } } /* Retain any live IR, but trash the rest. */ |