From 95d3642122f48439e356b781f62649553f97c7ee Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Wed, 6 Aug 2008 16:29:10 -0600 Subject: [PATCH] mesa: glsl: additional error checking --- src/mesa/shader/slang/slang_link.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/mesa/shader/slang/slang_link.c b/src/mesa/shader/slang/slang_link.c index 53de4232bea..8f07406ee49 100644 --- a/src/mesa/shader/slang/slang_link.c +++ b/src/mesa/shader/slang/slang_link.c @@ -445,6 +445,18 @@ _slang_link(GLcontext *ctx, _mesa_problem(ctx, "unexpected shader target in slang_link()"); } +#if FEATURE_es2_glsl + /* must have both a vertex and fragment program for ES2 */ + if (!vertProg) { + link_error(shProg, "missing vertex shader\n"); + return; + } + if (!fragProg) { + link_error(shProg, "missing fragment shader\n"); + return; + } +#endif + /* * Make copies of the vertex/fragment programs now since we'll be * changing src/dst registers after merging the uniforms and varying vars. -- 2.30.2