ir_to_mesa: Validate the linked shaders as well.
authorEric Anholt <eric@anholt.net>
Wed, 21 Jul 2010 00:19:57 +0000 (17:19 -0700)
committerEric Anholt <eric@anholt.net>
Wed, 21 Jul 2010 00:30:11 +0000 (17:30 -0700)
This caught the failure in cloning of ir_dereference_record.

src/mesa/shader/ir_to_mesa.cpp

index 5803960d4443cb7df594696b99314b762516f92b..352b496625d97ecaa91a8e88d3b1546b93238e2e 100644 (file)
@@ -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;