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
13ifndef::VK_VERSION_1_1,VK_KHR_sampler_ycbcr_conversion[]
14  * [[VUID-{refpage}-{imageparam}-97965]]
15    If pname:{imageparam} is non-sparse then it must: be bound completely
16    and contiguously to a single sname:VkDeviceMemory object
17endif::VK_VERSION_1_1,VK_KHR_sampler_ycbcr_conversion[]
18ifdef::VK_VERSION_1_1,VK_KHR_sampler_ycbcr_conversion[]
19  * [[VUID-{refpage}-{imageparam}-97966]]
20    If pname:{imageparam} is non-sparse then the image or the specified
21    _disjoint_ plane must: be bound completely and contiguously to a single
22    sname:VkDeviceMemory object
23endif::VK_VERSION_1_1,VK_KHR_sampler_ycbcr_conversion[]
24  * [[VUID-{refpage}-{imagesubresource}-97967]]
25    The pname:{imagesubresource}.mipLevel member of each element of
26    pname:pRegions must: be less than the pname:mipLevels specified in
27    slink:VkImageCreateInfo when pname:{imageparam} was created
28  * [[VUID-{refpage}-{imagesubresource}-97968]]
29    The [eq]#pname:{imagesubresource}.baseArrayLayer {plus}
30    pname:{imageSubresource}.layerCount# of each element of pname:pRegions
31ifdef::VK_KHR_maintenance5[]
32    , if pname:{imageSubresource}.layerCount is not
33    ename:VK_REMAINING_ARRAY_LAYERS and <<features-maintenance5,
34    pname:maintenance5>> is not enabled,
35endif::VK_KHR_maintenance5[]
36    must: be less than or equal to the pname:arrayLayers specified in
37    slink:VkImageCreateInfo when pname:{imageparam} was created
38ifdef::VK_EXT_fragment_density_map[]
39  * [[VUID-{refpage}-{imageparam}-97969]]
40    pname:{imageparam} must: not have been created with pname:flags
41    containing ename:VK_IMAGE_CREATE_SUBSAMPLED_BIT_EXT
42endif::VK_EXT_fragment_density_map[]
43// Common Valid Usage
44