summaryrefslogtreecommitdiffstats
path: root/src/compiler/glsl/linker.cpp
diff options
context:
space:
mode:
authorAndres Gomez <[email protected]>2019-03-08 23:21:58 +0200
committerAndres Gomez <[email protected]>2019-04-15 22:34:50 +0000
commit42351c21bbb9ed5e067737ac72e1da510832ddd7 (patch)
treefcf790858a35ec32adfe316d7de2a5a4c518a13c /src/compiler/glsl/linker.cpp
parent6281517f3e249024285b137975196432798db530 (diff)
glsl/linker: always validate explicit locations for first and last interfaces
Until now, we were only doing this when linking a SSO program. However, nothing avoids linking a non SSO program which doesn't have both a VS and FS. In those cases, we also need to report the usual linking errors, if happening. v2: Use a better name for the renamed function (Timothy). Signed-off-by: Andres Gomez <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
Diffstat (limited to 'src/compiler/glsl/linker.cpp')
-rw-r--r--src/compiler/glsl/linker.cpp15
1 files changed, 7 insertions, 8 deletions
diff --git a/src/compiler/glsl/linker.cpp b/src/compiler/glsl/linker.cpp
index 5667fb73f1e..efcef9fedf0 100644
--- a/src/compiler/glsl/linker.cpp
+++ b/src/compiler/glsl/linker.cpp
@@ -5141,15 +5141,14 @@ 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.
+ /* The cross validation of outputs/inputs above validates interstage
+ * explicit locations. 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);
+ validate_first_and_last_interface_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);