zink: track resource count on descriptor pool object

we can do this once here instead of accumulating the count all over later

also remove the debug value on the set which duplicated this

Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9348>
This commit is contained in:
Mike Blumenkrantz
2020-10-07 09:39:21 -04:00
committed by Marge Bot
parent d9793a8a60
commit 201cd1a8c0
2 changed files with 4 additions and 0 deletions
@@ -94,6 +94,9 @@ descriptor_pool_create(struct zink_screen *screen, enum zink_descriptor_type typ
}
memcpy(pool->key.bindings, bindings, bindings_size);
memcpy(pool->key.sizes, sizes, types_size);
for (unsigned i = 0; i < num_bindings; i++) {
pool->num_resources += bindings[i].descriptorCount;
}
pool->desc_sets = _mesa_hash_table_create(NULL, desc_state_hash, desc_state_equal);
if (!pool->desc_sets)
goto fail;
@@ -82,6 +82,7 @@ struct zink_descriptor_pool {
VkDescriptorPool descpool;
VkDescriptorSetLayout dsl;
struct zink_descriptor_pool_key key;
unsigned num_resources;
unsigned num_sets_allocated;
};