summaryrefslogtreecommitdiffstats
path: root/src/glsl/linker.cpp
diff options
context:
space:
mode:
authorIan Romanick <[email protected]>2014-01-23 18:26:29 -0800
committerIan Romanick <[email protected]>2014-05-02 07:19:40 -0700
commitc557eb77225433fa9415a94fc9db3ce36374df64 (patch)
tree6cbaa43d498bcec3d50ce286cd07d53e64f2c2be /src/glsl/linker.cpp
parent1ff5a2b1ba2148b772f5e5c86d64c3cb18e1ce97 (diff)
linker: Allow geometry shader without vertex shader for separable programs
Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
Diffstat (limited to 'src/glsl/linker.cpp')
-rw-r--r--src/glsl/linker.cpp3
1 files changed, 2 insertions, 1 deletions
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;