summaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2008-08-06 16:29:10 -0600
committerBrian Paul <[email protected]>2008-08-06 16:29:10 -0600
commit95d3642122f48439e356b781f62649553f97c7ee (patch)
treee465aa6260e55fb4a36c372295b48cc1f58b250a /src/mesa
parent8a40fe06d72aa8b0c3a03b92b60a0f5b4ea61987 (diff)
mesa: glsl: additional error checking
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/shader/slang/slang_link.c12
1 files changed, 12 insertions, 0 deletions
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.