I trying to create a bloom effect for my vulkan game-engine. To implement this I use several bulring pass, in each one I read from one image and render/write a slightly more blurry picture to a other. After each draw pass i swap the role of these images(And using barriers), That means - the one was a render target became a shader resource and the one used as a shader resource became a target. I bind both of these images on same descriptor set to save unnecessary 'VkBindDescriptorSet' calls, but the validation layer tell me that if I want to bind a descriptors of images those all image's layout must be 'VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL' even if the shader used/read only from one of them at any given time(The shader read only from The one that currently in the 'VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL' state). Is this over-caution of the validationlayer? or the bindung is actually failed.
When i worked with DirectX12 I not had this debuger isue!
I would be happy for an answer or an idea for a solution, and I am sorry about my English.