1// Copyright 2023 The Khronos Group Inc.
2//
3// SPDX-License-Identifier: CC-BY-4.0
4
5// Common Valid Usage
6// Common to vk*Copy* commands that have image as source and/or destination.
7// This relies on an additional attribute {imageparam} set by the command
8// which includes this file, specifying the name of the source or
9// destination image.
10// Additionally, it relies on the {imagesubresource} attribute to specify the
11// field in pRegions corresponding to {imageparam}
12
13  * [[VUID-{refpage}-{imageparam}-07966]]
14    If pname:{imageparam} is non-sparse then the image
15ifdef::VK_VERSION_1_1,VK_KHR_sampler_ycbcr_conversion[]
16    or the specified _disjoint_ plane
17endif::VK_VERSION_1_1,VK_KHR_sampler_ycbcr_conversion[]
18    must: be bound completely and contiguously to a single
19    sname:VkDeviceMemory object
20  * [[VUID-{refpage}-{imagesubresource}-07967]]
21    The pname:{imagesubresource}.mipLevel member of each element of
22    pname:pRegions must: be less than the pname:mipLevels specified in
23    slink:VkImageCreateInfo when pname:{imageparam} was created
24  * [[VUID-{refpage}-{imagesubresource}-07968]]
25ifdef::VK_KHR_maintenance5[]
26    If pname:{imageSubresource}.layerCount is not
27    ename:VK_REMAINING_ARRAY_LAYERS,
28endif::VK_KHR_maintenance5[]
29    [eq]#pname:{imagesubresource}.baseArrayLayer {plus}
30    pname:{imageSubresource}.layerCount# of each element of pname:pRegions
31    must: be less than or equal to the pname:arrayLayers specified in
32    slink:VkImageCreateInfo when pname:{imageparam} was created
33ifdef::VK_EXT_fragment_density_map[]
34  * [[VUID-{refpage}-{imageparam}-07969]]
35    pname:{imageparam} must: not have been created with pname:flags
36    containing ename:VK_IMAGE_CREATE_SUBSAMPLED_BIT_EXT
37endif::VK_EXT_fragment_density_map[]
38// Common Valid Usage
39