From c557eb77225433fa9415a94fc9db3ce36374df64 Mon Sep 17 00:00:00 2001 From: Ian Romanick Date: Thu, 23 Jan 2014 18:26:29 -0800 Subject: [PATCH] linker: Allow geometry shader without vertex shader for separable programs Signed-off-by: Ian Romanick Reviewed-by: Eric Anholt --- src/glsl/linker.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/glsl/linker.cpp b/src/glsl/linker.cpp index de7e3cde07a..fbc03587765 100644 --- a/src/glsl/linker.cpp +++ b/src/glsl/linker.cpp @@ -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; -- 2.30.2