summaryrefslogtreecommitdiffstats
path: root/src/compiler
diff options
context:
space:
mode:
authorTimothy Arceri <[email protected]>2015-11-27 13:43:20 +1100
committerTimothy Arceri <[email protected]>2016-05-01 23:13:22 +1000
commit589053dac7bfd4fc1845b1259e0a0aed2ca464ad (patch)
treed0d7b40b6b0e0b46101cc7d3aba6437894ca115f /src/compiler
parent0317dfcd9b32e37d5a993662c8cab75fbdbed44e (diff)
glsl: validate linking of intrastage component qualifiers
Reviewed-by: Anuj Phogat <[email protected]> Reviewed-by: Edward O'Callaghan <[email protected]>
Diffstat (limited to 'src/compiler')
-rw-r--r--src/compiler/glsl/linker.cpp7
1 files changed, 7 insertions, 0 deletions
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 {