linker: Allow geometry shader without vertex shader for separable programs
authorIan Romanick <ian.d.romanick@intel.com>
Fri, 24 Jan 2014 02:26:29 +0000 (18:26 -0800)
committerIan Romanick <ian.d.romanick@intel.com>
Fri, 2 May 2014 14:19:40 +0000 (07:19 -0700)
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
src/glsl/linker.cpp

index de7e3cde07ab5f6da7097534edeedf2e457fccea..fbc03587765aefb1b2037cdef05239dd4e67435a 100644 (file)
@@ -2300,7 +2300,8 @@ link_shaders(struct gl_context *ctx, struct gl_shader_program *prog)
    /* Geometry shaders have to be linked with vertex shaders.
     */
    if (num_shaders[MESA_SHADER_GEOMETRY] > 0 &&
-       num_shaders[MESA_SHADER_VERTEX] == 0) {
+       num_shaders[MESA_SHADER_VERTEX] == 0 &&
+       !prog->SeparateShader) {
       linker_error(prog, "Geometry shader must be linked with "
                   "vertex shader\n");
       goto done;