aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/glsl/linker.cpp
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2011-02-07 07:14:23 +0000
committermarha <marha@users.sourceforge.net>2011-02-07 07:14:23 +0000
commit53bf2508fe3d5bd7889ccf4817fcd2bcc531d6ae (patch)
tree8269551248a104f428f6245fba51d659775489e2 /mesalib/src/glsl/linker.cpp
parent39522c7dc587b335b0e0e00fc68f98e6a7a5c7bd (diff)
downloadvcxsrv-53bf2508fe3d5bd7889ccf4817fcd2bcc531d6ae.tar.gz
vcxsrv-53bf2508fe3d5bd7889ccf4817fcd2bcc531d6ae.tar.bz2
vcxsrv-53bf2508fe3d5bd7889ccf4817fcd2bcc531d6ae.zip
mesa git update 7 Feb 2011
Diffstat (limited to 'mesalib/src/glsl/linker.cpp')
-rw-r--r--mesalib/src/glsl/linker.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/mesalib/src/glsl/linker.cpp b/mesalib/src/glsl/linker.cpp
index c7fb62437..46cd1950c 100644
--- a/mesalib/src/glsl/linker.cpp
+++ b/mesalib/src/glsl/linker.cpp
@@ -1682,6 +1682,20 @@ link_shaders(struct gl_context *ctx, struct gl_shader_program *prog)
demote_shader_inputs_and_outputs(sh, ir_var_in);
}
+ /* OpenGL ES requires that a vertex shader and a fragment shader both be
+ * present in a linked program. By checking for use of shading language
+ * version 1.00, we also catch the GL_ARB_ES2_compatibility case.
+ */
+ if (ctx->API == API_OPENGLES2 || prog->Version == 100) {
+ if (prog->_LinkedShaders[MESA_SHADER_VERTEX] == NULL) {
+ linker_error_printf(prog, "program lacks a vertex shader\n");
+ prog->LinkStatus = false;
+ } else if (prog->_LinkedShaders[MESA_SHADER_FRAGMENT] == NULL) {
+ linker_error_printf(prog, "program lacks a fragment shader\n");
+ prog->LinkStatus = false;
+ }
+ }
+
/* FINISHME: Assign fragment shader output locations. */
done: