summaryrefslogtreecommitdiffstats
path: root/src/glsl/linker.cpp
diff options
context:
space:
mode:
authorChad Versace <[email protected]>2011-01-10 15:29:30 -0800
committerChad Versace <[email protected]>2011-01-10 15:29:30 -0800
commit61428dd2ab66017f80dc4f3b0793e741d93a6d47 (patch)
tree1c6e38ae20d397f5855611ba5663195e350bfdf4 /src/glsl/linker.cpp
parent0e3ff159f950f7481af53506a8331476bc54c00f (diff)
glsl: At link-time, check that globals have matching centroid qualifiers
Fixes bug 31923: http://bugs.freedesktop.org/show_bug.cgi?id=31923
Diffstat (limited to 'src/glsl/linker.cpp')
-rw-r--r--src/glsl/linker.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/glsl/linker.cpp b/src/glsl/linker.cpp
index d8c42ac4624..c906d744212 100644
--- a/src/glsl/linker.cpp
+++ b/src/glsl/linker.cpp
@@ -422,6 +422,12 @@ cross_validate_globals(struct gl_shader_program *prog,
mode_string(var), var->name);
return false;
}
+ if (existing->centroid != var->centroid) {
+ linker_error_printf(prog, "declarations for %s `%s' have "
+ "mismatching centroid qualifiers\n",
+ mode_string(var), var->name);
+ return false;
+ }
} else
variables.add_variable(var);
}