summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2008-07-02 17:08:47 -0600
committerBrian Paul <[email protected]>2008-07-02 17:08:47 -0600
commitdff477a5e27c39aa61aac8e1555c345211e832b8 (patch)
tree20b7442d90cd7933eef89b04639961165648d277 /src
parent40739d4ae95054d45fa86e9668ad29fcbafd67e9 (diff)
mesa: when linking a shader program, make sure all the shaders compiled OK
cherry-picked from master
Diffstat (limited to 'src')
-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 dd4990ba023..f08b53e8b74 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();