From 61428dd2ab66017f80dc4f3b0793e741d93a6d47 Mon Sep 17 00:00:00 2001 From: Chad Versace Date: Mon, 10 Jan 2011 15:29:30 -0800 Subject: [PATCH] glsl: At link-time, check that globals have matching centroid qualifiers Fixes bug 31923: http://bugs.freedesktop.org/show_bug.cgi?id=31923 --- src/glsl/linker.cpp | 6 ++++++ 1 file changed, 6 insertions(+) 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); } -- 2.30.2