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 VkCmdResolveImage* commands 7 * [[VUID-{refpage}-pRegions-00255]] 8 The union of all source regions, and the union of all destination 9 regions, specified by the elements of pname:pRegions, must: not overlap 10 in memory 11 * [[VUID-{refpage}-srcImage-00256]] 12 If pname:srcImage is non-sparse then it must: be bound completely and 13 contiguously to a single sname:VkDeviceMemory object 14 * [[VUID-{refpage}-srcImage-00257]] 15 pname:srcImage must: have a sample count equal to any valid sample count 16 value other than ename:VK_SAMPLE_COUNT_1_BIT 17 * [[VUID-{refpage}-dstImage-00258]] 18 If pname:dstImage is non-sparse then it must: be bound completely and 19 contiguously to a single sname:VkDeviceMemory object 20 * [[VUID-{refpage}-dstImage-00259]] 21 pname:dstImage must: have a sample count equal to 22 ename:VK_SAMPLE_COUNT_1_BIT 23 * [[VUID-{refpage}-srcImageLayout-00260]] 24 pname:srcImageLayout must: specify the layout of the image subresources 25 of pname:srcImage specified in pname:pRegions at the time this command 26 is executed on a sname:VkDevice 27 * [[VUID-{refpage}-srcImageLayout-01400]] 28 pname:srcImageLayout must: be 29ifdef::VK_KHR_shared_presentable_image[] 30 ename:VK_IMAGE_LAYOUT_SHARED_PRESENT_KHR, 31endif::VK_KHR_shared_presentable_image[] 32 ename:VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL or 33 ename:VK_IMAGE_LAYOUT_GENERAL 34 * [[VUID-{refpage}-dstImageLayout-00262]] 35 pname:dstImageLayout must: specify the layout of the image subresources 36 of pname:dstImage specified in pname:pRegions at the time this command 37 is executed on a sname:VkDevice 38 * [[VUID-{refpage}-dstImageLayout-01401]] 39 pname:dstImageLayout must: be 40ifdef::VK_KHR_shared_presentable_image[] 41 ename:VK_IMAGE_LAYOUT_SHARED_PRESENT_KHR, 42endif::VK_KHR_shared_presentable_image[] 43 ename:VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL or 44 ename:VK_IMAGE_LAYOUT_GENERAL 45 * [[VUID-{refpage}-dstImage-02003]] 46 The <<resources-image-format-features,format features>> of 47 pname:dstImage must: contain 48 ename:VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BIT 49ifdef::VK_NV_linear_color_attachment[] 50 * [[VUID-{refpage}-linearColorAttachment-06519]] 51 If the <<features-linearColorAttachment, pname:linearColorAttachment>> 52 feature is enabled and the image is created with 53 ename:VK_IMAGE_TILING_LINEAR, the 54 <<resources-image-format-features,format features>> of pname:dstImage 55 must: contain ename:VK_FORMAT_FEATURE_2_LINEAR_COLOR_ATTACHMENT_BIT_NV 56endif::VK_NV_linear_color_attachment[] 57 * [[VUID-{refpage}-srcImage-01386]] 58 pname:srcImage and pname:dstImage must: have been created with the same 59 image format 60 * [[VUID-{refpage}-srcSubresource-01709]] 61 The pname:srcSubresource.mipLevel member of each element of 62 pname:pRegions must: be less than the pname:mipLevels specified in 63 slink:VkImageCreateInfo when pname:srcImage was created 64 * [[VUID-{refpage}-dstSubresource-01710]] 65 The pname:dstSubresource.mipLevel member of each element of 66 pname:pRegions must: be less than the pname:mipLevels specified in 67 slink:VkImageCreateInfo when pname:dstImage was created 68 * [[VUID-{refpage}-srcSubresource-01711]] 69ifdef::VK_KHR_maintenance5[] 70 If pname:srcSubresource.layerCount is not 71 ename:VK_REMAINING_ARRAY_LAYERS, 72endif::VK_KHR_maintenance5[] 73 [eq]#pname:srcSubresource.baseArrayLayer {plus} 74 pname:srcSubresource.layerCount# of each element of pname:pRegions must: 75 be less than or equal to the pname:arrayLayers specified in 76 slink:VkImageCreateInfo when pname:srcImage was created 77 * [[VUID-{refpage}-dstSubresource-01712]] 78ifdef::VK_KHR_maintenance5[] 79 If pname:dstSubresource.layerCount is not 80 ename:VK_REMAINING_ARRAY_LAYERS, 81endif::VK_KHR_maintenance5[] 82 [eq]#pname:dstSubresource.baseArrayLayer {plus} 83 pname:dstSubresource.layerCount# of each element of pname:pRegions must: 84 be less than or equal to the pname:arrayLayers specified in 85 slink:VkImageCreateInfo when pname:dstImage was created 86ifdef::VK_EXT_fragment_density_map[] 87 * [[VUID-{refpage}-dstImage-02546]] 88 pname:dstImage and pname:srcImage must: not have been created with 89 pname:flags containing ename:VK_IMAGE_CREATE_SUBSAMPLED_BIT_EXT 90endif::VK_EXT_fragment_density_map[] 91 * [[VUID-{refpage}-srcImage-04446]] 92 If pname:dstImage is of type ename:VK_IMAGE_TYPE_3D, then for each 93 element of pname:pRegions, pname:srcSubresource.layerCount must: be `1` 94 * [[VUID-{refpage}-srcImage-04447]] 95 If pname:dstImage is of type ename:VK_IMAGE_TYPE_3D, then for each 96 element of pname:pRegions, pname:dstSubresource.baseArrayLayer must: be 97 `0` and pname:dstSubresource.layerCount must: be `1` 98 * [[VUID-{refpage}-srcOffset-00269]] 99 For each element of pname:pRegions, pname:srcOffset.x and 100 [eq]#(pname:extent.width {plus} pname:srcOffset.x)# must: both be 101 greater than or equal to `0` and less than or equal to the width of the 102 specified pname:srcSubresource of pname:srcImage 103 * [[VUID-{refpage}-srcOffset-00270]] 104 For each element of pname:pRegions, pname:srcOffset.y and 105 [eq]#(pname:extent.height {plus} pname:srcOffset.y)# must: both be 106 greater than or equal to `0` and less than or equal to the height of the 107 specified pname:srcSubresource of pname:srcImage 108 * [[VUID-{refpage}-srcImage-00271]] 109 If pname:srcImage is of type ename:VK_IMAGE_TYPE_1D, then for each 110 element of pname:pRegions, pname:srcOffset.y must: be `0` and 111 pname:extent.height must: be `1` 112 * [[VUID-{refpage}-srcOffset-00272]] 113 For each element of pname:pRegions, pname:srcOffset.z and 114 [eq]#(pname:extent.depth {plus} pname:srcOffset.z)# must: both be 115 greater than or equal to `0` and less than or equal to the depth of the 116 specified pname:srcSubresource of pname:srcImage 117 * [[VUID-{refpage}-srcImage-00273]] 118 If pname:srcImage is of type ename:VK_IMAGE_TYPE_1D or 119 ename:VK_IMAGE_TYPE_2D, then for each element of pname:pRegions, 120 pname:srcOffset.z must: be `0` and pname:extent.depth must: be `1` 121 * [[VUID-{refpage}-dstOffset-00274]] 122 For each element of pname:pRegions, pname:dstOffset.x and 123 [eq]#(pname:extent.width {plus} pname:dstOffset.x)# must: both be 124 greater than or equal to `0` and less than or equal to the width of the 125 specified pname:dstSubresource of pname:dstImage 126 * [[VUID-{refpage}-dstOffset-00275]] 127 For each element of pname:pRegions, pname:dstOffset.y and 128 [eq]#(pname:extent.height {plus} pname:dstOffset.y)# must: both be 129 greater than or equal to `0` and less than or equal to the height of the 130 specified pname:dstSubresource of pname:dstImage 131 * [[VUID-{refpage}-dstImage-00276]] 132 If pname:dstImage is of type ename:VK_IMAGE_TYPE_1D, then for each 133 element of pname:pRegions, pname:dstOffset.y must: be `0` and 134 pname:extent.height must: be `1` 135 * [[VUID-{refpage}-dstOffset-00277]] 136 For each element of pname:pRegions, pname:dstOffset.z and 137 [eq]#(pname:extent.depth {plus} pname:dstOffset.z)# must: both be 138 greater than or equal to `0` and less than or equal to the depth of the 139 specified pname:dstSubresource of pname:dstImage 140 * [[VUID-{refpage}-dstImage-00278]] 141 If pname:dstImage is of type ename:VK_IMAGE_TYPE_1D or 142 ename:VK_IMAGE_TYPE_2D, then for each element of pname:pRegions, 143 pname:dstOffset.z must: be `0` and pname:extent.depth must: be `1` 144 * [[VUID-{refpage}-srcImage-06762]] 145 pname:srcImage must: have been created with 146 ename:VK_IMAGE_USAGE_TRANSFER_SRC_BIT usage flag 147ifdef::VK_VERSION_1_1,VK_KHR_maintenance1[] 148 * [[VUID-{refpage}-srcImage-06763]] 149 The <<resources-image-format-features,format features>> of 150 pname:srcImage must: contain ename:VK_FORMAT_FEATURE_TRANSFER_SRC_BIT 151endif::VK_VERSION_1_1,VK_KHR_maintenance1[] 152 * [[VUID-{refpage}-dstImage-06764]] 153 pname:dstImage must: have been created with 154 ename:VK_IMAGE_USAGE_TRANSFER_DST_BIT usage flag 155ifdef::VK_VERSION_1_1,VK_KHR_maintenance1[] 156 * [[VUID-{refpage}-dstImage-06765]] 157 The <<resources-image-format-features,format features>> of 158 pname:dstImage must: contain ename:VK_FORMAT_FEATURE_TRANSFER_DST_BIT 159endif::VK_VERSION_1_1,VK_KHR_maintenance1[] 160// Common Valid Usage 161