1// Copyright 2022-2023 The Khronos Group Inc. 2// 3// SPDX-License-Identifier: CC-BY-4.0 4 5// Common Valid Usage 6// Common to vk*Copy*ToImage* commands 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// Finally, it relies on the {imageoffset} and {imageextents} attributes to 13// specify the fields in pRegions corresponding to the offset and extent of the 14// copy. 15 16 * [[VUID-{refpage}-{imageparam}-09109]] 17 If pname:{imageparam} is sparse then all memory ranges accessed by the 18 copy command must: be bound as described in 19 <<sparsememory-resource-binding, Binding Resource Memory>> 20 * [[VUID-{refpage}-{imageparam}-09111]] 21ifdef::VK_VERSION_1_2,VK_EXT_separate_stencil_usage[] 22 If the stencil aspect of pname:{imageparam} is accessed, and 23 pname:{imageparam} was not created with 24 <<VkImageStencilUsageCreateInfo,separate stencil usage>>, 25endif::VK_VERSION_1_2,VK_EXT_separate_stencil_usage[] 26 pname:{imageparam} must: have been created with 27 ename:VK_IMAGE_USAGE_HOST_TRANSFER_BIT_EXT set in 28 slink:VkImageCreateInfo::pname:usage 29ifdef::VK_VERSION_1_2,VK_EXT_separate_stencil_usage[] 30 * [[VUID-{refpage}-{imageparam}-09112]] 31 If the stencil aspect of pname:{imageparam} is accessed, and 32 pname:{imageparam} was created with 33 <<VkImageStencilUsageCreateInfo,separate stencil usage>>, 34 pname:{imageparam} must: have been created with 35 ename:VK_IMAGE_USAGE_HOST_TRANSFER_BIT_EXT set in 36 slink:VkImageStencilUsageCreateInfo::pname:stencilUsage 37 * [[VUID-{refpage}-{imageparam}-09113]] 38 If non-stencil aspects of pname:{imageparam} are accessed, 39 pname:{imageparam} must: have been created with 40 ename:VK_IMAGE_USAGE_HOST_TRANSFER_BIT_EXT set in 41 slink:VkImageCreateInfo::pname:usage 42endif::VK_VERSION_1_2,VK_EXT_separate_stencil_usage[] 43 * [[VUID-{refpage}-{imageoffset}-09114]] 44 If pname:flags contains ename:VK_HOST_IMAGE_COPY_MEMCPY_EXT, the 45 pname:x, pname:y, and pname:z members of the pname:{imageoffset} member 46 of each element of pname:pRegions must: be `0` 47 * [[VUID-{refpage}-{imageparam}-09115]] 48 If pname:flags contains ename:VK_HOST_IMAGE_COPY_MEMCPY_EXT, the 49 pname:{imageextent} member of each element of pname:pRegions must: equal 50 the extents of pname:{imageparam} identified by pname:{imagesubresource} 51// Common Valid Usage 52