Promoted to core in Vulkan 1.2
When creating a VkFramebuffer
you normally need to pass the VkImageView
s being used in VkFramebufferCreateInfo::pAttachments
. It came to the Vulkan Working Group conclusion that this information is not fully needed by implementations when creating the framebuffer. By removing this requirement, the hope is to allow more flexibility in how they are used and avoiding the need for many of the confusing compatibility rules.
To use an imageless VkFramebuffer
- Make sure the implementation has support for it
- By querying
VkPhysicalDeviceImagelessFramebufferFeatures::imagelessFramebuffer
or having at least a Vulkan 1.2 device
- By querying
- Set the
VK_FRAMEBUFFER_CREATE_IMAGELESS_BIT
inVkFramebufferCreateInfo::flags
- Include a
VkFramebufferAttachmentsCreateInfo
struct in theVkFramebufferCreateInfo::pNext
- When starting the RenderPass, pass in a
VkRenderPassAttachmentBeginInfo
struct intoVkRenderPassBeginInfo::pNext
with the compatiable attachments