VkAttachmentSampleCountInfoAMD(3)

# VkAttachmentSampleCountInfoAMD(3) Manual Page

## Name

VkAttachmentSampleCountInfoAMD - Structure specifying command buffer inheritance info for dynamic render pass instances

Loading… please wait.

## C Specification

The `VkAttachmentSampleCountInfoAMD` or `VkAttachmentSampleCountInfoNV` structure is defined as:

    // Provided by VK_KHR_dynamic_rendering with VK_AMD_mixed_attachment_samples
    typedef struct VkAttachmentSampleCountInfoAMD {
        VkStructureType                 sType;
        const void*                     pNext;
        uint32_t                        colorAttachmentCount;
        const VkSampleCountFlagBits*    pColorAttachmentSamples;
        VkSampleCountFlagBits           depthStencilAttachmentSamples;
    } VkAttachmentSampleCountInfoAMD;

or the equivalent

    // Provided by VK_KHR_dynamic_rendering with VK_NV_framebuffer_mixed_samples
    typedef VkAttachmentSampleCountInfoAMD VkAttachmentSampleCountInfoNV;

## Members

- `sType` is the type of this structure

- `pNext` is `NULL` or a pointer to a structure extending this structure

- `colorAttachmentCount` is the number of color attachments specified in a render pass instance.

- `pColorAttachmentSamples` is a pointer to an array of VkSampleCountFlagBits values defining the sample count of color attachments.

- `depthStencilAttachmentSamples` is a VkSampleCountFlagBits value defining the sample count of a depth/stencil attachment.

## Description

If VkCommandBufferInheritanceInfo::`renderPass` is VK_NULL_HANDLE, `VK_COMMAND_BUFFER_USAGE_RENDER_PASS_CONTINUE_BIT` is specified in VkCommandBufferBeginInfo::`flags`, and the `pNext` chain of VkCommandBufferInheritanceInfo includes `VkAttachmentSampleCountInfoAMD`, then this structure defines the sample counts of each attachment within the render pass instance. If `VkAttachmentSampleCountInfoAMD` is not included, the value of VkCommandBufferInheritanceRenderingInfo::`rasterizationSamples` is used as the sample count for each attachment. If VkCommandBufferInheritanceInfo::`renderPass` is not VK_NULL_HANDLE, or `VK_COMMAND_BUFFER_USAGE_RENDER_PASS_CONTINUE_BIT` is not specified in VkCommandBufferBeginInfo::`flags`, parameters of this structure are ignored.

`VkAttachmentSampleCountInfoAMD` can also be included in the `pNext` chain of VkGraphicsPipelineCreateInfo. When a graphics pipeline is created without a VkRenderPass, if this structure is present in the `pNext` chain of VkGraphicsPipelineCreateInfo, it specifies the sample count of attachments used for rendering. If this structure is not specified, and the pipeline does not include a VkRenderPass, the value of VkPipelineMultisampleStateCreateInfo::`rasterizationSamples` is used as the sample count for each attachment. If a graphics pipeline is created with a valid VkRenderPass, parameters of this structure are ignored.

Valid Usage (Implicit)

- VUID-VkAttachmentSampleCountInfoAMD-sType-sType
  `sType` must be `VK_STRUCTURE_TYPE_ATTACHMENT_SAMPLE_COUNT_INFO_AMD`

## See Also

VK_AMD_mixed_attachment_samples, VK_KHR_dynamic_rendering, VK_NV_framebuffer_mixed_samples, VkSampleCountFlagBits, VkStructureType

## Document Notes

For more information, see the Vulkan Specification

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

## Copyright

Copyright 2014-2023 The Khronos Group Inc.

SPDX-License-Identifier: CC-BY-4.0