1// Copyright 2020-2023 The Khronos Group Inc.
2//
3// SPDX-License-Identifier: CC-BY-4.0
4
5// Common Valid Usage
6// Common to VkCmdCopyBufferToImage* commands
7  * [[VUID-{refpage}-pRegions-00171]]
8    pname:srcBuffer must: be large enough to contain all buffer locations
9    that are accessed according to <<copies-buffers-images-addressing,Buffer
10    and Image Addressing>>, for each element of pname:pRegions
11  * The union of all source regions, and the union of all destination
12    regions, specified by the elements of pname:pRegions, must: not overlap
13    in memory
14  * pname:srcBuffer must: have been created with
15    ename:VK_BUFFER_USAGE_TRANSFER_SRC_BIT usage flag
16ifdef::VK_VERSION_1_1,VK_KHR_maintenance1[]
17  * The <<resources-image-format-features,format features>> of
18    pname:dstImage must: contain ename:VK_FORMAT_FEATURE_TRANSFER_DST_BIT
19endif::VK_VERSION_1_1,VK_KHR_maintenance1[]
20  * [[VUID-{refpage}-srcBuffer-00176]]
21    If pname:srcBuffer is non-sparse then it must: be bound completely and
22    contiguously to a single sname:VkDeviceMemory object
23  * [[VUID-{refpage}-dstImage-00177]]
24    pname:dstImage must: have been created with
25    ename:VK_IMAGE_USAGE_TRANSFER_DST_BIT usage flag
26  * [[VUID-{refpage}-dstImage-00178]]
27    If pname:dstImage is non-sparse then it must: be bound completely and
28    contiguously to a single sname:VkDeviceMemory object
29  * pname:dstImage must: have a sample count equal to
30    ename:VK_SAMPLE_COUNT_1_BIT
31  * pname:dstImageLayout must: specify the layout of the image subresources
32    of pname:dstImage specified in pname:pRegions at the time this command
33    is executed on a sname:VkDevice
34ifndef::VK_KHR_shared_presentable_image[]
35  * [[VUID-{refpage}-dstImageLayout-00181]]
36    pname:dstImageLayout must: be ename:VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL
37    or ename:VK_IMAGE_LAYOUT_GENERAL
38endif::VK_KHR_shared_presentable_image[]
39// Common Valid Usage
40