Structures

VkCommandBufferInheritanceInfo

Structure specifying command buffer inheritance information

If the command buffer is a secondary command buffer, then the VkCommandBufferInheritanceInfo structure defines any state that will be inherited from the primary command buffer:

typedef struct VkCommandBufferInheritanceInfo {
    VkStructureType sType;
    const void* pNext;
    VkRenderPass renderPass;
    uint32_t subpass;
    VkFramebuffer framebuffer;
    VkBool32 occlusionQueryEnable;
    VkQueryControlFlags queryFlags;
    VkQueryPipelineStatisticFlags pipelineStatistics;
} VkCommandBufferInheritanceInfo;
  • sType is a VkStructureType value identifying this structure.
  • pNext is NULL or a pointer to a structure extending this structure.
  • renderPass is a VkRenderPass object defining which render passes the VkCommandBuffer will be compatible with and can be executed within.
  • subpass is the index of the subpass within the render pass instance that the VkCommandBuffer will be executed within.
  • framebuffer can refer to the VkFramebuffer object that the VkCommandBuffer will be rendering to if it is executed within a render pass instance. It can be VK_NULL_HANDLE if the framebuffer is not known.

    Specifying the exact framebuffer that the secondary command buffer will be executed with may result in better performance at command buffer execution time.

  • occlusionQueryEnable specifies whether the command buffer can be executed while an occlusion query is active in the primary command buffer. If this is VK_TRUE, then this command buffer can be executed whether the primary command buffer has an occlusion query active or not. If this is VK_FALSE, then the primary command buffer must not have an occlusion query active.
  • queryFlags specifies the query flags that can be used by an active occlusion query in the primary command buffer when this secondary command buffer is executed. If this value includes the VK_QUERY_CONTROL_PRECISE_BIT bit, then the active query can return boolean results or actual sample counts. If this bit is not set, then the active query must not use the VK_QUERY_CONTROL_PRECISE_BIT bit.
  • pipelineStatistics is a bitmask of VkQueryPipelineStatisticFlagBits specifying the set of pipeline statistics that can be counted by an active query in the primary command buffer when this secondary command buffer is executed. If this value includes a given bit, then this command buffer can be executed whether the primary command buffer has a pipeline statistics query active that includes this bit or not. If this value excludes a given bit, then the active pipeline statistics query must not be from a query pool that counts that statistic.

If the VkCommandBuffer will not be executed within a render pass instance, or if the render pass instance was begun with vkCmdBeginRendering, renderPass, subpass, and framebuffer are ignored.

Valid Usage

VUID-VkCommandBufferInheritanceInfo-occlusionQueryEnable-00056

If the inheritedQueries feature is not enabled, occlusionQueryEnable must be VK_FALSE

VUID-VkCommandBufferInheritanceInfo-queryFlags-00057

If the inheritedQueries feature is enabled, queryFlags must be a valid combination of VkQueryControlFlagBits values

VUID-VkCommandBufferInheritanceInfo-queryFlags-02788

If the inheritedQueries feature is not enabled, queryFlags must be 0

VUID-VkCommandBufferInheritanceInfo-pipelineStatistics-02789

If the pipelineStatisticsQuery feature is enabled, pipelineStatistics must be a valid combination of VkQueryPipelineStatisticFlagBits values

VUID-VkCommandBufferInheritanceInfo-pipelineStatistics-00058

If the pipelineStatisticsQuery feature is not enabled, pipelineStatistics must be 0

Valid Usage (Implicit)

VUID-VkCommandBufferInheritanceInfo-sType-sType

sType must be VK_STRUCTURE_TYPE_COMMAND_BUFFER_INHERITANCE_INFO

VUID-VkCommandBufferInheritanceInfo-sType-unique

The sType value of each struct in the pNext chain must be unique

VUID-VkCommandBufferInheritanceInfo-commonparent

Both of framebuffer, and renderPass that are valid handles of non-ignored parameters must have been created, allocated, or retrieved from the same VkDevice