From: Timothy Arceri Date: Fri, 27 Nov 2015 02:43:20 +0000 (+1100) Subject: glsl: validate linking of intrastage component qualifiers X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=589053dac7bfd4fc1845b1259e0a0aed2ca464ad;p=mesa.git glsl: validate linking of intrastage component qualifiers Reviewed-by: Anuj Phogat Reviewed-by: Edward O'Callaghan --- 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 {