Skip to content

Commit ab82217

Browse files
committed
layers: Fix error message with push descriptors
1 parent 9eaf317 commit ab82217

File tree

1 file changed

+11
-5
lines changed

1 file changed

+11
-5
lines changed

layers/core_checks/cc_descriptor.cpp

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -968,11 +968,17 @@ bool CoreChecks::ValidateDescriptor(const DescriptorContext &context, const Desc
968968
"VUID-VkDescriptorImageInfo-imageLayout-00344", &hit_error);
969969
if (hit_error) {
970970
auto set = context.descriptor_set.GetSet();
971-
return LogError(
972-
set, context.vuids.descriptor_buffer_bit_set_08114,
973-
"%s: Descriptor set %s Image layout specified at vkCmdBindDescriptorSets time doesn't match actual image "
974-
"layout at time descriptor is used. See previous error callback for specific details.",
975-
context.caller, FormatHandle(set).c_str());
971+
std::stringstream msg;
972+
if (!context.descriptor_set.IsPushDescriptor()) {
973+
msg << "Descriptor set " << FormatHandle(set)
974+
<< " Image layout specified by vkCmdBindDescriptorSets doesn't match actual image layout at time "
975+
"descriptor is used.";
976+
} else {
977+
msg << "Image layout specified by vkCmdPushDescriptorSetKHR doesn't match actual image layout at time "
978+
"descriptor is used";
979+
}
980+
return LogError(set, context.vuids.descriptor_buffer_bit_set_08114,
981+
"%s: %s. See previous error callback for specific details.", context.caller, msg.str().c_str());
976982
}
977983
if (context.checked_layouts) {
978984
context.checked_layouts->emplace(image_view, image_layout);

0 commit comments

Comments
 (0)