mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-07 07:08:04 +02:00
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:
parent
42e9750975
commit
6fc544dd50
1 changed files with 6 additions and 2 deletions
|
|
@ -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);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue