[Mesa-dev] [PATCH 10/17] glsl ast_to_hir: move uniform block symbols to interface blocks namespace

Jordan Justen jordan.l.justen at intel.com
Fri Apr 19 12:35:46 PDT 2013


Uniform/interface blocks are a separate namespace from types.

Signed-off-by: Jordan Justen <jordan.l.justen at intel.com>
---
 src/glsl/ast_to_hir.cpp |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/glsl/ast_to_hir.cpp b/src/glsl/ast_to_hir.cpp
index 612b3e4..9913309 100644
--- a/src/glsl/ast_to_hir.cpp
+++ b/src/glsl/ast_to_hir.cpp
@@ -4288,7 +4288,7 @@ ast_interface_block::hir(exec_list *instructions,
                                         packing,
                                         this->block_name);
 
-   if (!state->symbols->add_type(block_type->name, block_type)) {
+   if (!state->symbols->add_interface(block_type->name, block_type, ir_var_uniform)) {
       YYLTYPE loc = this->get_location();
       _mesa_glsl_error(&loc, state, "Uniform block name `%s' already taken in "
                        "the current scope.\n", this->block_name);
-- 
1.7.10.4



More information about the mesa-dev mailing list