diff options
author | Kristian Høgsberg <[email protected]> | 2010-05-24 10:01:38 -0400 |
---|---|---|
committer | Kristian Høgsberg <[email protected]> | 2010-05-24 10:02:13 -0400 |
commit | f67b020a942911f80b7b774c6d64701d1981c608 (patch) | |
tree | 346fe4eb66b537070037f544cf632b88b1bf02ec /src/mesa/shader/slang/slang_link.c | |
parent | 740c8ea6d371732f3530accde44836930e03cc80 (diff) |
mesa: Handle FEATURE_es2_glsl differences at runtime too
Now that we can support different APIs at runtime, we need to check the
context for the API we're currently providing as well.
https://bugs.freedesktop.org/show_bug.cgi?id=28194
Diffstat (limited to 'src/mesa/shader/slang/slang_link.c')
-rw-r--r-- | src/mesa/shader/slang/slang_link.c | 16 |
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 |