turnip: Unconditionaly remove descriptor set from pool's list on free

We didn't remove desc set from the pool's list if pool was
host_memory_base. On the other hand in there is no point in removing
desc set from the list in DestroyDescriptorPool/ResetDescriptorPool.

Fixes: da7a4751
("turnip: Drop references to layout of all sets on pool reset/destruction")

Fixes cts tests:
 dEQP-VK.api.buffer_marker.graphics.default_mem.bottom_of_pipe.memory_dep.draw
 dEQP-VK.api.buffer_marker.graphics.default_mem.bottom_of_pipe.memory_dep.dispatch

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14855>
(cherry picked from commit 183bc15bdb)
This commit is contained in:
Danylo Piliaiev 2022-02-03 18:07:21 +02:00 committed by Dylan Baker
parent 0a1f166f4d
commit 83eef372a2
2 changed files with 4 additions and 4 deletions

View file

@ -445,7 +445,7 @@
"description": "turnip: Unconditionaly remove descriptor set from pool's list on free",
"nominated": true,
"nomination_type": 1,
"resolution": 0,
"resolution": 1,
"main_sha": null,
"because_sha": "da7a475138d6b5cab15e26be3343abf36ab74727"
},

View file

@ -589,8 +589,6 @@ tu_descriptor_set_destroy(struct tu_device *device,
}
}
list_del(&set->pool_link);
vk_object_free(&device->vk, NULL, set);
}
@ -814,8 +812,10 @@ tu_FreeDescriptorSets(VkDevice _device,
for (uint32_t i = 0; i < count; i++) {
TU_FROM_HANDLE(tu_descriptor_set, set, pDescriptorSets[i]);
if (set)
if (set) {
tu_descriptor_set_layout_unref(device, set->layout);
list_del(&set->pool_link);
}
if (set && !pool->host_memory_base)
tu_descriptor_set_destroy(device, pool, set, true);