VKFRAMEBUFFERCREATEI(3)

NAME
VkFramebufferCreateInfo - Structure specifying parameters of a newly created framebuffer

C SPECIFICATION

The VkFramebufferCreateInfo structure is defined as:

    typedef struct VkFramebufferCreateInfo {
        VkStructureType             sType;
        const void*                 pNext;
        VkFramebufferCreateFlags    flags;
        VkRenderPass                renderPass;
        uint32_t                    attachmentCount;
        const VkImageView*          pAttachments;
        uint32_t                    width;
        uint32_t                    height;
        uint32_t                    layers;
    } VkFramebufferCreateInfo;

MEMBERS

    • sType is the type of this structure.

    • pNext is NULL or a pointer to an extension-specific structure.

    • flags is reserved for future use.

    • renderPass is a render pass that defines what render passes the framebuffer will be compatible with. See Render Pass Compatibility for details.

    • attachmentCount is the number of attachments.

    • pAttachments is an array of VkImageView handles, each of which will be used as the corresponding attachment in a render pass instance.

    • width, height and layers define the dimensions of the framebuffer.

DESCRIPTION

Image subresources used as attachments must not be used via any non-attachment usage for the duration of a render pass instance.

    Note

    This restriction means that the render pass has full knowledge of all uses of all of the attachments, so that the implementation is able to make correct decisions about when and how to perform layout transitions, when to overlap execution of subpasses, etc.

It is legal for a subpass to use no color or depth/stencil attachments, and rather use shader side effects such as image stores and atomics to produce an output. In this case, the subpass continues to use the width, height, and layers of the framebuffer to define the dimensions of the rendering area, and the rasterizationSamples from each pipeline’s VkPipelineMultisampleStateCreateInfo to define the number of samples used in rasterization; however, if VkPhysicalDeviceFeatures::variableMultisampleRate is VK_FALSE, then all pipelines to be bound with a given zero-attachment subpass must have the same value for VkPipelineMultisampleStateCreateInfo::rasterizationSamples. Valid Usage

    • attachmentCount must be equal to the attachment count specified in renderPass

    • Any given element of pAttachments that is used as a color attachment or resolve attachment by renderPass must have been created with a usage value including VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT

    • Any given element of pAttachments that is used as a depth/stencil attachment by renderPass must have been created with a usage value including VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT

    • Any given element of pAttachments that is used as an input attachment by renderPass must have been created with a usage value including VK_IMAGE_USAGE_INPUT_ATTACHMENT_BIT

    • Any given element of pAttachments must have been created with an VkFormat value that matches the VkFormat specified by the corresponding VkAttachmentDescription in renderPass

    • Any given element of pAttachments must have been created with a samples value that matches the samples value specified by the corresponding VkAttachmentDescription in renderPass

    • Any given element of pAttachments must have dimensions at least as large as the corresponding framebuffer dimension

    • Any given element of pAttachments must only specify a single mip level

    • Any given element of pAttachments must have been created with the identity swizzle

    • width must be less than or equal to VkPhysicalDeviceLimits::maxFramebufferWidth

    • height must be less than or equal to VkPhysicalDeviceLimits::maxFramebufferHeight

    • layers must be less than or equal to VkPhysicalDeviceLimits::maxFramebufferLayers
Valid Usage (Implicit)

    • sType must be VK_STRUCTURE_TYPE_FRAMEBUFFER_CREATE_INFO

    • pNext must be NULL

    • flags must be 0

    • renderPass must be a valid VkRenderPass handle

    • If attachmentCount is not 0, pAttachments must be a pointer to an array of attachmentCount valid VkImageView handles

    • Both of renderPass, and the elements of pAttachments that are valid handles must have been created, allocated, or retrieved from the same VkDevice

SEE ALSO

VkFramebufferCreateFlags, VkImageView, VkRenderPass, VkStructureType, vkCreateFramebuffer

DOCUMENT NOTES

For more information, see the Vulkan Specification at URL

https://www.khronos.org/registry/vulkan/specs/1.0/xhtml/vkspec.html#VkFramebufferCreateInfo

This page is extracted from the Vulkan Specification. Fixes and changes should be made to the Specification,not directly.

COPYRIGHT

Copyright (c) 2014-2016 Khronos Group. This work is licensed under a Creative Commons Attribution 4.0 International License.

AUTHOR

Khronos Group
    Author.