From ee075aba2f1f920f38d58a5ddb0383c92eab96d9 Mon Sep 17 00:00:00 2001 From: Tobin Ehlis Date: Wed, 30 Mar 2016 12:20:53 -0600 Subject: layers: GH218 Reset availableSets count in vkResetDescriptorPool --- layers/core_validation.cpp | 3 ++- layers/core_validation.h | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/layers/core_validation.cpp b/layers/core_validation.cpp index e7ff9c5e..d3bbf09d 100644 --- a/layers/core_validation.cpp +++ b/layers/core_validation.cpp @@ -4328,10 +4328,11 @@ static void clearDescriptorPool(layer_data *my_data, const VkDevice device, cons clearDescriptorSet(my_data, pSet->set); pSet = pSet->pNext; } - // Reset available count to max count for this pool + // Reset available count for each type and available sets for this pool for (uint32_t i = 0; i < pPool->availableDescriptorTypeCount.size(); ++i) { pPool->availableDescriptorTypeCount[i] = pPool->maxDescriptorTypeCount[i]; } + pPool->availableSets = pPool->maxSets; } } diff --git a/layers/core_validation.h b/layers/core_validation.h index 0518da77..0b80f3b9 100644 --- a/layers/core_validation.h +++ b/layers/core_validation.h @@ -625,7 +625,7 @@ class SET_NODE : public BASE_NODE { typedef struct _DESCRIPTOR_POOL_NODE { VkDescriptorPool pool; uint32_t maxSets; // Max descriptor sets allowed in this pool - uint32_t availableSets; // Available descriptr sets in this pool + uint32_t availableSets; // Available descriptor sets in this pool VkDescriptorPoolCreateInfo createInfo; SET_NODE *pSets; // Head of LL of sets for this Pool -- cgit v1.2.3