diff options
| author | Tobin Ehlis <tobine@google.com> | 2016-11-23 12:23:32 -0700 |
|---|---|---|
| committer | Tobin Ehlis <tobine@google.com> | 2016-11-23 16:12:36 -0700 |
| commit | ac7674cbaaef6291f66e85d108288c0e02731fd2 (patch) | |
| tree | 6b1288007d1b8abd20151b72dc89fbb9a12afc35 /layers/descriptor_sets.cpp | |
| parent | 926221c83176388394a816ae3806b5ac2553541b (diff) | |
| download | usermoji-ac7674cbaaef6291f66e85d108288c0e02731fd2.tar.xz | |
layers:Unique enums for vkAllocateDescriptorSets
Add appropriate unique error enums to the code for allocating
descriptor sets from a pool without enough sets left and without
enough descriptors left.
These were already flagged as implemented but the enums hadn't been
added to the code.
Diffstat (limited to 'layers/descriptor_sets.cpp')
| -rw-r--r-- | layers/descriptor_sets.cpp | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/layers/descriptor_sets.cpp b/layers/descriptor_sets.cpp index 6ccc921c..cf2229aa 100644 --- a/layers/descriptor_sets.cpp +++ b/layers/descriptor_sets.cpp @@ -1534,21 +1534,23 @@ bool cvdescriptorset::ValidateAllocateDescriptorSets(const debug_report_data *re 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__, DRAWSTATE_DESCRIPTOR_POOL_EMPTY, "DS", - "Unable to allocate %u descriptorSets from pool 0x%" PRIxLEAST64 ". This pool only has %d descriptorSets remaining.", - p_alloc_info->descriptorSetCount, reinterpret_cast<uint64_t &>(pool_state->pool), pool_state->availableSets); + 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]) { 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__, DRAWSTATE_DESCRIPTOR_POOL_EMPTY, - "DS", "Unable to allocate %u descriptors of type %s from pool 0x%" PRIxLEAST64 - ". This pool only has %d descriptors of this type remaining.", + 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]); + reinterpret_cast<uint64_t &>(pool_state->pool), pool_state->availableDescriptorTypeCount[i], + validation_error_map[VALIDATION_ERROR_00912]); } } |
