From 4ceffcba0a3e5054ee94b7f76add5bfee5b13357 Mon Sep 17 00:00:00 2001 From: Tobin Ehlis Date: Mon, 18 Jul 2016 13:14:01 -0600 Subject: layers: Remove DRAWSTATE_INVALID_POOL check This check was only flagged when Allocating descriptor sets or resetting a descriptor pool, and in both cases object_tracker will be the first layer to identify and flag the error. Removing this as a redundant check and updating documentation. --- layers/core_validation.cpp | 26 ++++++++++---------------- 1 file changed, 10 insertions(+), 16 deletions(-) (limited to 'layers/core_validation.cpp') 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 -- cgit v1.2.3