From 589053dac7bfd4fc1845b1259e0a0aed2ca464ad Mon Sep 17 00:00:00 2001 From: Timothy Arceri Date: Fri, 27 Nov 2015 13:43:20 +1100 Subject: glsl: validate linking of intrastage component qualifiers Reviewed-by: Anuj Phogat Reviewed-by: Edward O'Callaghan --- src/compiler/glsl/linker.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/compiler/glsl') diff --git a/src/compiler/glsl/linker.cpp b/src/compiler/glsl/linker.cpp index 975b299db55..f7b884e0173 100644 --- a/src/compiler/glsl/linker.cpp +++ b/src/compiler/glsl/linker.cpp @@ -988,6 +988,13 @@ cross_validate_globals(struct gl_shader_program *prog, return; } + if (var->data.location_frac != existing->data.location_frac) { + linker_error(prog, "explicit components for %s " + "`%s' have differing values\n", + mode_string(var), var->name); + return; + } + existing->data.location = var->data.location; existing->data.explicit_location = true; } else { -- cgit v1.2.3