This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

[Vulkan] Multisampled depth resolve via input attachments gives unexpected results

Hello!

We have a main opaque pass that uses 3 multisampled color attachments and a multisampled depth attachment; we want all of these attachments to be resolved on tile so that we don't pay extra bandwidth to store them.

It's easy to do with color attachments using .pResolveAttachments field of VkSubpassDescription and appropriate load/store ops, but with depth the situation gets a bit more complicated. Since Vulkan 1.2 is pretty much non-existent on Android and VK_KHR_depth_stencil_resolve extension is not as widely available as we had hoped, we decided to use a separate resolve subpass.

The approach worked well on Adreno devices and on PC, but on devices with Mali GPUs it just doesn't work: after the pass ends, the resolved depth target appears to be filled with default values. ( tested on Xiaomi Note 8 Pro and on Samsung S20 FE )

The following gist includes the render pass setup and resolve pipeline creation code:
gist.github.com/.../90f517fd963ec492ef40d27499f9a4e7

Please let me know if there's any additional information I can provide.

Thank you!