Forums - Adreno driver crash in Vulkan when VK_ATTACHMENT_UNUSED is used for a resolve attachment of a multipass renderpass

1 post / 0 new
Adreno driver crash in Vulkan when VK_ATTACHMENT_UNUSED is used for a resolve attachment of a multipass renderpass
akb825
Join Date: 26 Sep 18
Posts: 1
Posted: Fri, 2019-02-22 00:52

When creating a Vulkan render pass with multiple subpasses, if the pResolveAttachments element of a VkSubpassDescription is non-NULL and uses VK_ATTACHMENT_UNUSED, the driver will crash when trying to create a framebuffer for that render pass with vkCreateFramebuffer().

 

For one of my testers, I had the following render pass configuration (indices are 1-based to work with the list numbers):

Attachments:

  1. window's render surface
  2. color buffer
  3. depth buffer
  4. color buffer
  5. depth buffer
  6. color buffer
  7. depth buffer

Subpasses:

  1. Color attachment 2 and depth attachment 3. (renders the red channel)
  2. Color attachment 4 and depth attachment 5. (renders the green channel)
  3. Color attachment 6 and depth attachment 7. (renders the blue channel)
  4. Color attachment 0 and no depth attachment. Takes color attachments 2, 4, and 6 as inputs. (combines the 3 channels to the final image)

 

In all cases, pResolveAttachments is non-NULL and uses VK_ATTACHMENT_UNUSED to indicate that there's no resolve. When calling vkCreateFramebuffer() to create the framebuffer for the render pass it crashes, but if I instead pass NULL for pResolveAttachments it works as expected. This tester has run on multiple other platforms without issue.

 

In this example it's equivalent to pass NULL as using VK_ATTACHMENT_UNUSED, however I'd imagine that if you're drawing to multiple color targets at once and some are resolved while others aren't it would be impossible to avoid the crash.

  • Up0
  • Down0

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.