Hi, I’m rendering multiple shadow passes in in one depth attachment side by side. Each pass is rendered in different viewport and scissor area. On my Nvidia GPU everything works fine. But on my Intel machine the shadowmap atlas is partially broken.
Looks like only the last pass is correct. There are no validation Errors at all.
The attachment description looks like this:
attachment.description.samples = SampleCount; attachment.description.loadOp = VK_ATTACHMENT_LOAD_OP_CLEAR; attachment.description.storeOp = (createinfo.usage & VK_IMAGE_USAGE_SAMPLED_BIT) ? VK_ATTACHMENT_STORE_OP_STORE : VK_ATTACHMENT_STORE_OP_DONT_CARE; attachment.description.stencilLoadOp = VK_ATTACHMENT_LOAD_OP_CLEAR; attachment.description.stencilStoreOp = attachment.description.storeOp; attachment.description.format = createinfo.format; attachment.description.initialLayout = VK_IMAGE_LAYOUT_UNDEFINED; attachment.description.finalLayout =VK_IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL;
If I change the finalLayout also to VK_IMAGE_LAYOUT_UNDEFINED, the shadowmap looks good!
But I get a validation error for Updating the DescrptorSet with the wrong layout.
…vkUpdateDescriptorSets() failed write update validation for VkDescriptorSet 0xa600000000a6 with error: Write update to VkDescriptorSet VkDescriptorSet 0xa600000000a6 allocated with VkDescriptorSetLayout VkDescriptorSetLayout 0xa300000000a3 binding #3 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_UNDEFINED for image VkImage …