You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I ran into this problem when I created shadow maps in my project. My command buffers are rebuilt every frame, so this error constantly appears. I decided to run examples and found that there is the same problem.
Error :
VUID-VkWriteDescriptorSet-descriptorType-01403(ERROR / SPEC): msgNum: 0 - vkUpdateDescriptorSets() failed write update validation for Descriptor Set 0x27 with error: Write update to VkDescriptorSet 0x27 allocated with VkDescriptorSetLayout 0x17 binding #2 failed with error message: Attempted write update to combined image sampler descriptor failed due to: Descriptor update with descriptorType VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER is being updated with invalid imageLayout VK_IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL. Allowed layouts are: VK_IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL, VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL, VK_IMAGE_LAYOUT_GENERAL. The Vulkan spec states: If descriptorType is VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE or VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER, the imageLayout member of each element of pImageInfo must be a member of the list given in Sampled Image or Combined Image Sampler, corresponding to its type (https://www.khronos.org/registry/vulkan/specs/1.1-extensions/html/vkspec.html#VUID-VkWriteDescriptorSet-descriptorType-01403)
The text was updated successfully, but these errors were encountered:
@ComradeStalin17 I ran into the same thing, I cludged around it by mashing the VK_IMAGE_USAGE_INPUT_ATTACHMENT_BIT into a marker to make Device::CreateImage in Device.cpp construct the depth image differently:
// Determine a "default" image layout based on the usage. This default image layout will be assumed during command buffer recording.
// Ordering of conditional statements below determine image layout precedence.
// Example: When usage is SAMPLED_BIT, that takes precendence over the image being used as a color attachment or for transfer operations.
auto usage = pCreateInfo->usage;
VkImageLayout defaultLayout = imageCreateInfo.initialLayout;
if (usage & VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT) defaultLayout = VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL;
else if (usage & VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT) {
if (usage & VK_IMAGE_USAGE_INPUT_ATTACHMENT_BIT) // use input-attachment bit as a flag
defaultLayout = VK_IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL;
else
defaultLayout = VK_IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL;
}
Same deal for color attachments. Though I initially used the sampled bit instead of input_attachment bit, that messed with most of my other render-targets so I had to use the sketchier bit.
I ran into this problem when I created shadow maps in my project. My command buffers are rebuilt every frame, so this error constantly appears. I decided to run examples and found that there is the same problem.
Error :
VUID-VkWriteDescriptorSet-descriptorType-01403(ERROR / SPEC): msgNum: 0 - vkUpdateDescriptorSets() failed write update validation for Descriptor Set 0x27 with error: Write update to VkDescriptorSet 0x27 allocated with VkDescriptorSetLayout 0x17 binding #2 failed with error message: Attempted write update to combined image sampler descriptor failed due to: Descriptor update with descriptorType VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER is being updated with invalid imageLayout VK_IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL. Allowed layouts are: VK_IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL, VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL, VK_IMAGE_LAYOUT_GENERAL. The Vulkan spec states: If descriptorType is VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE or VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER, the imageLayout member of each element of pImageInfo must be a member of the list given in Sampled Image or Combined Image Sampler, corresponding to its type (https://www.khronos.org/registry/vulkan/specs/1.1-extensions/html/vkspec.html#VUID-VkWriteDescriptorSet-descriptorType-01403)
The text was updated successfully, but these errors were encountered: