On 12/08/2012 12:45 PM, Ian Romanick wrote:
From: Kenneth Graunke <kenn...@whitecape.org>
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.
Reviewed-by: Ian Romanick <ian.d.roman...@intel.com>
---
src/glsl/ast_to_hir.cpp | 6 ++++++
src/glsl/glsl_symbol_table.cpp | 14 +++++++++++---
src/glsl/glsl_symbol_table.h | 1 +
3 files changed, 18 insertions(+), 3 deletions(-)
I'm fine with pushing this, but I wasn't sure whether using the struct
gl_uniform_block in this way was going to be irritating when trying to
implement blocks with instance names.
But I suppose it can always be reworked.
_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev