Function Prototype

vkCmdBeginCustomResolveEXT

Begins a shader resolve operation

To begin resolving attachments using render pass draws, call:

void vkCmdBeginCustomResolveEXT(
    VkCommandBuffer commandBuffer,
    const VkBeginCustomResolveInfoEXT* pBeginCustomResolveInfo);
  • commandBuffer is the command buffer in which to record the command.
  • pBeginCustomResolveInfo is an optional struct with which to extend functionality.

Following this call, any resolveImageView with resolveMode set to VK_RESOLVE_MODE_CUSTOM_BIT_EXT will be written by outputs which would otherwise have written to the imageView image until the end of the current render pass instance.

Following this call, the fragment area may be reduced to (1,1) if a fragment density map is attached. If this occurs, reads of input attachments mapped to a color, depth, or stencil attachment return the value for the original larger fragment containing the smaller fragment. Reads of input attachments not mapped to a color, depth, or stencil attachment use the new fragment area.

Because the content of any depth/stencil resolve attachment as well as any color resolve attachment is undefined at the beginning of a resolve operation, any depth testing, stencil testing, or blending operation which sources these undefined values also has undefined result value.

During a custom resolve pass, multiple fragment invocations writing to the same (x, y, layer, view, sample) coordinate, i.e. overdraw, will produce undefined behavior.

Implementations are allowed to implement custom resolve attachment writes through other mechanisms than framebuffer attachment writes, which would normally obey rules of rasterization order.

Valid Usage

VUID-vkCmdBeginCustomResolveEXT-commandBuffer-11517

The current render pass instance must have been started or resumed by vkCmdBeginRendering in this commandBuffer

VUID-vkCmdBeginCustomResolveEXT-None-11518

vkCmdBeginCustomResolveEXT must not have already been recorded in the current render pass instance

VUID-vkCmdBeginCustomResolveEXT-None-11519

The current render pass instance must have specified VK_RENDERING_CUSTOM_RESOLVE_BIT_EXT

VUID-vkCmdBeginCustomResolveEXT-None-11520

The current render pass instance must not have specified VK_RENDERING_SUSPENDING_BIT

Valid Usage (Implicit)

VUID-vkCmdBeginCustomResolveEXT-pBeginCustomResolveInfo-parameter

If pBeginCustomResolveInfo is not NULL, pBeginCustomResolveInfo must be a valid pointer to a valid VkBeginCustomResolveInfoEXT structure

VUID-vkCmdBeginCustomResolveEXT-commandBuffer-cmdpool

The VkCommandPool that commandBuffer was allocated from must support VK_QUEUE_GRAPHICS_BIT operations

VUID-vkCmdBeginCustomResolveEXT-renderpass

This command must only be called inside of a render pass instance

VUID-vkCmdBeginCustomResolveEXT-suspended

This command must not be called between suspended render pass instances

VUID-vkCmdBeginCustomResolveEXT-videocoding

This command must only be called outside of a video coding scope

Host Synchronization

  • Host access to commandBuffer must be externally synchronized
  • Host access to the VkCommandPool that commandBuffer was allocated from must be externally synchronized