diff options
author | marha <marha@users.sourceforge.net> | 2011-02-07 07:27:49 +0000 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2011-02-07 07:27:49 +0000 |
commit | 67ff1435e31fee46b1bc8d1c65da27f8ad1c39f9 (patch) | |
tree | ce4c020cfe90ad231c15af77fb3b0933712f05d7 /mesalib/src/glsl/linker.cpp | |
parent | 5b7cc430132c47f9e4e84fd1830abc6aead39954 (diff) | |
parent | 53bf2508fe3d5bd7889ccf4817fcd2bcc531d6ae (diff) | |
download | vcxsrv-67ff1435e31fee46b1bc8d1c65da27f8ad1c39f9.tar.gz vcxsrv-67ff1435e31fee46b1bc8d1c65da27f8ad1c39f9.tar.bz2 vcxsrv-67ff1435e31fee46b1bc8d1c65da27f8ad1c39f9.zip |
svn merge ^/branches/released .
Diffstat (limited to 'mesalib/src/glsl/linker.cpp')
-rw-r--r-- | mesalib/src/glsl/linker.cpp | 14 |
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: |