VkResolveImageInfo2
The VkResolveImageInfo2 structure is defined as:
typedef struct VkResolveImageInfo2 {
VkStructureType sType;
const void* pNext;
VkImage srcImage;
VkImageLayout srcImageLayout;
VkImage dstImage;
VkImageLayout dstImageLayout;
uint32_t regionCount;
const VkImageResolve2* pRegions;
} VkResolveImageInfo2;
pub struct ResolveImageInfo2 {
s_type: vk::StructureType,
p_next: *const c_void,
src_image: vk::Image,
src_image_layout: vk::ImageLayout,
dst_image: vk::Image,
dst_image_layout: vk::ImageLayout,
region_count: u32,
p_regions: *const vk::ImageResolve2,
}
typedef VkResolveImageInfo2 VkResolveImageInfo2KHR;
type ResolveImageInfo2KHR = vk::ResolveImageInfo2;
sTypeis a VkStructureType value identifying this structure.pNextisNULLor a pointer to a structure extending this structure.srcImageis the source image.srcImageLayoutis the layout of the source image subresources for the resolve.dstImageis the destination image.dstImageLayoutis the layout of the destination image subresources for the resolve.regionCountis the number of regions to resolve.pRegionsis a pointer to an array of VkImageResolve2 structures specifying the regions to resolve.
If the source format is a floating-point or normalized type, the resolve
mode is chosen as implementation-dependent behavior, unless
VkResolveImageModeInfoKHR is included in the pNext chain, in
which case it is defined by
VkResolveImageModeInfoKHR::resolveMode.
If the resolve mode requires to calculate the result from multiple samples,
such as by computing an average or weighted average of the samples, the
values for each pixel are resolved with implementation-defined numerical
precision.
If the numeric format of srcImage uses sRGB
encoding and the resolve mode requires the implementation to convert the
samples to floating-point to perform the calculations, the implementation
should convert samples from nonlinear to linear before resolving the
samples as described in the sRGB EOTF section of the
Khronos Data Format Specification.
In this case, the implementation must convert the linear averaged value to
nonlinear before writing the resolved result to dstImage.
If the maintenance10 feature is enabled,
whether a nonlinear to linear conversion happens for sRGB encoded resolve is
controlled by
resolveSrgbFormatAppliesTransferFunction.
If VkResolveImageModeInfoKHR is included in the pNext chain,
this default behavior can be overridden with
VK_RESOLVE_IMAGE_SKIP_TRANSFER_FUNCTION_BIT_KHR or
VK_RESOLVE_IMAGE_ENABLE_TRANSFER_FUNCTION_BIT_KHR flags.
If the source format is an integer type, a single sample’s value is selected
for each pixel, unless VkResolveImageModeInfoKHR is included in the
pNext chain, in which case it is defined by
VkResolveImageModeInfoKHR::resolveMode or
VkResolveImageModeInfoKHR::stencilResolveMode depending on which
aspect is being resolved.
Valid Usage
VUID-VkResolveImageInfo2-pRegions-00255
The union of all source regions, and the union of all destination
regions, specified by the elements of pRegions, must not overlap
in memory
VUID-VkResolveImageInfo2-srcImage-00256
If srcImage is non-sparse then it must be bound completely and
contiguously to a single VkDeviceMemory object
VUID-VkResolveImageInfo2-srcImage-00257
srcImage must have a sample count equal to any valid sample count
value other than VK_SAMPLE_COUNT_1_BIT
VUID-VkResolveImageInfo2-dstImage-00258
If dstImage is non-sparse then it must be bound completely and
contiguously to a single VkDeviceMemory object
VUID-VkResolveImageInfo2-dstImage-00259
dstImage must have a sample count equal to
VK_SAMPLE_COUNT_1_BIT
VUID-VkResolveImageInfo2-srcImageLayout-00260
srcImageLayout must specify the layout of the image subresources
of srcImage specified in pRegions at the time this command
is executed on a VkDevice
VUID-VkResolveImageInfo2-srcImageLayout-01400
srcImageLayout must be
VK_IMAGE_LAYOUT_SHARED_PRESENT_KHR,
VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL or
VK_IMAGE_LAYOUT_GENERAL
VUID-VkResolveImageInfo2-dstImageLayout-00262
dstImageLayout must specify the layout of the image subresources
of dstImage specified in pRegions at the time this command
is executed on a VkDevice
VUID-VkResolveImageInfo2-dstImageLayout-01401
dstImageLayout must be
VK_IMAGE_LAYOUT_SHARED_PRESENT_KHR,
VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL or
VK_IMAGE_LAYOUT_GENERAL
VUID-VkResolveImageInfo2-maintenance10-11799
If the maintenance10 feature is
enabled, the format features of
dstImage must contain
VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BIT or
VK_FORMAT_FEATURE_DEPTH_STENCIL_ATTACHMENT_BIT
VUID-VkResolveImageInfo2-dstImage-02003
The format features of
dstImage must contain
VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BIT
if the maintenance10 feature is not
enabled
VUID-VkResolveImageInfo2-linearColorAttachment-06519
If the linearColorAttachment
feature is enabled and the image is created with
VK_IMAGE_TILING_LINEAR, the
format features of dstImagemust contain VK_FORMAT_FEATURE_2_LINEAR_COLOR_ATTACHMENT_BIT_NV
VUID-VkResolveImageInfo2-srcImage-01386
srcImage and dstImage must have been created with the same
image format
VUID-VkResolveImageInfo2-srcSubresource-01709
The srcSubresource.mipLevel member of each element of
pRegions must be less than the mipLevels specified in
VkImageCreateInfo when srcImage was created
VUID-VkResolveImageInfo2-dstSubresource-01710
The dstSubresource.mipLevel member of each element of
pRegions must be less than the mipLevels specified in
VkImageCreateInfo when dstImage was created
VUID-VkResolveImageInfo2-srcSubresource-01711
If srcSubresource.layerCount is not
VK_REMAINING_ARRAY_LAYERS,
srcSubresource.baseArrayLayer +
srcSubresource.layerCount of each element of pRegions must
be less than or equal to the arrayLayers specified in
VkImageCreateInfo when srcImage was created
VUID-VkResolveImageInfo2-dstSubresource-01712
If dstSubresource.layerCount is not
VK_REMAINING_ARRAY_LAYERS,
dstSubresource.baseArrayLayer +
dstSubresource.layerCount of each element of pRegions must
be less than or equal to the arrayLayers specified in
VkImageCreateInfo when dstImage was created
VUID-VkResolveImageInfo2-dstImage-02546
dstImage and srcImage must not have been created with
flags containing VK_IMAGE_CREATE_SUBSAMPLED_BIT_EXT
VUID-VkResolveImageInfo2-srcImage-04446
If dstImage is of type VK_IMAGE_TYPE_3D, then for each
element of pRegions, srcSubresource.layerCount must be 1
VUID-VkResolveImageInfo2-srcImage-04447
If dstImage is of type VK_IMAGE_TYPE_3D, then for each
element of pRegions, dstSubresource.baseArrayLayer must be
0 and dstSubresource.layerCount must be 1
VUID-VkResolveImageInfo2-srcOffset-00269
For each element of pRegions, srcOffset.x and
(extent.width + srcOffset.x) must both be
greater than or equal to 0 and less than or equal to the width of the
specified srcSubresource of srcImage
VUID-VkResolveImageInfo2-srcOffset-00270
For each element of pRegions, srcOffset.y and
(extent.height + srcOffset.y) must both be
greater than or equal to 0 and less than or equal to the height of the
specified srcSubresource of srcImage
VUID-VkResolveImageInfo2-srcImage-00271
If srcImage is of type VK_IMAGE_TYPE_1D, then for each
element of pRegions, srcOffset.y must be 0 and
extent.height must be 1
VUID-VkResolveImageInfo2-srcOffset-00272
For each element of pRegions, srcOffset.z and
(extent.depth + srcOffset.z) must both be
greater than or equal to 0 and less than or equal to the depth of the
specified srcSubresource of srcImage
VUID-VkResolveImageInfo2-srcImage-00273
If srcImage is of type VK_IMAGE_TYPE_1D or
VK_IMAGE_TYPE_2D, then for each element of pRegions,
srcOffset.z must be 0 and extent.depth must be 1
VUID-VkResolveImageInfo2-dstOffset-00274
For each element of pRegions, dstOffset.x and
(extent.width + dstOffset.x) must both be
greater than or equal to 0 and less than or equal to the width of the
specified dstSubresource of dstImage
VUID-VkResolveImageInfo2-dstOffset-00275
For each element of pRegions, dstOffset.y and
(extent.height + dstOffset.y) must both be
greater than or equal to 0 and less than or equal to the height of the
specified dstSubresource of dstImage
VUID-VkResolveImageInfo2-dstImage-00276
If dstImage is of type VK_IMAGE_TYPE_1D, then for each
element of pRegions, dstOffset.y must be 0 and
extent.height must be 1
VUID-VkResolveImageInfo2-dstOffset-00277
For each element of pRegions, dstOffset.z and
(extent.depth + dstOffset.z) must both be
greater than or equal to 0 and less than or equal to the depth of the
specified dstSubresource of dstImage
VUID-VkResolveImageInfo2-dstImage-00278
If dstImage is of type VK_IMAGE_TYPE_1D or
VK_IMAGE_TYPE_2D, then for each element of pRegions,
dstOffset.z must be 0 and extent.depth must be 1
VUID-VkResolveImageInfo2-srcImage-06762
srcImage must have been created with the
VK_IMAGE_USAGE_TRANSFER_SRC_BIT usage flag set
VUID-VkResolveImageInfo2-srcImage-06763
The format features of
srcImage must contain VK_FORMAT_FEATURE_TRANSFER_SRC_BIT
VUID-VkResolveImageInfo2-dstImage-06764
dstImage must have been created with the
VK_IMAGE_USAGE_TRANSFER_DST_BIT usage flag set
VUID-VkResolveImageInfo2-dstImage-06765
The format features of
dstImage must contain VK_FORMAT_FEATURE_TRANSFER_DST_BIT
VUID-VkResolveImageInfo2-srcSubresource-11800
srcSubresource.aspectMask for each element in pRegions must
not specify an aspect which is not part of the image format of
srcImage
VUID-VkResolveImageInfo2-dstSubresource-11801
dstSubresource.aspectMask for each element in pRegions must
not specify an aspect which is not part of the image format of
dstImage
VUID-VkResolveImageInfo2-srcSubresource-11802
srcSubresource.aspectMask must equal
dstSubresource.aspectMask for each element in pRegions
VUID-VkResolveImageInfo2-pNext-10982
If VkResolveImageModeInfoKHR is included in the pNext chain,
flags includes
VK_RESOLVE_IMAGE_SKIP_TRANSFER_FUNCTION_BIT_KHR or
VK_RESOLVE_IMAGE_ENABLE_TRANSFER_FUNCTION_BIT_KHR, then the format
of srcImage and dstImage must use sRGB encoding
VUID-VkResolveImageInfo2-srcImage-10983
If srcImage has a color format and VkResolveImageModeInfoKHR
is included in the pNext chain, its resolveMode must not be
VK_RESOLVE_MODE_NONE
VUID-VkResolveImageInfo2-srcImage-10984
If srcImage has a non-integer color format, and
VkResolveImageModeInfoKHR is included in the pNext chain,
its resolveMode must be VK_RESOLVE_MODE_AVERAGE_BIT
VUID-VkResolveImageInfo2-srcImage-10985
If srcImage has an integer color format, and
VkResolveImageModeInfoKHR is included in the pNext chain,
its resolveMode must be VK_RESOLVE_MODE_SAMPLE_ZERO_BIT
VUID-VkResolveImageInfo2-srcImage-10986
If srcImage has a depth-stencil format,
VkResolveImageModeInfoKHR must be included in the pNext
chain
VUID-VkResolveImageInfo2-srcImage-10987
If srcImage has a depth-stencil format, and a depth aspect is
referenced by pRegions,
VkResolveImageModeInfoKHR::resolveMode must not be
VK_RESOLVE_MODE_NONE
VUID-VkResolveImageInfo2-srcImage-10988
If srcImage has a depth-stencil format, and a stencil aspect is
referenced by pRegions,
VkResolveImageModeInfoKHR::stencilResolveMode must not be
VK_RESOLVE_MODE_NONE
VUID-VkResolveImageInfo2-srcImage-10989
If srcImage has a depth-stencil format, and a depth aspect is
referenced by pRegions,
VkResolveImageModeInfoKHR::resolveMode must be one of the
bits set in
VkPhysicalDeviceDepthStencilResolveProperties::supportedDepthResolveModes
VUID-VkResolveImageInfo2-srcImage-10990
If srcImage has a depth-stencil format, and a stencil aspect is
referenced by pRegions,
VkResolveImageModeInfoKHR::stencilResolveMode must be one
of the bits set in
VkPhysicalDeviceDepthStencilResolveProperties::supportedStencilResolveModes
VUID-VkResolveImageInfo2-srcImage-10991
If srcImage has a depth-stencil format, and both a depth aspect
and stencil aspect is referenced by pRegions, and
VkPhysicalDeviceDepthStencilResolveProperties::indepdendentResolve
is VK_FALSE, VkResolveImageModeInfoKHR::resolveModemust be equal to
VkResolveImageModeInfoKHR::stencilResolveMode
VUID-VkResolveImageInfo2-srcImage-10992
If srcImage has a depth-stencil format containing both a depth
aspect and stencil aspect, and
VkPhysicalDeviceDepthStencilResolveProperties::indepdendentResolveNone
is VK_FALSE, every element of pRegions must contain both
depth and stencil aspects
Valid Usage (Implicit)
VUID-VkResolveImageInfo2-sType-sType
sType must be VK_STRUCTURE_TYPE_RESOLVE_IMAGE_INFO_2
VUID-VkResolveImageInfo2-pNext-pNext
pNext must be NULL or a pointer to a valid instance of VkResolveImageModeInfoKHR
VUID-VkResolveImageInfo2-sType-unique
The sType value of each structure in the pNext chain must be unique
VUID-VkResolveImageInfo2-srcImage-parameter
srcImage must be a valid VkImage handle
VUID-VkResolveImageInfo2-srcImageLayout-parameter
srcImageLayout must be a valid VkImageLayout value
VUID-VkResolveImageInfo2-dstImage-parameter
dstImage must be a valid VkImage handle
VUID-VkResolveImageInfo2-dstImageLayout-parameter
dstImageLayout must be a valid VkImageLayout value
VUID-VkResolveImageInfo2-pRegions-parameter
pRegions must be a valid pointer to an array of regionCount valid VkImageResolve2 structures
VUID-VkResolveImageInfo2-regionCount-arraylength
regionCount must be greater than 0
VUID-VkResolveImageInfo2-commonparent
Both of dstImage, and srcImage must have been created, allocated, or retrieved from the same VkDevice