VkCommandBufferBeginInfo(3)

# VkCommandBufferBeginInfo(3) Manual Page

## Name

VkCommandBufferBeginInfo - Structure specifying a command buffer begin operation

Loading… please wait.

## C Specification

The `VkCommandBufferBeginInfo` structure is defined as:

    // Provided by VK_VERSION_1_0
    typedef struct VkCommandBufferBeginInfo {
        VkStructureType                          sType;
        const void*                              pNext;
        VkCommandBufferUsageFlags                flags;
        const VkCommandBufferInheritanceInfo*    pInheritanceInfo;
    } VkCommandBufferBeginInfo;

## Members

- `sType` is the type of this structure.

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

- `flags` is a bitmask of VkCommandBufferUsageFlagBits specifying usage behavior for the command buffer.

- `pInheritanceInfo` is a pointer to a `VkCommandBufferInheritanceInfo` structure, used if `commandBuffer` is a secondary command buffer. If this is a primary command buffer, then this value is ignored.

## Description

Valid Usage

- VUID-VkCommandBufferBeginInfo-flags-00055
  If `flags` contains `VK_COMMAND_BUFFER_USAGE_RENDER_PASS_CONTINUE_BIT`, the `framebuffer` member of `pInheritanceInfo` must be either VK_NULL_HANDLE, or a valid `VkFramebuffer` that is compatible with the `renderPass` member of `pInheritanceInfo`

- VUID-VkCommandBufferBeginInfo-flags-06000
  If `flags` contains `VK_COMMAND_BUFFER_USAGE_RENDER_PASS_CONTINUE_BIT` and the `renderPass` member of `pInheritanceInfo` is not VK_NULL_HANDLE, `renderPass` must be a valid `VkRenderPass`

- VUID-VkCommandBufferBeginInfo-flags-06001
  If `flags` contains `VK_COMMAND_BUFFER_USAGE_RENDER_PASS_CONTINUE_BIT` and the `renderPass` member of `pInheritanceInfo` is not VK_NULL_HANDLE, the `subpass` member of `pInheritanceInfo` must be a valid subpass index within the `renderPass` member of `pInheritanceInfo`

- VUID-VkCommandBufferBeginInfo-flags-06002
  If `flags` contains `VK_COMMAND_BUFFER_USAGE_RENDER_PASS_CONTINUE_BIT` and the `renderPass` member of `pInheritanceInfo` is VK_NULL_HANDLE, the `pNext` chain of `pInheritanceInfo` must include a VkCommandBufferInheritanceRenderingInfo structure

- VUID-VkCommandBufferBeginInfo-flags-06003
  If `flags` contains `VK_COMMAND_BUFFER_USAGE_RENDER_PASS_CONTINUE_BIT`, the `renderPass` member of `pInheritanceInfo` is VK_NULL_HANDLE, and the `pNext` chain of `pInheritanceInfo` includes a VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV structure, the `colorAttachmentCount` member of that structure must be equal to the value of VkCommandBufferInheritanceRenderingInfo::`colorAttachmentCount`

Valid Usage (Implicit)

- VUID-VkCommandBufferBeginInfo-sType-sType
  `sType` must be `VK_STRUCTURE_TYPE_COMMAND_BUFFER_BEGIN_INFO`

- VUID-VkCommandBufferBeginInfo-pNext-pNext
  `pNext` must be `NULL` or a pointer to a valid instance of VkDeviceGroupCommandBufferBeginInfo

- VUID-VkCommandBufferBeginInfo-sType-unique
  The `sType` value of each struct in the `pNext` chain must be unique

- VUID-VkCommandBufferBeginInfo-flags-parameter
  `flags` must be a valid combination of VkCommandBufferUsageFlagBits values

## See Also

VK_VERSION_1_0, VkCommandBufferInheritanceInfo, VkCommandBufferUsageFlags, VkStructureType, vkBeginCommandBuffer

## 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