aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/glsl/ast_array_index.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'mesalib/src/glsl/ast_array_index.cpp')
-rw-r--r--mesalib/src/glsl/ast_array_index.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/mesalib/src/glsl/ast_array_index.cpp b/mesalib/src/glsl/ast_array_index.cpp
index a5f23206a..f3b060ea6 100644
--- a/mesalib/src/glsl/ast_array_index.cpp
+++ b/mesalib/src/glsl/ast_array_index.cpp
@@ -25,6 +25,19 @@
#include "glsl_types.h"
#include "ir.h"
+void
+ast_array_specifier::print(void) const
+{
+ if (this->is_unsized_array) {
+ printf("[ ] ");
+ }
+
+ foreach_list_typed (ast_node, array_dimension, link, &this->array_dimensions) {
+ printf("[ ");
+ array_dimension->print();
+ printf("] ");
+ }
+}
/**
* If \c ir is a reference to an array for which we are tracking the max array