1// Copyright 2020-2021 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 Y'C~B~C~R~ 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 Y'C~B~C~R~ 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]] 119 The [eq]#pname:srcSubresource.baseArrayLayer {plus} 120 pname:srcSubresource.layerCount# of each element of pname:pRegions must: 121 be less than or equal to the pname:arrayLayers specified in 122 slink:VkImageCreateInfo when pname:srcImage was created 123 * [[VUID-{refpage}-dstSubresource-01708]] 124 The [eq]#pname:dstSubresource.baseArrayLayer {plus} 125 pname:dstSubresource.layerCount# of each element of pname:pRegions must: 126 be less than or equal to the pname:arrayLayers specified in 127 slink:VkImageCreateInfo when pname:dstImage was created 128ifdef::VK_EXT_fragment_density_map[] 129 * [[VUID-{refpage}-dstImage-02545]] 130 pname:dstImage and pname:srcImage must: not have been created with 131 pname:flags containing ename:VK_IMAGE_CREATE_SUBSAMPLED_BIT_EXT 132endif::VK_EXT_fragment_density_map[] 133// Common Valid Usage 134 * [[VUID-{refpage}-srcImage-00240]] 135 If either pname:srcImage or pname:dstImage is of type 136 ename:VK_IMAGE_TYPE_3D, then for each element of pname:pRegions, 137 pname:srcSubresource.baseArrayLayer and 138 pname:dstSubresource.baseArrayLayer must: each be `0`, and 139 pname:srcSubresource.layerCount and pname:dstSubresource.layerCount 140 must: each be `1` 141 * [[VUID-{refpage}-aspectMask-00241]] 142 For each element of pname:pRegions, pname:srcSubresource.aspectMask 143 must: specify aspects present in pname:srcImage 144 * [[VUID-{refpage}-aspectMask-00242]] 145 For each element of pname:pRegions, pname:dstSubresource.aspectMask 146 must: specify aspects present in pname:dstImage 147 * [[VUID-{refpage}-srcOffset-00243]] 148 For each element of pname:pRegions, pname:srcOffsets[0].x and 149 pname:srcOffsets[1].x must: both be greater than or equal to `0` and 150 less than or equal to the width of the specified pname:srcSubresource of 151 pname:srcImage 152 * [[VUID-{refpage}-srcOffset-00244]] 153 For each element of pname:pRegions, pname:srcOffsets[0].y and 154 pname:srcOffsets[1].y must: both be greater than or equal to `0` and 155 less than or equal to the height of the specified pname:srcSubresource 156 of pname:srcImage 157 * [[VUID-{refpage}-srcImage-00245]] 158 If pname:srcImage is of type ename:VK_IMAGE_TYPE_1D, then for each 159 element of pname:pRegions, pname:srcOffsets[0].y must: be `0` and 160 pname:srcOffsets[1].y must: be `1` 161 * [[VUID-{refpage}-srcOffset-00246]] 162 For each element of pname:pRegions, pname:srcOffsets[0].z and 163 pname:srcOffsets[1].z must: both be greater than or equal to `0` and 164 less than or equal to the depth of the specified pname:srcSubresource of 165 pname:srcImage 166 * [[VUID-{refpage}-srcImage-00247]] 167 If pname:srcImage is of type ename:VK_IMAGE_TYPE_1D or 168 ename:VK_IMAGE_TYPE_2D, then for each element of pname:pRegions, 169 pname:srcOffsets[0].z must: be `0` and pname:srcOffsets[1].z must: be 170 `1` 171 * [[VUID-{refpage}-dstOffset-00248]] 172 For each element of pname:pRegions, pname:dstOffsets[0].x and 173 pname:dstOffsets[1].x must: both be greater than or equal to `0` and 174 less than or equal to the width of the specified pname:dstSubresource of 175 pname:dstImage 176 * [[VUID-{refpage}-dstOffset-00249]] 177 For each element of pname:pRegions, pname:dstOffsets[0].y and 178 pname:dstOffsets[1].y must: both be greater than or equal to `0` and 179 less than or equal to the height of the specified pname:dstSubresource 180 of pname:dstImage 181 * [[VUID-{refpage}-dstImage-00250]] 182 If pname:dstImage is of type ename:VK_IMAGE_TYPE_1D, then for each 183 element of pname:pRegions, pname:dstOffsets[0].y must: be `0` and 184 pname:dstOffsets[1].y must: be `1` 185 * [[VUID-{refpage}-dstOffset-00251]] 186 For each element of pname:pRegions, pname:dstOffsets[0].z and 187 pname:dstOffsets[1].z must: both be greater than or equal to `0` and 188 less than or equal to the depth of the specified pname:dstSubresource of 189 pname:dstImage 190 * [[VUID-{refpage}-dstImage-00252]] 191 If pname:dstImage is of type ename:VK_IMAGE_TYPE_1D or 192 ename:VK_IMAGE_TYPE_2D, then for each element of pname:pRegions, 193 pname:dstOffsets[0].z must: be `0` and pname:dstOffsets[1].z must: be 194 `1` 195