summaryrefslogtreecommitdiffstats
path: root/src/mesa/shader/slang/slang_link.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/shader/slang/slang_link.c')
-rw-r--r--src/mesa/shader/slang/slang_link.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/src/mesa/shader/slang/slang_link.c b/src/mesa/shader/slang/slang_link.c
index b16778f8ad4..3d4208ce4c5 100644
--- a/src/mesa/shader/slang/slang_link.c
+++ b/src/mesa/shader/slang/slang_link.c
@@ -858,13 +858,15 @@ _slang_link(GLcontext *ctx,
#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;
+ if (ctx->API == API_OPENGLES2) {
+ if (!vertProg) {
+ link_error(shProg, "missing vertex shader\n");
+ return;
+ }
+ if (!fragProg) {
+ link_error(shProg, "missing fragment shader\n");
+ return;
+ }
}
#endif