Skip to content

Conversation

apazylbe
Copy link
Contributor

@apazylbe apazylbe commented Oct 6, 2025

  • Preserve the initial contents of UNDEFINED images if they are external
  • Don't consider a pipeline barrier from UNDEFINED a resource discard for external images

External images have to be created with VK_IMAGE_LAYOUT_UNDEFINED: "If the pNext chain includes a VkExternalMemoryImageCreateInfo or VkExternalMemoryImageCreateInfoNV structure whose handleTypes member is not 0, initialLayout must be VK_IMAGE_LAYOUT_UNDEFINED" (https://registry.khronos.org/vulkan/specs/latest/html/vkspec.html#VUID-VkImageCreateInfo-pNext-01443)

So even if image has contents that importing application would like to be preserved, it will have a transition from UNDEFINED to new layout.

This section https://registry.khronos.org/vulkan/specs/latest/html/vkspec.html#resources-external-sharing adds that "Therefore, the layout specified as part of this transition will be the true initial layout of the image. The undefined layout specified when creating it is a placeholder to simplify valid usage requirements."

- Preserve the initial contents of UNDEFINED images if they are
external
- Don't consider a pipeline barrier from UNDEFINED a resource
discard for external images

Change-Id: Ife30e7c542a66668d681d492363a25745238119e
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant