mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-27 10:30:08 +01:00
glsl: Add assert to check variable_entry referenced_count after construction.
A variable_entry after construction should have its referenced_count member set to 0. However, occassionally this isn't the case and entry->referenced_count has been observed to be a garbage value. This leads to crashes of several tests in the Piglit test suite. This patch adds an assert to check that a variable_entry instance has its referenced_count member initialized to 0 after construction.
This commit is contained in:
parent
b018ea19a3
commit
c8b26c63fd
1 changed files with 1 additions and 0 deletions
|
|
@ -45,6 +45,7 @@ ir_variable_refcount_visitor::get_variable_entry(ir_variable *var)
|
|||
}
|
||||
|
||||
variable_entry *entry = new(mem_ctx) variable_entry(var);
|
||||
assert(entry->referenced_count == 0);
|
||||
this->variable_list.push_tail(entry);
|
||||
return entry;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue