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 VkCmdBlitImage* commands 7 * [[VUID-{refpage}-pRegions-00215]] 8 The source region specified by each element of pname:pRegions must: be a 9 region that is contained within pname:srcImage 10 * [[VUID-{refpage}-pRegions-00216]] 11 The destination region specified by each element of pname:pRegions must: 12 be a region that is contained within pname:dstImage 13 * [[VUID-{refpage}-pRegions-00217]] 14 The union of all destination regions, specified by the elements of 15 pname:pRegions, must: not overlap in memory with any texel that may: be 16 sampled during the blit operation 17 * [[VUID-{refpage}-srcImage-01999]] 18 The <<resources-image-format-features,format features>> of 19 pname:srcImage must: contain ename:VK_FORMAT_FEATURE_BLIT_SRC_BIT 20ifdef::VK_VERSION_1_1,VK_KHR_sampler_ycbcr_conversion[] 21 * [[VUID-{refpage}-srcImage-06421]] 22 pname:srcImage must: not use a 23 <<formats-requiring-sampler-ycbcr-conversion, format that requires a 24 sampler {YCbCr} conversion>> 25endif::VK_VERSION_1_1,VK_KHR_sampler_ycbcr_conversion[] 26 * [[VUID-{refpage}-srcImage-00219]] 27 pname:srcImage must: have been created with 28 ename:VK_IMAGE_USAGE_TRANSFER_SRC_BIT usage flag 29 * [[VUID-{refpage}-srcImage-00220]] 30 If pname:srcImage is non-sparse then it must: be bound completely and 31 contiguously to a single sname:VkDeviceMemory object 32 * [[VUID-{refpage}-srcImageLayout-00221]] 33 pname:srcImageLayout must: specify the layout of the image subresources 34 of pname:srcImage specified in pname:pRegions at the time this command 35 is executed on a sname:VkDevice 36ifndef::VK_KHR_shared_presentable_image[] 37 * [[VUID-{refpage}-srcImageLayout-00222]] 38 pname:srcImageLayout must: be ename:VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL 39 or ename:VK_IMAGE_LAYOUT_GENERAL 40endif::VK_KHR_shared_presentable_image[] 41ifdef::VK_KHR_shared_presentable_image[] 42 * [[VUID-{refpage}-srcImageLayout-01398]] 43 pname:srcImageLayout must: be ename:VK_IMAGE_LAYOUT_SHARED_PRESENT_KHR, 44 ename:VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL or 45 ename:VK_IMAGE_LAYOUT_GENERAL 46endif::VK_KHR_shared_presentable_image[] 47 * [[VUID-{refpage}-dstImage-02000]] 48 The <<resources-image-format-features,format features>> of 49 pname:dstImage must: contain ename:VK_FORMAT_FEATURE_BLIT_DST_BIT 50ifdef::VK_VERSION_1_1,VK_KHR_sampler_ycbcr_conversion[] 51 * [[VUID-{refpage}-dstImage-06422]] 52 pname:dstImage must: not use a 53 <<formats-requiring-sampler-ycbcr-conversion, format that requires a 54 sampler {YCbCr} conversion>> 55endif::VK_VERSION_1_1,VK_KHR_sampler_ycbcr_conversion[] 56 * [[VUID-{refpage}-dstImage-00224]] 57 pname:dstImage must: have been created with 58 ename:VK_IMAGE_USAGE_TRANSFER_DST_BIT usage flag 59 * [[VUID-{refpage}-dstImage-00225]] 60 If pname:dstImage is non-sparse then it must: be bound completely and 61 contiguously to a single sname:VkDeviceMemory object 62 * [[VUID-{refpage}-dstImageLayout-00226]] 63 pname:dstImageLayout must: specify the layout of the image subresources 64 of pname:dstImage specified in pname:pRegions at the time this command 65 is executed on a sname:VkDevice 66ifndef::VK_KHR_shared_presentable_image[] 67 * [[VUID-{refpage}-dstImageLayout-00227]] 68 pname:dstImageLayout must: be ename:VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL 69 or ename:VK_IMAGE_LAYOUT_GENERAL 70endif::VK_KHR_shared_presentable_image[] 71ifdef::VK_KHR_shared_presentable_image[] 72 * [[VUID-{refpage}-dstImageLayout-01399]] 73 pname:dstImageLayout must: be ename:VK_IMAGE_LAYOUT_SHARED_PRESENT_KHR, 74 ename:VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL or 75 ename:VK_IMAGE_LAYOUT_GENERAL 76endif::VK_KHR_shared_presentable_image[] 77 * [[VUID-{refpage}-srcImage-00229]] 78 If either of pname:srcImage or pname:dstImage was created with a signed 79 integer elink:VkFormat, the other must: also have been created with a 80 signed integer elink:VkFormat 81 * [[VUID-{refpage}-srcImage-00230]] 82 If either of pname:srcImage or pname:dstImage was created with an 83 unsigned integer elink:VkFormat, the other must: also have been created 84 with an unsigned integer elink:VkFormat 85 * [[VUID-{refpage}-srcImage-00231]] 86 If either of pname:srcImage or pname:dstImage was created with a 87 depth/stencil format, the other must: have exactly the same format 88 * [[VUID-{refpage}-srcImage-00232]] 89 If pname:srcImage was created with a depth/stencil format, pname:filter 90 must: be ename:VK_FILTER_NEAREST 91 * [[VUID-{refpage}-srcImage-00233]] 92 pname:srcImage must: have been created with a pname:samples value of 93 ename:VK_SAMPLE_COUNT_1_BIT 94 * [[VUID-{refpage}-dstImage-00234]] 95 pname:dstImage must: have been created with a pname:samples value of 96 ename:VK_SAMPLE_COUNT_1_BIT 97 * [[VUID-{refpage}-filter-02001]] 98 If pname:filter is ename:VK_FILTER_LINEAR, then the 99 <<resources-image-format-features,format features>> of pname:srcImage 100 must: contain ename:VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT 101ifdef::VK_IMG_filter_cubic,VK_EXT_filter_cubic[] 102 * [[VUID-{refpage}-filter-02002]] 103 If pname:filter is ename:VK_FILTER_CUBIC_EXT, then the 104 <<resources-image-format-features,format features>> of pname:srcImage 105 must: contain ename:VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_CUBIC_BIT_EXT 106 * [[VUID-{refpage}-filter-00237]] 107 If pname:filter is ename:VK_FILTER_CUBIC_EXT, pname:srcImage must: be of 108 type ename:VK_IMAGE_TYPE_2D 109endif::VK_IMG_filter_cubic,VK_EXT_filter_cubic[] 110 * [[VUID-{refpage}-srcSubresource-01705]] 111 The pname:srcSubresource.mipLevel member of each element of 112 pname:pRegions must: be less than the pname:mipLevels specified in 113 slink:VkImageCreateInfo when pname:srcImage was created 114 * [[VUID-{refpage}-dstSubresource-01706]] 115 The pname:dstSubresource.mipLevel member of each element of 116 pname:pRegions must: be less than the pname:mipLevels specified in 117 slink:VkImageCreateInfo when pname:dstImage was created 118 * [[VUID-{refpage}-srcSubresource-01707]] 119ifdef::VK_KHR_maintenance5[] 120 If pname:srcSubresource.layerCount is not 121 ename:VK_REMAINING_ARRAY_LAYERS, 122endif::VK_KHR_maintenance5[] 123 [eq]#pname:srcSubresource.baseArrayLayer {plus} 124 pname:srcSubresource.layerCount# of each element of pname:pRegions must: 125 be less than or equal to the pname:arrayLayers specified in 126 slink:VkImageCreateInfo when pname:srcImage was created 127 * [[VUID-{refpage}-dstSubresource-01708]] 128ifdef::VK_KHR_maintenance5[] 129 If pname:srcSubresource.layerCount is not 130 ename:VK_REMAINING_ARRAY_LAYERS, 131endif::VK_KHR_maintenance5[] 132 [eq]#pname:dstSubresource.baseArrayLayer {plus} 133 pname:dstSubresource.layerCount# of each element of pname:pRegions must: 134 be less than or equal to the pname:arrayLayers specified in 135 slink:VkImageCreateInfo when pname:dstImage was created 136ifdef::VK_EXT_fragment_density_map[] 137 * [[VUID-{refpage}-dstImage-02545]] 138 pname:dstImage and pname:srcImage must: not have been created with 139 pname:flags containing ename:VK_IMAGE_CREATE_SUBSAMPLED_BIT_EXT 140endif::VK_EXT_fragment_density_map[] 141 * [[VUID-{refpage}-srcImage-00240]] 142 If either pname:srcImage or pname:dstImage is of type 143 ename:VK_IMAGE_TYPE_3D, then for each element of pname:pRegions, 144 pname:srcSubresource.baseArrayLayer and 145 pname:dstSubresource.baseArrayLayer must: each be `0`, and 146 pname:srcSubresource.layerCount and pname:dstSubresource.layerCount 147 must: each be `1` 148 * [[VUID-{refpage}-aspectMask-00241]] 149 For each element of pname:pRegions, pname:srcSubresource.aspectMask 150 must: specify aspects present in pname:srcImage 151 * [[VUID-{refpage}-aspectMask-00242]] 152 For each element of pname:pRegions, pname:dstSubresource.aspectMask 153 must: specify aspects present in pname:dstImage 154 * [[VUID-{refpage}-srcOffset-00243]] 155 For each element of pname:pRegions, pname:srcOffsets[0].x and 156 pname:srcOffsets[1].x must: both be greater than or equal to `0` and 157 less than or equal to the width of the specified pname:srcSubresource of 158 pname:srcImage 159 * [[VUID-{refpage}-srcOffset-00244]] 160 For each element of pname:pRegions, pname:srcOffsets[0].y and 161 pname:srcOffsets[1].y must: both be greater than or equal to `0` and 162 less than or equal to the height of the specified pname:srcSubresource 163 of pname:srcImage 164 * [[VUID-{refpage}-srcImage-00245]] 165 If pname:srcImage is of type ename:VK_IMAGE_TYPE_1D, then for each 166 element of pname:pRegions, pname:srcOffsets[0].y must: be `0` and 167 pname:srcOffsets[1].y must: be `1` 168 * [[VUID-{refpage}-srcOffset-00246]] 169 For each element of pname:pRegions, pname:srcOffsets[0].z and 170 pname:srcOffsets[1].z must: both be greater than or equal to `0` and 171 less than or equal to the depth of the specified pname:srcSubresource of 172 pname:srcImage 173 * [[VUID-{refpage}-srcImage-00247]] 174 If pname:srcImage is of type ename:VK_IMAGE_TYPE_1D or 175 ename:VK_IMAGE_TYPE_2D, then for each element of pname:pRegions, 176 pname:srcOffsets[0].z must: be `0` and pname:srcOffsets[1].z must: be 177 `1` 178 * [[VUID-{refpage}-dstOffset-00248]] 179 For each element of pname:pRegions, pname:dstOffsets[0].x and 180 pname:dstOffsets[1].x must: both be greater than or equal to `0` and 181 less than or equal to the width of the specified pname:dstSubresource of 182 pname:dstImage 183 * [[VUID-{refpage}-dstOffset-00249]] 184 For each element of pname:pRegions, pname:dstOffsets[0].y and 185 pname:dstOffsets[1].y must: both be greater than or equal to `0` and 186 less than or equal to the height of the specified pname:dstSubresource 187 of pname:dstImage 188 * [[VUID-{refpage}-dstImage-00250]] 189 If pname:dstImage is of type ename:VK_IMAGE_TYPE_1D, then for each 190 element of pname:pRegions, pname:dstOffsets[0].y must: be `0` and 191 pname:dstOffsets[1].y must: be `1` 192 * [[VUID-{refpage}-dstOffset-00251]] 193 For each element of pname:pRegions, pname:dstOffsets[0].z and 194 pname:dstOffsets[1].z must: both be greater than or equal to `0` and 195 less than or equal to the depth of the specified pname:dstSubresource of 196 pname:dstImage 197 * [[VUID-{refpage}-dstImage-00252]] 198 If pname:dstImage is of type ename:VK_IMAGE_TYPE_1D or 199 ename:VK_IMAGE_TYPE_2D, then for each element of pname:pRegions, 200 pname:dstOffsets[0].z must: be `0` and pname:dstOffsets[1].z must: be 201 `1` 202// Common Valid Usage 203