1// Copyright 2020-2024 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}-srcImage-09459]] 48 If pname:srcImage and pname:dstImage are the same, and an elements of 49 pname:pRegions contains the pname:srcSubresource and 50 pname:dstSubresource with matching pname:mipLevel and overlapping array 51 layers, then the pname:srcImageLayout and pname:dstImageLayout must: be 52 ename:VK_IMAGE_LAYOUT_GENERAL 53ifdef::VK_KHR_shared_presentable_image[] 54 or ename:VK_IMAGE_LAYOUT_SHARED_PRESENT_KHR 55endif::VK_KHR_shared_presentable_image[] 56 * [[VUID-{refpage}-dstImage-02000]] 57 The <<resources-image-format-features,format features>> of 58 pname:dstImage must: contain ename:VK_FORMAT_FEATURE_BLIT_DST_BIT 59ifdef::VK_VERSION_1_1,VK_KHR_sampler_ycbcr_conversion[] 60 * [[VUID-{refpage}-dstImage-06422]] 61 pname:dstImage must: not use a 62 <<formats-requiring-sampler-ycbcr-conversion, format that requires a 63 sampler {YCbCr} conversion>> 64endif::VK_VERSION_1_1,VK_KHR_sampler_ycbcr_conversion[] 65 * [[VUID-{refpage}-dstImage-00224]] 66 pname:dstImage must: have been created with 67 ename:VK_IMAGE_USAGE_TRANSFER_DST_BIT usage flag 68 * [[VUID-{refpage}-dstImage-00225]] 69 If pname:dstImage is non-sparse then it must: be bound completely and 70 contiguously to a single sname:VkDeviceMemory object 71 * [[VUID-{refpage}-dstImageLayout-00226]] 72 pname:dstImageLayout must: specify the layout of the image subresources 73 of pname:dstImage specified in pname:pRegions at the time this command 74 is executed on a sname:VkDevice 75ifndef::VK_KHR_shared_presentable_image[] 76 * [[VUID-{refpage}-dstImageLayout-00227]] 77 pname:dstImageLayout must: be ename:VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL 78 or ename:VK_IMAGE_LAYOUT_GENERAL 79endif::VK_KHR_shared_presentable_image[] 80ifdef::VK_KHR_shared_presentable_image[] 81 * [[VUID-{refpage}-dstImageLayout-01399]] 82 pname:dstImageLayout must: be ename:VK_IMAGE_LAYOUT_SHARED_PRESENT_KHR, 83 ename:VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL or 84 ename:VK_IMAGE_LAYOUT_GENERAL 85endif::VK_KHR_shared_presentable_image[] 86 * [[VUID-{refpage}-srcImage-00229]] 87 If either of pname:srcImage or pname:dstImage was created with a signed 88 integer elink:VkFormat, the other must: also have been created with a 89 signed integer elink:VkFormat 90 * [[VUID-{refpage}-srcImage-00230]] 91 If either of pname:srcImage or pname:dstImage was created with an 92 unsigned integer elink:VkFormat, the other must: also have been created 93 with an unsigned integer elink:VkFormat 94 * [[VUID-{refpage}-srcImage-00231]] 95 If either of pname:srcImage or pname:dstImage was created with a 96 depth/stencil format, the other must: have exactly the same format 97 * [[VUID-{refpage}-srcImage-00232]] 98 If pname:srcImage was created with a depth/stencil format, pname:filter 99 must: be ename:VK_FILTER_NEAREST 100 * [[VUID-{refpage}-srcImage-00233]] 101 pname:srcImage must: have been created with a pname:samples value of 102 ename:VK_SAMPLE_COUNT_1_BIT 103 * [[VUID-{refpage}-dstImage-00234]] 104 pname:dstImage must: have been created with a pname:samples value of 105 ename:VK_SAMPLE_COUNT_1_BIT 106 * [[VUID-{refpage}-filter-02001]] 107 If pname:filter is ename:VK_FILTER_LINEAR, then the 108 <<resources-image-format-features,format features>> of pname:srcImage 109 must: contain ename:VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT 110ifdef::VK_IMG_filter_cubic,VK_EXT_filter_cubic[] 111 * [[VUID-{refpage}-filter-02002]] 112 If pname:filter is ename:VK_FILTER_CUBIC_EXT, then the 113 <<resources-image-format-features,format features>> of pname:srcImage 114 must: contain ename:VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_CUBIC_BIT_EXT 115 * [[VUID-{refpage}-filter-00237]] 116 If pname:filter is ename:VK_FILTER_CUBIC_EXT, pname:srcImage must: be of 117 type ename:VK_IMAGE_TYPE_2D 118endif::VK_IMG_filter_cubic,VK_EXT_filter_cubic[] 119 * [[VUID-{refpage}-srcSubresource-01705]] 120 The pname:srcSubresource.mipLevel member of each element of 121 pname:pRegions must: be less than the pname:mipLevels specified in 122 slink:VkImageCreateInfo when pname:srcImage was created 123 * [[VUID-{refpage}-dstSubresource-01706]] 124 The pname:dstSubresource.mipLevel member of each element of 125 pname:pRegions must: be less than the pname:mipLevels specified in 126 slink:VkImageCreateInfo when pname:dstImage was created 127 * [[VUID-{refpage}-srcSubresource-01707]] 128ifdef::VK_KHR_maintenance5[] 129 If pname:srcSubresource.layerCount is not 130 ename:VK_REMAINING_ARRAY_LAYERS, 131endif::VK_KHR_maintenance5[] 132 [eq]#pname:srcSubresource.baseArrayLayer {plus} 133 pname:srcSubresource.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:srcImage was created 136 * [[VUID-{refpage}-dstSubresource-01708]] 137ifdef::VK_KHR_maintenance5[] 138 If pname:srcSubresource.layerCount is not 139 ename:VK_REMAINING_ARRAY_LAYERS, 140endif::VK_KHR_maintenance5[] 141 [eq]#pname:dstSubresource.baseArrayLayer {plus} 142 pname:dstSubresource.layerCount# of each element of pname:pRegions must: 143 be less than or equal to the pname:arrayLayers specified in 144 slink:VkImageCreateInfo when pname:dstImage was created 145ifdef::VK_EXT_fragment_density_map[] 146 * [[VUID-{refpage}-dstImage-02545]] 147 pname:dstImage and pname:srcImage must: not have been created with 148 pname:flags containing ename:VK_IMAGE_CREATE_SUBSAMPLED_BIT_EXT 149endif::VK_EXT_fragment_density_map[] 150 * [[VUID-{refpage}-srcImage-00240]] 151 If either pname:srcImage or pname:dstImage is of type 152 ename:VK_IMAGE_TYPE_3D, then for each element of pname:pRegions, 153 pname:srcSubresource.baseArrayLayer and 154 pname:dstSubresource.baseArrayLayer must: each be `0`, and 155 pname:srcSubresource.layerCount and pname:dstSubresource.layerCount 156 must: each be `1` 157 * [[VUID-{refpage}-aspectMask-00241]] 158 For each element of pname:pRegions, pname:srcSubresource.aspectMask 159 must: specify aspects present in pname:srcImage 160 * [[VUID-{refpage}-aspectMask-00242]] 161 For each element of pname:pRegions, pname:dstSubresource.aspectMask 162 must: specify aspects present in pname:dstImage 163 * [[VUID-{refpage}-srcOffset-00243]] 164 For each element of pname:pRegions, pname:srcOffsets[0].x and 165 pname:srcOffsets[1].x must: both be greater than or equal to `0` and 166 less than or equal to the width of the specified pname:srcSubresource of 167 pname:srcImage 168 * [[VUID-{refpage}-srcOffset-00244]] 169 For each element of pname:pRegions, pname:srcOffsets[0].y and 170 pname:srcOffsets[1].y must: both be greater than or equal to `0` and 171 less than or equal to the height of the specified pname:srcSubresource 172 of pname:srcImage 173 * [[VUID-{refpage}-srcImage-00245]] 174 If pname:srcImage is of type ename:VK_IMAGE_TYPE_1D, then for each 175 element of pname:pRegions, pname:srcOffsets[0].y must: be `0` and 176 pname:srcOffsets[1].y must: be `1` 177 * [[VUID-{refpage}-srcOffset-00246]] 178 For each element of pname:pRegions, pname:srcOffsets[0].z and 179 pname:srcOffsets[1].z must: both be greater than or equal to `0` and 180 less than or equal to the depth of the specified pname:srcSubresource of 181 pname:srcImage 182 * [[VUID-{refpage}-srcImage-00247]] 183 If pname:srcImage is of type ename:VK_IMAGE_TYPE_1D or 184 ename:VK_IMAGE_TYPE_2D, then for each element of pname:pRegions, 185 pname:srcOffsets[0].z must: be `0` and pname:srcOffsets[1].z must: be 186 `1` 187 * [[VUID-{refpage}-dstOffset-00248]] 188 For each element of pname:pRegions, pname:dstOffsets[0].x and 189 pname:dstOffsets[1].x must: both be greater than or equal to `0` and 190 less than or equal to the width of the specified pname:dstSubresource of 191 pname:dstImage 192 * [[VUID-{refpage}-dstOffset-00249]] 193 For each element of pname:pRegions, pname:dstOffsets[0].y and 194 pname:dstOffsets[1].y must: both be greater than or equal to `0` and 195 less than or equal to the height of the specified pname:dstSubresource 196 of pname:dstImage 197 * [[VUID-{refpage}-dstImage-00250]] 198 If pname:dstImage is of type ename:VK_IMAGE_TYPE_1D, then for each 199 element of pname:pRegions, pname:dstOffsets[0].y must: be `0` and 200 pname:dstOffsets[1].y must: be `1` 201 * [[VUID-{refpage}-dstOffset-00251]] 202 For each element of pname:pRegions, pname:dstOffsets[0].z and 203 pname:dstOffsets[1].z must: both be greater than or equal to `0` and 204 less than or equal to the depth of the specified pname:dstSubresource of 205 pname:dstImage 206 * [[VUID-{refpage}-dstImage-00252]] 207 If pname:dstImage is of type ename:VK_IMAGE_TYPE_1D or 208 ename:VK_IMAGE_TYPE_2D, then for each element of pname:pRegions, 209 pname:dstOffsets[0].z must: be `0` and pname:dstOffsets[1].z must: be 210 `1` 211// Common Valid Usage 212