summaryrefslogtreecommitdiff
path: root/src/mesa
diff options
context:
space:
mode:
authorBrian Paul <brian.paul@tungstengraphics.com>2008-07-02 16:51:49 -0600
committerBrian Paul <brian.paul@tungstengraphics.com>2008-07-02 16:51:49 -0600
commit1726b7d1d336465dca10a5bd0a8a02fcf5f2e455 (patch)
tree173e4af9e0b46863b40b247da4ddbd880858fa69 /src/mesa
parentcb79c5c7c62a661c4b7b4efcf3884ee1dedafe4f (diff)
mesa: when linking a shader program, make sure all the shaders compiled OK
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/shader/slang/slang_link.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/mesa/shader/slang/slang_link.c b/src/mesa/shader/slang/slang_link.c
index f9a5ecef96..a69cad5942 100644
--- a/src/mesa/shader/slang/slang_link.c
+++ b/src/mesa/shader/slang/slang_link.c
@@ -388,6 +388,14 @@ _slang_link(GLcontext *ctx,
_mesa_clear_shader_program_data(ctx, shProg);
+ /* check that all programs compiled successfully */
+ for (i = 0; i < shProg->NumShaders; i++) {
+ if (!shProg->Shaders[i]->CompileStatus) {
+ link_error(shProg, "linking with uncompiled shader\n");
+ return;
+ }
+ }
+
shProg->Uniforms = _mesa_new_uniform_list();
shProg->Varying = _mesa_new_parameter_list();