the final ref on pools is owned by their program struct(s), and liveshader
cache can trigger shader deletion after a context is destroyed, so
attempting to prune pools here may end up deleting them before the
last ref is actually removed
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13430>
zink_descriptor_pool_deinit(struct zink_context *ctx)
{
for (unsigned i = 0; i < ZINK_DESCRIPTOR_TYPES; i++) {
- hash_table_foreach(ctx->dd->descriptor_pools[i], entry) {
- struct zink_descriptor_pool *pool = (void*)entry->data;
- zink_descriptor_pool_reference(ctx, &pool, NULL);
- }
+ /* do not free: programs own these pools */
_mesa_hash_table_destroy(ctx->dd->descriptor_pools[i], NULL);
}
}