aboutsummaryrefslogtreecommitdiff
path: root/layers/descriptor_sets.cpp
diff options
context:
space:
mode:
authorMike Schuchardt <mikes@lunarg.com>2017-03-21 16:33:26 -0600
committerMark Lobodzinski <mark@lunarg.com>2017-03-27 14:36:45 -0600
commit9ad14df0754d50e750486946dec6b2babbd95af5 (patch)
tree455d126ef22a502fa980f4bb93c9eb1e95b13d0c /layers/descriptor_sets.cpp
parentb32e7b50376440417c4a7e59a895e052504b561e (diff)
downloadusermoji-9ad14df0754d50e750486946dec6b2babbd95af5.tar.xz
layers: VK_KHR_maintenance1 false positives
Skip checks that no longer apply when VK_KHR_maintenance1 is enabled. Change-Id: I84d0fe889d0e567045aeb7fa7463dd2ec0d56789
Diffstat (limited to 'layers/descriptor_sets.cpp')
-rw-r--r--layers/descriptor_sets.cpp40
1 files changed, 21 insertions, 19 deletions
diff --git a/layers/descriptor_sets.cpp b/layers/descriptor_sets.cpp
index 92d0ce08..086e75f4 100644
--- a/layers/descriptor_sets.cpp
+++ b/layers/descriptor_sets.cpp
@@ -1642,26 +1642,28 @@ bool cvdescriptorset::ValidateAllocateDescriptorSets(const core_validation::laye
reinterpret_cast<const uint64_t &>(p_alloc_info->pSetLayouts[i]));
}
}
- auto pool_state = GetDescriptorPoolState(dev_data, p_alloc_info->descriptorPool);
- // Track number of descriptorSets allowable in this pool
- if (pool_state->availableSets < p_alloc_info->descriptorSetCount) {
- skip_call |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_POOL_EXT,
- reinterpret_cast<uint64_t &>(pool_state->pool), __LINE__, VALIDATION_ERROR_00911, "DS",
- "Unable to allocate %u descriptorSets from pool 0x%" PRIxLEAST64
- ". This pool only has %d descriptorSets remaining. %s",
- p_alloc_info->descriptorSetCount, reinterpret_cast<uint64_t &>(pool_state->pool),
- pool_state->availableSets, validation_error_map[VALIDATION_ERROR_00911]);
- }
- // Determine whether descriptor counts are satisfiable
- for (uint32_t i = 0; i < VK_DESCRIPTOR_TYPE_RANGE_SIZE; i++) {
- if (ds_data->required_descriptors_by_type[i] > pool_state->availableDescriptorTypeCount[i]) {
+ if (!GetDeviceExtensions(dev_data)->khr_maintenance1_enabled) {
+ auto pool_state = GetDescriptorPoolState(dev_data, p_alloc_info->descriptorPool);
+ // Track number of descriptorSets allowable in this pool
+ if (pool_state->availableSets < p_alloc_info->descriptorSetCount) {
skip_call |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_POOL_EXT,
- reinterpret_cast<const uint64_t &>(pool_state->pool), __LINE__, VALIDATION_ERROR_00912, "DS",
- "Unable to allocate %u descriptors of type %s from pool 0x%" PRIxLEAST64
- ". This pool only has %d descriptors of this type remaining. %s",
- ds_data->required_descriptors_by_type[i], string_VkDescriptorType(VkDescriptorType(i)),
- reinterpret_cast<uint64_t &>(pool_state->pool), pool_state->availableDescriptorTypeCount[i],
- validation_error_map[VALIDATION_ERROR_00912]);
+ reinterpret_cast<uint64_t &>(pool_state->pool), __LINE__, VALIDATION_ERROR_00911, "DS",
+ "Unable to allocate %u descriptorSets from pool 0x%" PRIxLEAST64
+ ". This pool only has %d descriptorSets remaining. %s",
+ p_alloc_info->descriptorSetCount, reinterpret_cast<uint64_t &>(pool_state->pool),
+ pool_state->availableSets, validation_error_map[VALIDATION_ERROR_00911]);
+ }
+ // Determine whether descriptor counts are satisfiable
+ for (uint32_t i = 0; i < VK_DESCRIPTOR_TYPE_RANGE_SIZE; i++) {
+ if (ds_data->required_descriptors_by_type[i] > pool_state->availableDescriptorTypeCount[i]) {
+ skip_call |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_POOL_EXT,
+ reinterpret_cast<const uint64_t &>(pool_state->pool), __LINE__, VALIDATION_ERROR_00912, "DS",
+ "Unable to allocate %u descriptors of type %s from pool 0x%" PRIxLEAST64
+ ". This pool only has %d descriptors of this type remaining. %s",
+ ds_data->required_descriptors_by_type[i], string_VkDescriptorType(VkDescriptorType(i)),
+ reinterpret_cast<uint64_t &>(pool_state->pool), pool_state->availableDescriptorTypeCount[i],
+ validation_error_map[VALIDATION_ERROR_00912]);
+ }
}
}