[Mesa-dev] [PATCH 3/3] glsl: Disallow use of interface block names for other purposes
Chris Forbes
chrisf at ijw.co.nz
Sat Nov 29 12:55:00 PST 2014
Fixes the piglit tests:
spec/glsl-1.50/compiler/interface-blocks-name-reused-globally*
The error reporting is still poor in some cases (where the grammar
enforces use of a new identifier, for example).
Signed-off-by: Chris Forbes <chrisf at ijw.co.nz>
---
src/glsl/glsl_symbol_table.cpp | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/src/glsl/glsl_symbol_table.cpp b/src/glsl/glsl_symbol_table.cpp
index 2294dda..e13e5a8 100644
--- a/src/glsl/glsl_symbol_table.cpp
+++ b/src/glsl/glsl_symbol_table.cpp
@@ -32,6 +32,10 @@ public:
{
const glsl_type **dest;
+ /* interface block names may not be used for any other purpose */
+ if (v || f || t || a)
+ return false;
+
switch (mode) {
case ir_var_uniform:
dest = &ibu;
--
2.1.3
More information about the mesa-dev
mailing list