mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-25 03:40:23 +01:00
nvk: Assert that we don't double-free descriptors
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
This commit is contained in:
parent
a68b0fcd05
commit
f8b48ccf0b
1 changed files with 2 additions and 0 deletions
|
|
@ -104,6 +104,8 @@ nvk_descriptor_table_free(struct nvk_device *device,
|
|||
{
|
||||
simple_mtx_lock(&table->mutex);
|
||||
assert(table->free_count < table->alloc);
|
||||
for (uint32_t i = 0; i < table->free_count; i++)
|
||||
assert(table->free_table[i] != index);
|
||||
table->free_table[table->free_count++] = index;
|
||||
simple_mtx_unlock(&table->mutex);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue