vkCmdResolveImage doesn't set destination image layout
System information
- OS: GENTOO
- GPU: HD Graphics 530 (rev 06)
- Kernel version: Linux 5.4.28-gentoo #2 (closed) SMP PREEMPT Sat Apr 4 12:26:02 CEST 2020 x86_64 Intel(R) Core(TM) i5-6500 CPU @ 3.20GHz GenuineIntel GNU/Linux
- Mesa version: Mesa 19.3.5
- Xserver version X.Org X Server 1.20.7 X Protocol Version 11, Revision 0
Describe the issue
I am toying around with Vulkan and a little application of mine. I am quite a beginner so it all might be just a misunderstanding on my side, or I might do something wrong.
I try to do msaa into an offscreen buffer and resolve that into an other offscreen buffer. Everything seems to work nicely, no warnings from the Vulkan Validation layer, except for one thing.
I've build a pipeline that outputs into the multisampled framebuffer images
- I've put the drawing stuff into the command buffer
- end the render pass
- add resolveImage commands to the command buffer to resolve the multisample images into "normal" images
- submit this command buffer with all its commands
the problem is that the resolveImage command expects a destination image layout but the image that is written to doesn't have that layout at the end. E.g. in my case the destination layout is supposed to be TransferDstOptimal... but the Image is still in Preinitialized Layout as it was created (well at least that is what the validator tells me)
Everything is drawn and everything looks as I think it should, but the validation layer complains that the image layout doesn't fit for the next step.
The question is now:
Is my expectation wrong, that resolveImage should result in the destination image having the given layout? Or is there a bug in the intel driver/libraries?