diff options
author | Eric Anholt <[email protected]> | 2011-07-22 12:57:47 -0700 |
---|---|---|
committer | Eric Anholt <[email protected]> | 2011-10-18 10:54:32 -0700 |
commit | 57f7978b1de40be6eb138d391c8d9f95b68cbf62 (patch) | |
tree | da00d5d3faa359f2f8f689dd565e1aa6e331bd7b /src/glsl | |
parent | f868cb09639d69acbc900842263ac2d28b60bcc0 (diff) |
mesa: Add a flag for shader programs to allow SSO linkage in GLES2.
On converting fixed function programs to generate GLSL, the linker
became cranky that we were trying to make something that wasn't a
linked vertex+fragment program. Given that the Mesa GLES2 drivers
also support desktop GL with EXT_sso, just telling the linker to shut
up seems like the easiest solution.
Diffstat (limited to 'src/glsl')
-rw-r--r-- | src/glsl/linker.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/glsl/linker.cpp b/src/glsl/linker.cpp index 42075cbbe09..a7c38a3426a 100644 --- a/src/glsl/linker.cpp +++ b/src/glsl/linker.cpp @@ -1805,7 +1805,8 @@ link_shaders(struct gl_context *ctx, struct gl_shader_program *prog) * 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->InternalSeparateShader && + (ctx->API == API_OPENGLES2 || prog->Version == 100)) { if (prog->_LinkedShaders[MESA_SHADER_VERTEX] == NULL) { linker_error(prog, "program lacks a vertex shader\n"); } else if (prog->_LinkedShaders[MESA_SHADER_FRAGMENT] == NULL) { |