mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-02-03 08:40:28 +01:00
glsl: Fix linker bug in cross_validate_globals()
Cause linking to fail if a global has mismatching invariant qualifiers.
See https://bugs.freedesktop.org/show_bug.cgi?id=30261
(cherry picked from commit 7528f143df)
This commit is contained in:
parent
bb2cd98e51
commit
b2cd388b79
1 changed files with 7 additions and 0 deletions
|
|
@ -398,6 +398,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->name, var);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue