layers: Fix WriteDescriptorSet::dstSet validation
VkWriteDescriptorSet::dstSet is ignored by vkCmdPushDescriptorSetsKHR,
so the 'must not be a null handle' validation for dstSet has been moved
from the code validating the VkWriteDescriptor struct members to the
code validating the vkUpdateDescriptorSets function parameters.
Change-Id: Ia6f11d33e4d57d4c848aab72cfd91da5d5a15a30
diff --git a/layers/parameter_validation.cpp b/layers/parameter_validation.cpp
index bc41f12..0edce55 100644
--- a/layers/parameter_validation.cpp
+++ b/layers/parameter_validation.cpp
@@ -3792,6 +3792,11 @@
i, validation_error_map[VALIDATION_ERROR_00957]);
}
+ // dstSet must be a valid VkDescriptorSet handle
+ skip |= validate_required_handle(report_data, "vkUpdateDescriptorSets",
+ ParameterName("pDescriptorWrites[%i].dstSet", ParameterName::IndexVector{i}),
+ pDescriptorWrites[i].dstSet);
+
if ((pDescriptorWrites[i].descriptorType == VK_DESCRIPTOR_TYPE_SAMPLER) ||
(pDescriptorWrites[i].descriptorType == VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER) ||
(pDescriptorWrites[i].descriptorType == VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE) ||