Forums - vkCreateRenderPass OOM Error when Subpass colorAttachmentCount == 0 but pResolveAttachments is non-null

2 posts / 0 new
Last post
vkCreateRenderPass OOM Error when Subpass colorAttachmentCount == 0 but pResolveAttachments is non-null
Join Date: 6 Dec 20
Posts: 1
Posted: Mon, 2021-12-06 10:51

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:

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.
Remote Branch           : NONE
Reconstruct Branch      : NOTHING
Build Config            : S P 8.0.12 AArch64
Driver Path             : /vendor/lib64/hw/
Driver Version          : 0582.0
  • Up0
  • Down0
Join Date: 23 Aug 16
Posts: 12
Posted: Thu, 2022-01-13 08:13

Thanks for reporting this.  Yes, this is a known bug in prior Adreno drivers.  The bug was fixed in our mainline branch at the end of August 2021. Driver Versions 0597.0 and later should contain the fix.    Note that if colorAttachmentCount==0, then yes it is valid to have a non-null pResolveAttachments, however the spec requies that each of the pResolveAttachments has the value VK_ATTACHMENT_UNUSED.

I'm not sure about the process of getting an updated driver for Quest2, but you could reach out if you need assistance with that and we could put you in touch with a POC at Oculus.

  • Up0
  • Down0
or Register

Opinions expressed in the content posted here are the personal opinions of the original authors, and do not necessarily reflect those of Qualcomm Incorporated or its subsidiaries (“Qualcomm”). The content is provided for informational purposes only and is not meant to be an endorsement or representation by Qualcomm or any other party. This site may also provide links or references to non-Qualcomm sites and resources. Qualcomm makes no representations, warranties, or other commitments whatsoever about any non-Qualcomm sites or third-party resources that may be referenced, accessible from, or linked to this site.