glsl: Implement parser support for 'buffer' qualifier
[mesa.git] / src / glsl / hir_field_selection.cpp
index 08be7436532a2b6abb72ee045ffb27a852b3f7f2..0fa976811e69e9f803da2f0c011d211bd12a4ab0 100644 (file)
@@ -22,7 +22,6 @@
  */
 
 #include "ir.h"
-#include "program/symbol_table.h"
 #include "glsl_parser_extras.h"
 #include "ast.h"
 #include "glsl_types.h"
@@ -72,7 +71,7 @@ _mesa_ast_field_selection_to_hir(const ast_expression *expr,
             _mesa_glsl_error(&loc, state, "length method takes no arguments");
 
          if (op->type->is_array()) {
-            if (op->type->array_size() == 0)
+            if (op->type->is_unsized_array())
                _mesa_glsl_error(&loc, state, "length called on unsized array");
 
             result = new(ctx) ir_constant(op->type->array_size());