diff options
author | Kenneth Graunke <[email protected]> | 2012-11-28 00:18:02 -0800 |
---|---|---|
committer | Ian Romanick <[email protected]> | 2013-01-18 17:35:32 -0800 |
commit | 4f29169913f99252c54e1922f6d164e2ef530a58 (patch) | |
tree | e857b0a5384f67880afc06ffa8c3139e8452a272 /src/glsl/glsl_symbol_table.h | |
parent | bb47a4d081c383a2c42555c2bbde2f5d8ee2412c (diff) |
glsl: Track UBO block names in the symbol table.
The GLSL 1.40 spec says:
"Uniform block names and variable names declared within uniform
blocks are scoped at the program level."
Track the block name in the symbol table and emit errors when conflicts
exist.
Fixes es3conform's uniform_buffer_object_block_name_conflict test, and
fixes the piglit block-name-clashes-with-{variable,function,struct}.vert
tests.
NOTE: This is a candidate for the 9.0 branch.
v2: Fix bad constructor initialization. Noticed by Topi Pohjolainen.
Reviewed-by: Ian Romanick <[email protected]>
Diffstat (limited to 'src/glsl/glsl_symbol_table.h')
-rw-r--r-- | src/glsl/glsl_symbol_table.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/glsl/glsl_symbol_table.h b/src/glsl/glsl_symbol_table.h index 9f5602787f0..f95fb8a0115 100644 --- a/src/glsl/glsl_symbol_table.h +++ b/src/glsl/glsl_symbol_table.h @@ -99,6 +99,7 @@ public: bool add_variable(ir_variable *v); bool add_type(const char *name, const glsl_type *t); bool add_function(ir_function *f); + bool add_uniform_block(struct gl_uniform_block *u); /*@}*/ /** |