From 1726b7d1d336465dca10a5bd0a8a02fcf5f2e455 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Wed, 2 Jul 2008 16:51:49 -0600 Subject: [PATCH] mesa: when linking a shader program, make sure all the shaders compiled OK --- src/mesa/shader/slang/slang_link.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/mesa/shader/slang/slang_link.c b/src/mesa/shader/slang/slang_link.c index f9a5ecef96c..a69cad5942d 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(); -- 2.30.2