diff options
| author | Tobin Ehlis <tobine@google.com> | 2017-01-04 09:41:47 -0700 |
|---|---|---|
| committer | Tobin Ehlis <tobine@google.com> | 2017-01-04 15:05:18 -0700 |
| commit | 1647f05c88c887bc23920dcd4e1c58053667679d (patch) | |
| tree | 65bbbd88661adb31ddc06a4df7ee1a4b95f0996f /layers/descriptor_sets.cpp | |
| parent | 889f831f563078786947b0a07ccef09e6b86f6de (diff) | |
| download | usermoji-1647f05c88c887bc23920dcd4e1c58053667679d.tar.xz | |
layers:Remove redundant checks
Remove descriptor set check to make sure that src & dest descriptor
sets of copy update are valid. Object_tracker already verifies this.
Diffstat (limited to 'layers/descriptor_sets.cpp')
| -rw-r--r-- | layers/descriptor_sets.cpp | 33 |
1 files changed, 11 insertions, 22 deletions
diff --git a/layers/descriptor_sets.cpp b/layers/descriptor_sets.cpp index 6de07cc3..6d7ef553 100644 --- a/layers/descriptor_sets.cpp +++ b/layers/descriptor_sets.cpp @@ -1109,29 +1109,18 @@ bool cvdescriptorset::ValidateUpdateDescriptorSets(const debug_report_data *repo auto src_set = p_cds[i].srcSet; auto src_node = core_validation::getSetNode(dev_data, src_set); auto dst_node = core_validation::getSetNode(dev_data, dst_set); - if (!src_node) { + // Object_tracker verifies that src & dest descriptor set are valid + assert(src_node); + assert(dst_node); + UNIQUE_VALIDATION_ERROR_CODE error_code; + std::string error_str; + if (!dst_node->ValidateCopyUpdate(report_data, &p_cds[i], src_node, &error_code, &error_str)) { skip_call |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_SET_EXT, - reinterpret_cast<uint64_t &>(src_set), __LINE__, VALIDATION_ERROR_00971, "DS", - "Cannot call vkUpdateDescriptorSets() to copy from descriptor set 0x%" PRIxLEAST64 - " that has not been allocated. %s", - reinterpret_cast<uint64_t &>(src_set), validation_error_map[VALIDATION_ERROR_00971]); - } else if (!dst_node) { - skip_call |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_SET_EXT, - reinterpret_cast<uint64_t &>(dst_set), __LINE__, VALIDATION_ERROR_00972, "DS", - "Cannot call vkUpdateDescriptorSets() to copy to descriptor set 0x%" PRIxLEAST64 - " that has not been allocated. %s", - reinterpret_cast<uint64_t &>(dst_set), validation_error_map[VALIDATION_ERROR_00972]); - } else { - UNIQUE_VALIDATION_ERROR_CODE error_code; - std::string error_str; - if (!dst_node->ValidateCopyUpdate(report_data, &p_cds[i], src_node, &error_code, &error_str)) { - skip_call |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_SET_EXT, - reinterpret_cast<uint64_t &>(dst_set), __LINE__, error_code, "DS", - "vkUpdateDescriptorsSets() failed copy update from Descriptor Set 0x%" PRIx64 - " to Descriptor Set 0x%" PRIx64 " with error: %s. %s", - reinterpret_cast<uint64_t &>(src_set), reinterpret_cast<uint64_t &>(dst_set), - error_str.c_str(), validation_error_map[error_code]); - } + reinterpret_cast<uint64_t &>(dst_set), __LINE__, error_code, "DS", + "vkUpdateDescriptorsSets() failed copy update from Descriptor Set 0x%" PRIx64 + " to Descriptor Set 0x%" PRIx64 " with error: %s. %s", + reinterpret_cast<uint64_t &>(src_set), reinterpret_cast<uint64_t &>(dst_set), error_str.c_str(), + validation_error_map[error_code]); } } return skip_call; |
