linker: Reject shaders that have unresolved function calls

This really amounts to just using the return value from
link_function_calls.  All the work was being done, but the result was
being ignored.

Fixes piglit test link-unresolved-funciton.

NOTE: this is a candidate for the 7.9 branch.
(cherry picked from commit 4a45595cf3)
This commit is contained in:
Ian Romanick 2010-10-13 15:13:02 -07:00
parent 42e9750975
commit 6fc544dd50

View file

@ -780,7 +780,7 @@ link_intrastage_shaders(GLcontext *ctx,
return NULL;
}
gl_shader *const linked = ctx->Driver.NewShader(NULL, 0, main->Type);
gl_shader *linked = ctx->Driver.NewShader(NULL, 0, main->Type);
linked->ir = new(linked) exec_list;
clone_ir_list(linked, linked->ir, main->ir);
@ -827,7 +827,11 @@ link_intrastage_shaders(GLcontext *ctx,
assert(idx == num_linking_shaders);
link_function_calls(prog, linked, linking_shaders, num_linking_shaders);
if (!link_function_calls(prog, linked, linking_shaders,
num_linking_shaders)) {
ctx->Driver.DeleteShader(ctx, linked);
linked = NULL;
}
free(linking_shaders);