diff options
Diffstat (limited to 'layers/core_validation.cpp')
| -rw-r--r-- | layers/core_validation.cpp | 26 |
1 files changed, 10 insertions, 16 deletions
diff --git a/layers/core_validation.cpp b/layers/core_validation.cpp index b7946378..5cfef40b 100644 --- a/layers/core_validation.cpp +++ b/layers/core_validation.cpp @@ -3589,23 +3589,17 @@ static void deletePools(layer_data *my_data) { static void clearDescriptorPool(layer_data *my_data, const VkDevice device, const VkDescriptorPool pool, VkDescriptorPoolResetFlags flags) { DESCRIPTOR_POOL_NODE *pPool = getPoolNode(my_data, pool); - if (!pPool) { - log_msg(my_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_POOL_EXT, - (uint64_t)pool, __LINE__, DRAWSTATE_INVALID_POOL, "DS", - "Unable to find pool node for pool 0x%" PRIxLEAST64 " specified in vkResetDescriptorPool() call", (uint64_t)pool); - } else { - // TODO: validate flags - // For every set off of this pool, clear it, remove from setMap, and free cvdescriptorset::DescriptorSet - for (auto ds : pPool->sets) { - freeDescriptorSet(my_data, ds); - } - pPool->sets.clear(); - // 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; + // TODO: validate flags + // For every set off of this pool, clear it, remove from setMap, and free cvdescriptorset::DescriptorSet + for (auto ds : pPool->sets) { + freeDescriptorSet(my_data, ds); + } + pPool->sets.clear(); + // 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; } // For given CB object, fetch associated CB Node from map |
