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;