Mesa (master): ir_to_mesa: Dump linked GLSL IR before returning with an error
Ian Romanick
idr at kemper.freedesktop.org
Sat Feb 12 00:46:33 UTC 2011
Module: Mesa
Branch: master
Commit: d37a3d110aba06095e2c17fe3dbd333d65358e01
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=d37a3d110aba06095e2c17fe3dbd333d65358e01
Author: Ian Romanick <ian.d.romanick at intel.com>
Date: Tue Feb 8 16:59:43 2011 -0800
ir_to_mesa: Dump linked GLSL IR before returning with an error
This helps debug cases where the linked IR contains things, such as
if-statements, that should have been lowered.
---
src/mesa/program/ir_to_mesa.cpp | 13 ++++++++-----
1 files changed, 8 insertions(+), 5 deletions(-)
diff --git a/src/mesa/program/ir_to_mesa.cpp b/src/mesa/program/ir_to_mesa.cpp
index 7f905ae..f4d89f2 100644
--- a/src/mesa/program/ir_to_mesa.cpp
+++ b/src/mesa/program/ir_to_mesa.cpp
@@ -2973,6 +2973,14 @@ get_mesa_program(struct gl_context *ctx,
break;
}
+ if (ctx->Shader.Flags & GLSL_DUMP) {
+ printf("\n");
+ printf("GLSL IR for linked %s program %d:\n", target_string,
+ shader_program->Name);
+ _mesa_print_ir(shader->ir, NULL);
+ printf("\n");
+ }
+
if (!shader_program->LinkStatus) {
free(mesa_instructions);
_mesa_reference_program(ctx, &shader->Program, NULL);
@@ -2983,11 +2991,6 @@ get_mesa_program(struct gl_context *ctx,
if (ctx->Shader.Flags & GLSL_DUMP) {
printf("\n");
- printf("GLSL IR for linked %s program %d:\n", target_string,
- shader_program->Name);
- _mesa_print_ir(shader->ir, NULL);
- printf("\n");
- printf("\n");
printf("Mesa IR for linked %s program %d:\n", target_string,
shader_program->Name);
print_program(mesa_instructions, mesa_instruction_annotation,
More information about the mesa-commit
mailing list