summaryrefslogtreecommitdiff
path: root/chapters/commonvalidity/get_image_subresource_layout_common.adoc
blob: 355602147baae8b33be15981a15dbf71ca567e17 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
// Copyright 2022-2023 The Khronos Group Inc.
//
// SPDX-License-Identifier: CC-BY-4.0

// Common Valid Usage
// Common to vkGetImageSubresourceLayout and vkGetImageSubresourceLayout2EXT
  * [[VUID-{refpage}-aspectMask-00997]]
    The pname:aspectMask member of pname:pSubresource must: only have a
    single bit set
  * [[VUID-{refpage}-mipLevel-01716]]
    The pname:mipLevel member of pname:pSubresource must: be less than the
    pname:mipLevels specified in slink:VkImageCreateInfo when pname:image
    was created
  * [[VUID-{refpage}-arrayLayer-01717]]
    The pname:arrayLayer member of pname:pSubresource must: be less than the
    pname:arrayLayers specified in slink:VkImageCreateInfo when pname:image
    was created
ifdef::VK_VERSION_1_1,VK_KHR_sampler_ycbcr_conversion[]
  * [[VUID-{refpage}-format-08886]]
    If pname:format of the pname:image is a color format, pname:tiling of
    the pname:image is ename:VK_IMAGE_TILING_LINEAR or
    ename:VK_IMAGE_TILING_OPTIMAL, and does not have a
    <<formats-requiring-sampler-ycbcr-conversion, multi-planar image
    format>>, the pname:aspectMask member of pname:pSubresource must: be
    ename:VK_IMAGE_ASPECT_COLOR_BIT
endif::VK_VERSION_1_1,VK_KHR_sampler_ycbcr_conversion[]
ifndef::VK_VERSION_1_1,VK_KHR_sampler_ycbcr_conversion[]
  * [[VUID-{refpage}-format-08887]]
    If pname:format of the pname:image is a color format and pname:tiling of
    the pname:image is ename:VK_IMAGE_TILING_LINEAR or
    ename:VK_IMAGE_TILING_OPTIMAL, the pname:aspectMask member of
    pname:pSubresource must: be ename:VK_IMAGE_ASPECT_COLOR_BIT
endif::VK_VERSION_1_1,VK_KHR_sampler_ycbcr_conversion[]
  * [[VUID-{refpage}-format-04462]]
    If pname:format of the pname:image has a depth component, the
    pname:aspectMask member of pname:pSubresource must: contain
    ename:VK_IMAGE_ASPECT_DEPTH_BIT
  * [[VUID-{refpage}-format-04463]]
    If pname:format of the pname:image has a stencil component, the
    pname:aspectMask member of pname:pSubresource must: contain
    ename:VK_IMAGE_ASPECT_STENCIL_BIT
  * [[VUID-{refpage}-format-04464]]
    If pname:format of the pname:image does not contain a stencil or depth
    component, the pname:aspectMask member of pname:pSubresource must: not
    contain ename:VK_IMAGE_ASPECT_DEPTH_BIT or
    ename:VK_IMAGE_ASPECT_STENCIL_BIT
ifdef::VK_VERSION_1_1,VK_KHR_sampler_ycbcr_conversion[]
  * [[VUID-{refpage}-tiling-08717]]
    If the pname:tiling of the pname:image is ename:VK_IMAGE_TILING_LINEAR
    and has a <<formats-requiring-sampler-ycbcr-conversion, multi-planar
    image format>>, then the pname:aspectMask member of pname:pSubresource
    must: be a single valid <<formats-planes-image-aspect,multi-planar
    aspect mask>> bit
endif::VK_VERSION_1_1,VK_KHR_sampler_ycbcr_conversion[]
ifdef::VK_ANDROID_external_memory_android_hardware_buffer[]
  * [[VUID-{refpage}-image-01895]]
    If pname:image was created with the
    ename:VK_EXTERNAL_MEMORY_HANDLE_TYPE_ANDROID_HARDWARE_BUFFER_BIT_ANDROID
    external memory handle type, then pname:image must: be bound to memory
endif::VK_ANDROID_external_memory_android_hardware_buffer[]
ifdef::VK_EXT_image_drm_format_modifier[]
  * [[VUID-{refpage}-tiling-02271]]
    If the pname:tiling of the pname:image is
    ename:VK_IMAGE_TILING_DRM_FORMAT_MODIFIER_EXT, then the pname:aspectMask
    member of pname:pSubresource must: be
    `VK_IMAGE_ASPECT_MEMORY_PLANE__{ibit}__BIT_EXT` and the index _i_ must:
    be less than the
    slink:VkDrmFormatModifierPropertiesEXT::pname:drmFormatModifierPlaneCount
    associated with the image's pname:format and
    slink:VkImageDrmFormatModifierPropertiesEXT::pname:drmFormatModifier
endif::VK_EXT_image_drm_format_modifier[]
// Common Valid Usage