summaryrefslogtreecommitdiffstats
path: root/src/compiler/glsl/linker.cpp
diff options
context:
space:
mode:
authorIago Toral Quiroga <[email protected]>2017-10-20 09:18:33 +0200
committerIago Toral Quiroga <[email protected]>2017-10-26 08:40:14 +0200
commite2abb75b0e4c2e38120316c4f3cc4cde44497330 (patch)
tree01d982e355508693098a8c0aeaf3edaa14638b76 /src/compiler/glsl/linker.cpp
parentbdaf0589785138f91cd485fd698274a33b7d33d5 (diff)
glsl/linker: validate explicit locations for SSO programs
v2: - we only need to validate inputs to the first stage and outputs from the last stage, everything else has already been validated during cross_validate_outputs_to_inputs (Timothy). - Use MAX_VARYING instead of MAX_VARYINGS_INCL_PATCH (Illia) Reviewed-by: Timothy Arceri <[email protected]> Reviewed-by: Ilia Mirkin <[email protected]>
Diffstat (limited to 'src/compiler/glsl/linker.cpp')
-rw-r--r--src/compiler/glsl/linker.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/compiler/glsl/linker.cpp b/src/compiler/glsl/linker.cpp
index 94bd7fb6592..f827b68555f 100644
--- a/src/compiler/glsl/linker.cpp
+++ b/src/compiler/glsl/linker.cpp
@@ -4941,6 +4941,16 @@ link_shaders(struct gl_context *ctx, struct gl_shader_program *prog)
prev = i;
}
+ /* The cross validation of outputs/inputs above validates explicit locations
+ * but for SSO programs we need to do this also for the inputs in the
+ * first stage and outputs of the last stage included in the program, since
+ * there is no cross validation for these.
+ */
+ if (prog->SeparateShader)
+ validate_sso_explicit_locations(ctx, prog,
+ (gl_shader_stage) first,
+ (gl_shader_stage) last);
+
/* Cross-validate uniform blocks between shader stages */
validate_interstage_uniform_blocks(prog, prog->_LinkedShaders);
if (!prog->data->LinkStatus)