aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEskil Sund <eskil.sund@arm.com>2018-04-19 16:25:20 +0200
committerJohn Zulauf <32470354+jzulauf-lunarg@users.noreply.github.com>2018-04-23 15:19:35 -0600
commit44329c3266af1d78773dc4fe9e3558bd6669acf7 (patch)
tree07ced2787eb9ea3a8646f2b07eef56cbe8a318f0
parentab4e56a3b14867ece89152071d2eeee91ad1da3b (diff)
downloadusermoji-44329c3266af1d78773dc4fe9e3558bd6669acf7.tar.xz
layers: Fixes from PR #2566
-rw-r--r--layers/core_validation.cpp20
-rw-r--r--layers/vk_validation_error_database.txt2
2 files changed, 11 insertions, 11 deletions
diff --git a/layers/core_validation.cpp b/layers/core_validation.cpp
index 5dd1e098..0e4c4a09 100644
--- a/layers/core_validation.cpp
+++ b/layers/core_validation.cpp
@@ -1592,18 +1592,14 @@ static bool validateIdleDescriptorSetForPoolReset(const layer_data *dev_data, co
if (dev_data->instance_data->disabled.idle_descriptor_set) return false;
bool skip = false;
DESCRIPTOR_POOL_STATE *pPool = GetDescriptorPoolState(dev_data, pool);
- for (auto ds : pPool->sets) {
- if (ds != VK_NULL_HANDLE) {
- auto set_node = dev_data->setMap.find(ds->GetSet());
- if (set_node != dev_data->setMap.end()) {
- if (set_node->second->in_use.load()) {
- skip |=
- log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT,
+ if (pPool != nullptr) {
+ for (auto ds : pPool->sets) {
+ if (ds && ds->in_use.load()) {
+ skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT,
VK_DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_POOL_EXT, HandleToUint64(pool), VALIDATION_ERROR_32a00272,
"It is invalid to call vkResetDescriptorPool() with descriptor sets in use by a command buffer. %s",
validation_error_map[VALIDATION_ERROR_32a00272]);
- if (skip) break;
- }
+ if (skip) break;
}
}
}
@@ -5759,16 +5755,20 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateDescriptorPool(VkDevice device, const VkDes
VKAPI_ATTR VkResult VKAPI_CALL ResetDescriptorPool(VkDevice device, VkDescriptorPool descriptorPool,
VkDescriptorPoolResetFlags flags) {
- lock_guard_t lock(global_lock);
layer_data *dev_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map);
+ unique_lock_t lock(global_lock);
// Make sure sets being destroyed are not currently in-use
bool skip = validateIdleDescriptorSetForPoolReset(dev_data, descriptorPool);
+ lock.unlock();
+
if (skip) return VK_ERROR_VALIDATION_FAILED_EXT;
VkResult result = dev_data->dispatch_table.ResetDescriptorPool(device, descriptorPool, flags);
if (VK_SUCCESS == result) {
+ lock.lock();
clearDescriptorPool(dev_data, device, descriptorPool, flags);
+ lock.unlock();
}
return result;
}
diff --git a/layers/vk_validation_error_database.txt b/layers/vk_validation_error_database.txt
index 7a81ebed..b684682e 100644
--- a/layers/vk_validation_error_database.txt
+++ b/layers/vk_validation_error_database.txt
@@ -3380,7 +3380,7 @@ VALIDATION_ERROR_32802801~^~Y~^~None~^~vkResetCommandPool~^~VUID-vkResetCommandP
VALIDATION_ERROR_32802807~^~Y~^~Unknown~^~vkResetCommandPool~^~VUID-vkResetCommandPool-commandPool-parent~^~core~^~The spec valid usage text states 'commandPool must have been created, allocated, or retrieved from device' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkResetCommandPool-commandPool-parent)~^~implicit
VALIDATION_ERROR_32805601~^~Y~^~None~^~vkResetCommandPool~^~VUID-vkResetCommandPool-device-parameter~^~core~^~The spec valid usage text states 'device must be a valid VkDevice handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkResetCommandPool-device-parameter)~^~implicit
VALIDATION_ERROR_32809001~^~Y~^~Unknown~^~vkResetCommandPool~^~VUID-vkResetCommandPool-flags-parameter~^~core~^~The spec valid usage text states 'flags must be a valid combination of VkCommandPoolResetFlagBits values' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkResetCommandPool-flags-parameter)~^~implicit, TBD in parameter validation layer.
-VALIDATION_ERROR_32a00272~^~Y~^~Unknown~^~vkResetDescriptorPool~^~VUID-vkResetDescriptorPool-descriptorPool-00313~^~core~^~The spec valid usage text states 'All uses of descriptorPool (via any allocated descriptor sets) must have completed execution' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkResetDescriptorPool-descriptorPool-00313)~^~
+VALIDATION_ERROR_32a00272~^~Y~^~DescriptorPoolInUseResetSignaled~^~vkResetDescriptorPool~^~VUID-vkResetDescriptorPool-descriptorPool-00313~^~core~^~The spec valid usage text states 'All uses of descriptorPool (via any allocated descriptor sets) must have completed execution' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkResetDescriptorPool-descriptorPool-00313)~^~
VALIDATION_ERROR_32a04601~^~Y~^~InvalidDescriptorPool~^~vkResetDescriptorPool~^~VUID-vkResetDescriptorPool-descriptorPool-parameter~^~core~^~The spec valid usage text states 'descriptorPool must be a valid VkDescriptorPool handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkResetDescriptorPool-descriptorPool-parameter)~^~implicit
VALIDATION_ERROR_32a04607~^~Y~^~Unknown~^~vkResetDescriptorPool~^~VUID-vkResetDescriptorPool-descriptorPool-parent~^~core~^~The spec valid usage text states 'descriptorPool must have been created, allocated, or retrieved from device' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkResetDescriptorPool-descriptorPool-parent)~^~implicit
VALIDATION_ERROR_32a05601~^~Y~^~None~^~vkResetDescriptorPool~^~VUID-vkResetDescriptorPool-device-parameter~^~core~^~The spec valid usage text states 'device must be a valid VkDevice handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkResetDescriptorPool-device-parameter)~^~implicit