[Mesa-dev] [PATCH 12/21] linker: Allow geometry shader without vertex shader for separable programs

Ian Romanick idr at freedesktop.org
Tue Apr 29 17:52:15 PDT 2014


From: Ian Romanick <ian.d.romanick at intel.com>

Signed-off-by: Ian Romanick <ian.d.romanick at intel.com>
Reviewed-by: Eric Anholt <eric at anholt.net>
---
 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 f631fdf..18d7bfc 100644
--- a/src/glsl/linker.cpp
+++ b/src/glsl/linker.cpp
@@ -2161,7 +2161,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;
-- 
1.8.1.4



More information about the mesa-dev mailing list