When providing a SubpassDescription that has the following properties:
1) colorAttachmentCount == 0
2) pResolveAttachments is a non-null pointer
Will cause an Oculus Quest 2 to return an OOM error when calling vkCreateRenderPass.
The issue is worked around by making sure pResolveAttachments is null when colorAttachmentCount is 0. This comes up in practice when you are providing a pre-allocated Vector with non-zero capacity and zero size.
The spec says the following about pResolveAttachments:
pResolveAttachments is NULL or a pointer to an array of colorAttachmentCount VkAttachmentReference structures defining the resolve attachments for this subpass and their layouts.
There is no additional requirement that pResolveAttachments is null when colorAttachmentCount == 0.
Upstream workaround: https://github.com/gfx-rs/wgpu/pull/2262
Information about the device:
QUALCOMM build : 403b3691c1, Ife7a905a8c Build Date : 09/03/21 Shader Compiler Version : EV031.35.17.01 Local Branch : Remote Branch : refs/tags/AU_LINUX_ANDROID_LA.UM.8.12.R1.10.00.00.561.144 Remote Branch : NONE Reconstruct Branch : NOTHING Build Config : S P 8.0.12 AArch64 Driver Path : /vendor/lib64/hw/vulkan.kona.so Driver Version : 0582.0