glsl: Add tracking for elements of an array-of-arrays that have been accessed
If there's a better way to provide access to ir_array_refcount_entry private members to the test functions, I am very interested to know about it. Signed-off-by: Ian Romanick <ian.d.romanick@intel.com> Cc: Francisco Jerez <currojerez@riseup.net> Cc: mesa-stable@lists.freedesktop.org Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user