diff options
Diffstat (limited to 'src/compiler/glsl/ir_array_refcount.cpp')
-rw-r--r-- | src/compiler/glsl/ir_array_refcount.cpp | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/compiler/glsl/ir_array_refcount.cpp b/src/compiler/glsl/ir_array_refcount.cpp index b997d415d1d..36b22742fa8 100644 --- a/src/compiler/glsl/ir_array_refcount.cpp +++ b/src/compiler/glsl/ir_array_refcount.cpp @@ -56,7 +56,15 @@ ir_array_refcount_visitor::~ir_array_refcount_visitor() ir_array_refcount_entry::ir_array_refcount_entry(ir_variable *var) : var(var), is_referenced(false) { - /* empty */ + num_bits = MAX2(1, var->type->arrays_of_arrays_size()); + bits = new BITSET_WORD[BITSET_WORDS(num_bits)]; + memset(bits, 0, BITSET_WORDS(num_bits) * sizeof(bits[0])); +} + + +ir_array_refcount_entry::~ir_array_refcount_entry() +{ + delete [] bits; } |