projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4c70014
)
glsl: Fix linker bug in cross_validate_globals()
author
Chad Versace
<chad.versace@intel.com>
Wed, 17 Nov 2010 22:34:38 +0000
(14:34 -0800)
committer
Chad Versace
<chad.versace@intel.com>
Thu, 2 Dec 2010 04:40:07 +0000
(20:40 -0800)
Cause linking to fail if a global has mismatching invariant qualifiers.
See https://bugs.freedesktop.org/show_bug.cgi?id=30261
src/glsl/linker.cpp
patch
|
blob
|
history
diff --git
a/src/glsl/linker.cpp
b/src/glsl/linker.cpp
index cde70adff5674e8ab750f24532e984d7847cc449..576b72a65fe7af8231cb0fbcc11e147ba723132b 100644
(file)
--- a/
src/glsl/linker.cpp
+++ b/
src/glsl/linker.cpp
@@
-411,6
+411,13
@@
cross_validate_globals(struct gl_shader_program *prog,
existing->constant_value =
var->constant_value->clone(talloc_parent(existing), NULL);
}
+
+ if (existing->invariant != var->invariant) {
+ linker_error_printf(prog, "declarations for %s `%s' have "
+ "mismatching invariant qualifiers\n",
+ mode_string(var), var->name);
+ return false;
+ }
} else
variables.add_variable(var);
}