1// Copyright 2023 The Khronos Group Inc. 2// 3// SPDX-License-Identifier: CC-BY-4.0 4 5// Common Valid Usage 6// Common to VkImageMemoryBarrier* structs 7 8 * [[VUID-{refpage}-subresourceRange-01486]] 9 pname:subresourceRange.baseMipLevel must: be less than the 10 pname:mipLevels specified in slink:VkImageCreateInfo when pname:image 11 was created 12 * [[VUID-{refpage}-subresourceRange-01724]] 13 If pname:subresourceRange.levelCount is not 14 ename:VK_REMAINING_MIP_LEVELS, [eq]#pname:subresourceRange.baseMipLevel 15 {plus} pname:subresourceRange.levelCount# must: be less than or equal to 16 the pname:mipLevels specified in slink:VkImageCreateInfo when 17 pname:image was created 18 * [[VUID-{refpage}-subresourceRange-01488]] 19 pname:subresourceRange.baseArrayLayer must: be less than the 20 pname:arrayLayers specified in slink:VkImageCreateInfo when pname:image 21 was created 22 * [[VUID-{refpage}-subresourceRange-01725]] 23 If pname:subresourceRange.layerCount is not 24 ename:VK_REMAINING_ARRAY_LAYERS, 25 [eq]#pname:subresourceRange.baseArrayLayer {plus} 26 pname:subresourceRange.layerCount# must: be less than or equal to the 27 pname:arrayLayers specified in slink:VkImageCreateInfo when pname:image 28 was created 29 * [[VUID-{refpage}-image-01932]] 30 If pname:image is non-sparse then it must: be bound completely and 31 contiguously to a single sname:VkDeviceMemory object 32ifndef::VK_VERSION_1_1,VK_KHR_sampler_ycbcr_conversion[] 33 * [[VUID-{refpage}-image-02902]] 34 If pname:image has a color format, then the pname:aspectMask member of 35 pname:subresourceRange must: be ename:VK_IMAGE_ASPECT_COLOR_BIT 36endif::VK_VERSION_1_1,VK_KHR_sampler_ycbcr_conversion[] 37ifdef::VK_VERSION_1_1,VK_KHR_sampler_ycbcr_conversion[] 38 * [[VUID-{refpage}-image-09241]] 39 If pname:image has a color format that is single-plane, then the 40 pname:aspectMask member of pname:subresourceRange must: be 41 ename:VK_IMAGE_ASPECT_COLOR_BIT 42 * [[VUID-{refpage}-image-09242]] 43 If pname:image has a color format and is not _disjoint_, then the 44 pname:aspectMask member of pname:subresourceRange must: be 45 ename:VK_IMAGE_ASPECT_COLOR_BIT 46 * [[VUID-{refpage}-image-01672]] 47 If pname:image has a multi-planar format and the image is _disjoint_, 48 then the pname:aspectMask member of pname:subresourceRange must: include 49 at least one <<formats-planes-image-aspect,multi-planar aspect mask>> 50 bit or ename:VK_IMAGE_ASPECT_COLOR_BIT 51endif::VK_VERSION_1_1,VK_KHR_sampler_ycbcr_conversion[] 52ifndef::VK_VERSION_1_2,VK_KHR_separate_depth_stencil_layouts[] 53 * [[VUID-{refpage}-image-01207]] 54 If pname:image has a depth/stencil format with both depth and stencil 55 components, then the pname:aspectMask member of pname:subresourceRange 56 must: include both ename:VK_IMAGE_ASPECT_DEPTH_BIT and 57 ename:VK_IMAGE_ASPECT_STENCIL_BIT 58endif::VK_VERSION_1_2,VK_KHR_separate_depth_stencil_layouts[] 59ifdef::VK_VERSION_1_2,VK_KHR_separate_depth_stencil_layouts[] 60 * [[VUID-{refpage}-image-03319]] 61 If pname:image has a depth/stencil format with both depth and stencil 62 and the <<features-separateDepthStencilLayouts, 63 pname:separateDepthStencilLayouts>> feature is enabled, then the 64 pname:aspectMask member of pname:subresourceRange must: include either 65 or both ename:VK_IMAGE_ASPECT_DEPTH_BIT and 66 ename:VK_IMAGE_ASPECT_STENCIL_BIT 67 * [[VUID-{refpage}-image-03320]] 68 If pname:image has a depth/stencil format with both depth and stencil 69 and the <<features-separateDepthStencilLayouts, 70 pname:separateDepthStencilLayouts>> feature is not enabled, then the 71 pname:aspectMask member of pname:subresourceRange must: include both 72 ename:VK_IMAGE_ASPECT_DEPTH_BIT and ename:VK_IMAGE_ASPECT_STENCIL_BIT 73 * [[VUID-{refpage}-aspectMask-08702]] 74 If the pname:aspectMask member of pname:subresourceRange includes 75 ename:VK_IMAGE_ASPECT_DEPTH_BIT, pname:oldLayout and pname:newLayout 76 must: not be one of ename:VK_IMAGE_LAYOUT_STENCIL_ATTACHMENT_OPTIMAL or 77 ename:VK_IMAGE_LAYOUT_STENCIL_READ_ONLY_OPTIMAL 78 * [[VUID-{refpage}-aspectMask-08703]] 79 If the pname:aspectMask member of pname:subresourceRange includes 80 ename:VK_IMAGE_ASPECT_STENCIL_BIT, pname:oldLayout and pname:newLayout 81 must: not be one of ename:VK_IMAGE_LAYOUT_DEPTH_ATTACHMENT_OPTIMAL or 82 ename:VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_OPTIMAL 83endif::VK_VERSION_1_2,VK_KHR_separate_depth_stencil_layouts[] 84// Common Valid Usage 85