Mesa (glsl2): ir_to_mesa: Validate the linked shaders as well.

Eric Anholt anholt at kemper.freedesktop.org
Wed Jul 21 00:30:27 UTC 2010


Module: Mesa
Branch: glsl2
Commit: 1124e5a3cbba839ffd968742bfa3295c8de5498c
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=1124e5a3cbba839ffd968742bfa3295c8de5498c

Author: Eric Anholt <eric at anholt.net>
Date:   Tue Jul 20 17:19:57 2010 -0700

ir_to_mesa: Validate the linked shaders as well.

This caught the failure in cloning of ir_dereference_record.

---

 src/mesa/shader/ir_to_mesa.cpp |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/src/mesa/shader/ir_to_mesa.cpp b/src/mesa/shader/ir_to_mesa.cpp
index 5803960..352b496 100644
--- a/src/mesa/shader/ir_to_mesa.cpp
+++ b/src/mesa/shader/ir_to_mesa.cpp
@@ -2037,6 +2037,8 @@ get_mesa_program(GLcontext *ctx, struct gl_shader_program *shader_program,
    default: assert(!"should not be reached"); break;
    }
 
+   validate_ir_tree(shader->ir);
+
    prog = ctx->Driver.NewProgram(ctx, target, 1);
    if (!prog)
       return NULL;




More information about the mesa-commit mailing list