summaryrefslogtreecommitdiffstats
path: root/src/glsl
diff options
context:
space:
mode:
Diffstat (limited to 'src/glsl')
-rw-r--r--src/glsl/linker.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/glsl/linker.cpp b/src/glsl/linker.cpp
index de6b1fb9f37..6713df14a08 100644
--- a/src/glsl/linker.cpp
+++ b/src/glsl/linker.cpp
@@ -2746,6 +2746,21 @@ link_shaders(struct gl_context *ctx, struct gl_shader_program *prog)
if (last >= 0 && last < MESA_SHADER_FRAGMENT) {
gl_shader *const sh = prog->_LinkedShaders[last];
+ if (first == MESA_SHADER_GEOMETRY) {
+ /* There was no vertex shader, but we still have to assign varying
+ * locations for use by geometry shader inputs in SSO.
+ *
+ * If the shader is not separable (i.e., prog->SeparateShader is
+ * false), linking will have already failed when first is
+ * MESA_SHADER_GEOMETRY.
+ */
+ if (!assign_varying_locations(ctx, mem_ctx, prog,
+ NULL, sh,
+ num_tfeedback_decls, tfeedback_decls,
+ prog->Geom.VerticesIn))
+ goto done;
+ }
+
if (num_tfeedback_decls != 0 || prog->SeparateShader) {
/* There was no fragment shader, but we still have to assign varying
* locations for use by transform feedback.