1e5c31af7Sopenharmony_ci// Copyright 2015-2024 The Khronos Group Inc.
2e5c31af7Sopenharmony_ci//
3e5c31af7Sopenharmony_ci// SPDX-License-Identifier: CC-BY-4.0
4e5c31af7Sopenharmony_ci
5e5c31af7Sopenharmony_ci[[resources]]
6e5c31af7Sopenharmony_ci= Resource Creation
7e5c31af7Sopenharmony_ci
8e5c31af7Sopenharmony_ciVulkan supports two primary resource types: _buffers_ and _images_.
9e5c31af7Sopenharmony_ciResources are views of memory with associated formatting and dimensionality.
10e5c31af7Sopenharmony_ciBuffers provide access to raw arrays of bytes, whereas images can: be
11e5c31af7Sopenharmony_cimultidimensional and may: have associated metadata.
12e5c31af7Sopenharmony_ci
13e5c31af7Sopenharmony_ciifdef::VK_NV_ray_tracing,VK_KHR_acceleration_structure[]
14e5c31af7Sopenharmony_ciOther resource types, such as <<resources-acceleration-structures,
15e5c31af7Sopenharmony_ciacceleration structures>>
16e5c31af7Sopenharmony_ciifdef::VK_EXT_opacity_micromap[]
17e5c31af7Sopenharmony_ciand <<resources-micromaps, micromaps>>
18e5c31af7Sopenharmony_ciendif::VK_EXT_opacity_micromap[]
19e5c31af7Sopenharmony_ciuse buffers as the backing store for opaque data structures.
20e5c31af7Sopenharmony_ciendif::VK_NV_ray_tracing,VK_KHR_acceleration_structure[]
21e5c31af7Sopenharmony_ci
22e5c31af7Sopenharmony_ci
23e5c31af7Sopenharmony_ci[[resources-buffers]]
24e5c31af7Sopenharmony_ci== Buffers
25e5c31af7Sopenharmony_ci
26e5c31af7Sopenharmony_ci[open,refpage='VkBuffer',desc='Opaque handle to a buffer object',type='handles']
27e5c31af7Sopenharmony_ci--
28e5c31af7Sopenharmony_ciBuffers represent linear arrays of data which are used for various purposes
29e5c31af7Sopenharmony_ciby binding them to a graphics or compute pipeline via descriptor sets or
30e5c31af7Sopenharmony_cicertain commands, or by directly specifying them as parameters to certain
31e5c31af7Sopenharmony_cicommands.
32e5c31af7Sopenharmony_ci
33e5c31af7Sopenharmony_ciBuffers are represented by sname:VkBuffer handles:
34e5c31af7Sopenharmony_ci
35e5c31af7Sopenharmony_ciinclude::{generated}/api/handles/VkBuffer.adoc[]
36e5c31af7Sopenharmony_ci--
37e5c31af7Sopenharmony_ci
38e5c31af7Sopenharmony_ci[open,refpage='vkCreateBuffer',desc='Create a new buffer object',type='protos']
39e5c31af7Sopenharmony_ci--
40e5c31af7Sopenharmony_ci:refpage: vkCreateBuffer
41e5c31af7Sopenharmony_ci:objectnameplural: buffers
42e5c31af7Sopenharmony_ci:objectnamecamelcase: buffer
43e5c31af7Sopenharmony_ci:objectcount: 1
44e5c31af7Sopenharmony_ci
45e5c31af7Sopenharmony_ciTo create buffers, call:
46e5c31af7Sopenharmony_ci
47e5c31af7Sopenharmony_ciinclude::{generated}/api/protos/vkCreateBuffer.adoc[]
48e5c31af7Sopenharmony_ci
49e5c31af7Sopenharmony_ci  * pname:device is the logical device that creates the buffer object.
50e5c31af7Sopenharmony_ci  * pname:pCreateInfo is a pointer to a slink:VkBufferCreateInfo structure
51e5c31af7Sopenharmony_ci    containing parameters affecting creation of the buffer.
52e5c31af7Sopenharmony_ci  * pname:pAllocator controls host memory allocation as described in the
53e5c31af7Sopenharmony_ci    <<memory-allocation, Memory Allocation>> chapter.
54e5c31af7Sopenharmony_ci  * pname:pBuffer is a pointer to a slink:VkBuffer handle in which the
55e5c31af7Sopenharmony_ci    resulting buffer object is returned.
56e5c31af7Sopenharmony_ci
57e5c31af7Sopenharmony_ciinclude::{chapters}/commonvalidity/no_dynamic_allocations_common.adoc[]
58e5c31af7Sopenharmony_ci
59e5c31af7Sopenharmony_ci.Valid Usage
60e5c31af7Sopenharmony_ci****
61e5c31af7Sopenharmony_ciifndef::VKSC_VERSION_1_0[]
62e5c31af7Sopenharmony_ci  * [[VUID-vkCreateBuffer-flags-00911]]
63e5c31af7Sopenharmony_ci    If the pname:flags member of pname:pCreateInfo includes
64e5c31af7Sopenharmony_ci    ename:VK_BUFFER_CREATE_SPARSE_BINDING_BIT,
65e5c31af7Sopenharmony_ciifdef::VK_NV_extended_sparse_address_space[]
66e5c31af7Sopenharmony_ci    and the <<features-extendedSparseAddressSpace,
67e5c31af7Sopenharmony_ci    pname:extendedSparseAddressSpace>> feature is not enabled,
68e5c31af7Sopenharmony_ciendif::VK_NV_extended_sparse_address_space[]
69e5c31af7Sopenharmony_ci    creating this sname:VkBuffer must: not cause the total required sparse
70e5c31af7Sopenharmony_ci    memory for all currently valid sparse resources on the device to exceed
71e5c31af7Sopenharmony_ci    sname:VkPhysicalDeviceLimits::pname:sparseAddressSpaceSize
72e5c31af7Sopenharmony_ciifdef::VK_NV_extended_sparse_address_space[]
73e5c31af7Sopenharmony_ci  * [[VUID-vkCreateBuffer-flags-09383]]
74e5c31af7Sopenharmony_ci    If the pname:flags member of pname:pCreateInfo includes
75e5c31af7Sopenharmony_ci    ename:VK_BUFFER_CREATE_SPARSE_BINDING_BIT, the
76e5c31af7Sopenharmony_ci    <<features-extendedSparseAddressSpace,
77e5c31af7Sopenharmony_ci    pname:extendedSparseAddressSpace>> feature is enabled, and the
78e5c31af7Sopenharmony_ci    pname:usage member of pname:pCreateInfo contains bits not in
79e5c31af7Sopenharmony_ci    sname:VkPhysicalDeviceExtendedSparseAddressSpacePropertiesNV::pname:extendedSparseBufferUsageFlags,
80e5c31af7Sopenharmony_ci    creating this sname:VkBuffer must: not cause the total required sparse
81e5c31af7Sopenharmony_ci    memory for all currently valid sparse resources on the device, excluding
82e5c31af7Sopenharmony_ci    sname:VkBuffer created with pname:usage member of pname:pCreateInfo
83e5c31af7Sopenharmony_ci    containing bits in
84e5c31af7Sopenharmony_ci    sname:VkPhysicalDeviceExtendedSparseAddressSpacePropertiesNV::pname:extendedSparseBufferUsageFlags
85e5c31af7Sopenharmony_ci    and sname:VkImage created with pname:usage member of pname:pCreateInfo
86e5c31af7Sopenharmony_ci    containing bits in
87e5c31af7Sopenharmony_ci    sname:VkPhysicalDeviceExtendedSparseAddressSpacePropertiesNV::pname:extendedSparseImageUsageFlags,
88e5c31af7Sopenharmony_ci    to exceed sname:VkPhysicalDeviceLimits::pname:sparseAddressSpaceSize
89e5c31af7Sopenharmony_ci  * [[VUID-vkCreateBuffer-flags-09384]]
90e5c31af7Sopenharmony_ci    If the pname:flags member of pname:pCreateInfo includes
91e5c31af7Sopenharmony_ci    ename:VK_BUFFER_CREATE_SPARSE_BINDING_BIT and the
92e5c31af7Sopenharmony_ci    <<features-extendedSparseAddressSpace,
93e5c31af7Sopenharmony_ci    pname:extendedSparseAddressSpace>> feature is enabled, creating this
94e5c31af7Sopenharmony_ci    sname:VkBuffer must: not cause the total required sparse memory for all
95e5c31af7Sopenharmony_ci    currently valid sparse resources on the device to exceed
96e5c31af7Sopenharmony_ci    sname:VkPhysicalDeviceExtendedSparseAddressSpacePropertiesNV::pname:extendedSparseAddressSpaceSize
97e5c31af7Sopenharmony_ciendif::VK_NV_extended_sparse_address_space[]
98e5c31af7Sopenharmony_ciendif::VKSC_VERSION_1_0[]
99e5c31af7Sopenharmony_ciinclude::{chapters}/commonvalidity/memory_reservation_request_count_common.adoc[]
100e5c31af7Sopenharmony_ciifdef::VK_FUCHSIA_buffer_collection[]
101e5c31af7Sopenharmony_ci  * [[VUID-vkCreateBuffer-pNext-06387]]
102e5c31af7Sopenharmony_ci    If using the slink:VkBuffer for an import operation from a
103e5c31af7Sopenharmony_ci    slink:VkBufferCollectionFUCHSIA where a
104e5c31af7Sopenharmony_ci    slink:VkBufferCollectionBufferCreateInfoFUCHSIA has been chained to
105e5c31af7Sopenharmony_ci    pname:pNext, pname:pCreateInfo must: match the
106e5c31af7Sopenharmony_ci    slink:VkBufferConstraintsInfoFUCHSIA::pname:createInfo used when setting
107e5c31af7Sopenharmony_ci    the constraints on the buffer collection with
108e5c31af7Sopenharmony_ci    flink:vkSetBufferCollectionBufferConstraintsFUCHSIA
109e5c31af7Sopenharmony_ciendif::VK_FUCHSIA_buffer_collection[]
110e5c31af7Sopenharmony_ci****
111e5c31af7Sopenharmony_ci
112e5c31af7Sopenharmony_ciinclude::{generated}/validity/protos/vkCreateBuffer.adoc[]
113e5c31af7Sopenharmony_ci--
114e5c31af7Sopenharmony_ci
115e5c31af7Sopenharmony_ci[open,refpage='VkBufferCreateInfo',desc='Structure specifying the parameters of a newly created buffer object',type='structs']
116e5c31af7Sopenharmony_ci--
117e5c31af7Sopenharmony_ci:refpage: VkBufferCreateInfo
118e5c31af7Sopenharmony_ci
119e5c31af7Sopenharmony_ciThe sname:VkBufferCreateInfo structure is defined as:
120e5c31af7Sopenharmony_ci
121e5c31af7Sopenharmony_ciinclude::{generated}/api/structs/VkBufferCreateInfo.adoc[]
122e5c31af7Sopenharmony_ci
123e5c31af7Sopenharmony_ci  * pname:sType is a elink:VkStructureType value identifying this structure.
124e5c31af7Sopenharmony_ci  * pname:pNext is `NULL` or a pointer to a structure extending this
125e5c31af7Sopenharmony_ci    structure.
126e5c31af7Sopenharmony_ci  * pname:flags is a bitmask of elink:VkBufferCreateFlagBits specifying
127e5c31af7Sopenharmony_ci    additional parameters of the buffer.
128e5c31af7Sopenharmony_ci  * pname:size is the size in bytes of the buffer to be created.
129e5c31af7Sopenharmony_ci  * pname:usage is a bitmask of elink:VkBufferUsageFlagBits specifying
130e5c31af7Sopenharmony_ci    allowed usages of the buffer.
131e5c31af7Sopenharmony_ci  * pname:sharingMode is a elink:VkSharingMode value specifying the sharing
132e5c31af7Sopenharmony_ci    mode of the buffer when it will be accessed by multiple queue families.
133e5c31af7Sopenharmony_ci  * pname:queueFamilyIndexCount is the number of entries in the
134e5c31af7Sopenharmony_ci    pname:pQueueFamilyIndices array.
135e5c31af7Sopenharmony_ci  * pname:pQueueFamilyIndices is a pointer to an array of queue families
136e5c31af7Sopenharmony_ci    that will access this buffer.
137e5c31af7Sopenharmony_ci    It is ignored if pname:sharingMode is not
138e5c31af7Sopenharmony_ci    ename:VK_SHARING_MODE_CONCURRENT.
139e5c31af7Sopenharmony_ci
140e5c31af7Sopenharmony_ciifdef::VK_KHR_maintenance5[]
141e5c31af7Sopenharmony_ciIf a slink:VkBufferUsageFlags2CreateInfoKHR structure is present in the
142e5c31af7Sopenharmony_cipname:pNext chain, slink:VkBufferUsageFlags2CreateInfoKHR::pname:usage from
143e5c31af7Sopenharmony_cithat structure is used instead of pname:usage from this structure.
144e5c31af7Sopenharmony_ciendif::VK_KHR_maintenance5[]
145e5c31af7Sopenharmony_ci
146e5c31af7Sopenharmony_ci.Valid Usage
147e5c31af7Sopenharmony_ci****
148e5c31af7Sopenharmony_ciinclude::{chapters}/commonvalidity/buffer_usage_flags_common.adoc[]
149e5c31af7Sopenharmony_ci  * [[VUID-VkBufferCreateInfo-size-00912]]
150e5c31af7Sopenharmony_ci    pname:size must: be greater than `0`
151e5c31af7Sopenharmony_ci  * [[VUID-VkBufferCreateInfo-sharingMode-00913]]
152e5c31af7Sopenharmony_ci    If pname:sharingMode is ename:VK_SHARING_MODE_CONCURRENT,
153e5c31af7Sopenharmony_ci    pname:pQueueFamilyIndices must: be a valid pointer to an array of
154e5c31af7Sopenharmony_ci    pname:queueFamilyIndexCount code:uint32_t values
155e5c31af7Sopenharmony_ci  * [[VUID-VkBufferCreateInfo-sharingMode-00914]]
156e5c31af7Sopenharmony_ci    If pname:sharingMode is ename:VK_SHARING_MODE_CONCURRENT,
157e5c31af7Sopenharmony_ci    pname:queueFamilyIndexCount must: be greater than `1`
158e5c31af7Sopenharmony_ci  * [[VUID-VkBufferCreateInfo-sharingMode-01419]]
159e5c31af7Sopenharmony_ci    If pname:sharingMode is ename:VK_SHARING_MODE_CONCURRENT, each element
160e5c31af7Sopenharmony_ci    of pname:pQueueFamilyIndices must: be unique and must: be less than
161e5c31af7Sopenharmony_ci    pname:pQueueFamilyPropertyCount returned by
162e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_1,VK_KHR_get_physical_device_properties2[]
163e5c31af7Sopenharmony_ci    either flink:vkGetPhysicalDeviceQueueFamilyProperties2 or
164e5c31af7Sopenharmony_ciendif::VK_VERSION_1_1,VK_KHR_get_physical_device_properties2[]
165e5c31af7Sopenharmony_ci    flink:vkGetPhysicalDeviceQueueFamilyProperties for the
166e5c31af7Sopenharmony_ci    pname:physicalDevice that was used to create pname:device
167e5c31af7Sopenharmony_ci  * [[VUID-VkBufferCreateInfo-flags-00915]]
168e5c31af7Sopenharmony_ciifndef::VKSC_VERSION_1_0[]
169e5c31af7Sopenharmony_ci    If the <<features-sparseBinding, pname:sparseBinding>> feature is not
170e5c31af7Sopenharmony_ci    enabled,
171e5c31af7Sopenharmony_ciendif::VKSC_VERSION_1_0[]
172e5c31af7Sopenharmony_ci    pname:flags must: not contain ename:VK_BUFFER_CREATE_SPARSE_BINDING_BIT
173e5c31af7Sopenharmony_ci  * [[VUID-VkBufferCreateInfo-flags-00916]]
174e5c31af7Sopenharmony_ciifndef::VKSC_VERSION_1_0[]
175e5c31af7Sopenharmony_ci    If the <<features-sparseResidencyBuffer, pname:sparseResidencyBuffer>>
176e5c31af7Sopenharmony_ci    feature is not enabled,
177e5c31af7Sopenharmony_ciendif::VKSC_VERSION_1_0[]
178e5c31af7Sopenharmony_ci    pname:flags must: not contain
179e5c31af7Sopenharmony_ci    ename:VK_BUFFER_CREATE_SPARSE_RESIDENCY_BIT
180e5c31af7Sopenharmony_ci  * [[VUID-VkBufferCreateInfo-flags-00917]]
181e5c31af7Sopenharmony_ciifndef::VKSC_VERSION_1_0[]
182e5c31af7Sopenharmony_ci    If the <<features-sparseResidencyAliased, pname:sparseResidencyAliased>>
183e5c31af7Sopenharmony_ci    feature is not enabled,
184e5c31af7Sopenharmony_ciendif::VKSC_VERSION_1_0[]
185e5c31af7Sopenharmony_ci    pname:flags must: not contain ename:VK_BUFFER_CREATE_SPARSE_ALIASED_BIT
186e5c31af7Sopenharmony_ciifndef::VKSC_VERSION_1_0[]
187e5c31af7Sopenharmony_ci  * [[VUID-VkBufferCreateInfo-flags-00918]]
188e5c31af7Sopenharmony_ci    If pname:flags contains ename:VK_BUFFER_CREATE_SPARSE_RESIDENCY_BIT or
189e5c31af7Sopenharmony_ci    ename:VK_BUFFER_CREATE_SPARSE_ALIASED_BIT, it must: also contain
190e5c31af7Sopenharmony_ci    ename:VK_BUFFER_CREATE_SPARSE_BINDING_BIT
191e5c31af7Sopenharmony_ciendif::VKSC_VERSION_1_0[]
192e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_1,VK_KHR_external_memory[]
193e5c31af7Sopenharmony_ci  * [[VUID-VkBufferCreateInfo-pNext-00920]]
194e5c31af7Sopenharmony_ci    If the pname:pNext chain includes a
195e5c31af7Sopenharmony_ci    slink:VkExternalMemoryBufferCreateInfo structure, its pname:handleTypes
196e5c31af7Sopenharmony_ci    member must: only contain bits that are also in
197e5c31af7Sopenharmony_ci    slink:VkExternalBufferProperties::pname:externalMemoryProperties.compatibleHandleTypes,
198e5c31af7Sopenharmony_ci    as returned by flink:vkGetPhysicalDeviceExternalBufferProperties with
199e5c31af7Sopenharmony_ci    pname:pExternalBufferInfo->handleType equal to any one of the handle
200e5c31af7Sopenharmony_ci    types specified in
201e5c31af7Sopenharmony_ci    slink:VkExternalMemoryBufferCreateInfo::pname:handleTypes
202e5c31af7Sopenharmony_ciendif::VK_VERSION_1_1,VK_KHR_external_memory[]
203e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_1[]
204e5c31af7Sopenharmony_ci  * [[VUID-VkBufferCreateInfo-flags-01887]]
205e5c31af7Sopenharmony_ci    If the <<features-protectedMemory, pname:protectedMemory>> feature is
206e5c31af7Sopenharmony_ci    not enabled, pname:flags must: not contain
207e5c31af7Sopenharmony_ci    ename:VK_BUFFER_CREATE_PROTECTED_BIT
208e5c31af7Sopenharmony_ciifndef::VKSC_VERSION_1_0[]
209e5c31af7Sopenharmony_ci  * [[VUID-VkBufferCreateInfo-None-01888]]
210e5c31af7Sopenharmony_ci    If any of the bits ename:VK_BUFFER_CREATE_SPARSE_BINDING_BIT,
211e5c31af7Sopenharmony_ci    ename:VK_BUFFER_CREATE_SPARSE_RESIDENCY_BIT, or
212e5c31af7Sopenharmony_ci    ename:VK_BUFFER_CREATE_SPARSE_ALIASED_BIT are set,
213e5c31af7Sopenharmony_ci    ename:VK_BUFFER_CREATE_PROTECTED_BIT must: not also be set
214e5c31af7Sopenharmony_ciendif::VKSC_VERSION_1_0[]
215e5c31af7Sopenharmony_ciendif::VK_VERSION_1_1[]
216e5c31af7Sopenharmony_ciifdef::VK_NV_dedicated_allocation[]
217e5c31af7Sopenharmony_ci  * [[VUID-VkBufferCreateInfo-pNext-01571]]
218e5c31af7Sopenharmony_ci    If the pname:pNext chain includes a
219e5c31af7Sopenharmony_ci    slink:VkDedicatedAllocationBufferCreateInfoNV structure, and the
220e5c31af7Sopenharmony_ci    pname:dedicatedAllocation member of the chained structure is
221e5c31af7Sopenharmony_ci    ename:VK_TRUE, then pname:flags must: not include
222e5c31af7Sopenharmony_ci    ename:VK_BUFFER_CREATE_SPARSE_BINDING_BIT,
223e5c31af7Sopenharmony_ci    ename:VK_BUFFER_CREATE_SPARSE_RESIDENCY_BIT, or
224e5c31af7Sopenharmony_ci    ename:VK_BUFFER_CREATE_SPARSE_ALIASED_BIT
225e5c31af7Sopenharmony_ciendif::VK_NV_dedicated_allocation[]
226e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_2,VK_EXT_buffer_device_address,VK_KHR_buffer_device_address[]
227e5c31af7Sopenharmony_ciifdef::VK_EXT_buffer_device_address[]
228e5c31af7Sopenharmony_ci  * [[VUID-VkBufferCreateInfo-deviceAddress-02604]]
229e5c31af7Sopenharmony_ci    If slink:VkBufferDeviceAddressCreateInfoEXT::pname:deviceAddress is not
230e5c31af7Sopenharmony_ci    zero, pname:flags must: include
231e5c31af7Sopenharmony_ci    ename:VK_BUFFER_CREATE_DEVICE_ADDRESS_CAPTURE_REPLAY_BIT
232e5c31af7Sopenharmony_ciendif::VK_EXT_buffer_device_address[]
233e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_2,VK_KHR_buffer_device_address[]
234e5c31af7Sopenharmony_ci  * [[VUID-VkBufferCreateInfo-opaqueCaptureAddress-03337]]
235e5c31af7Sopenharmony_ci    If
236e5c31af7Sopenharmony_ci    slink:VkBufferOpaqueCaptureAddressCreateInfo::pname:opaqueCaptureAddress
237e5c31af7Sopenharmony_ci    is not zero, pname:flags must: include
238e5c31af7Sopenharmony_ci    ename:VK_BUFFER_CREATE_DEVICE_ADDRESS_CAPTURE_REPLAY_BIT
239e5c31af7Sopenharmony_ciendif::VK_VERSION_1_2,VK_KHR_buffer_device_address[]
240e5c31af7Sopenharmony_ci  * [[VUID-VkBufferCreateInfo-flags-03338]]
241e5c31af7Sopenharmony_ci    If pname:flags includes
242e5c31af7Sopenharmony_ci    ename:VK_BUFFER_CREATE_DEVICE_ADDRESS_CAPTURE_REPLAY_BIT, the
243e5c31af7Sopenharmony_ciifndef::VK_EXT_buffer_device_address[]
244e5c31af7Sopenharmony_ci    <<features-bufferDeviceAddressCaptureReplay,
245e5c31af7Sopenharmony_ci    pname:bufferDeviceAddressCaptureReplay>> feature
246e5c31af7Sopenharmony_ciendif::VK_EXT_buffer_device_address[]
247e5c31af7Sopenharmony_ciifdef::VK_EXT_buffer_device_address[]
248e5c31af7Sopenharmony_ci    <<features-bufferDeviceAddressCaptureReplayEXT,
249e5c31af7Sopenharmony_ci    pname:bufferDeviceAddressCaptureReplay>> feature
250e5c31af7Sopenharmony_ciendif::VK_EXT_buffer_device_address[]
251e5c31af7Sopenharmony_ci    must: be enabled
252e5c31af7Sopenharmony_ciendif::VK_VERSION_1_2,VK_EXT_buffer_device_address,VK_KHR_buffer_device_address[]
253e5c31af7Sopenharmony_ciifdef::VK_KHR_video_decode_queue[]
254e5c31af7Sopenharmony_ci  * [[VUID-VkBufferCreateInfo-usage-04813]]
255e5c31af7Sopenharmony_ci    If pname:usage includes ename:VK_BUFFER_USAGE_VIDEO_DECODE_SRC_BIT_KHR
256e5c31af7Sopenharmony_ci    or ename:VK_BUFFER_USAGE_VIDEO_DECODE_DST_BIT_KHR,
257e5c31af7Sopenharmony_ciifdef::VK_KHR_video_maintenance1[]
258e5c31af7Sopenharmony_ci    and pname:flags does not include
259e5c31af7Sopenharmony_ci    ename:VK_BUFFER_CREATE_VIDEO_PROFILE_INDEPENDENT_BIT_KHR,
260e5c31af7Sopenharmony_ciendif::VK_KHR_video_maintenance1[]
261e5c31af7Sopenharmony_ci    then the pname:pNext chain must: include a
262e5c31af7Sopenharmony_ci    slink:VkVideoProfileListInfoKHR structure with pname:profileCount
263e5c31af7Sopenharmony_ci    greater than `0` and pname:pProfiles including at least one
264e5c31af7Sopenharmony_ci    slink:VkVideoProfileInfoKHR structure with a pname:videoCodecOperation
265e5c31af7Sopenharmony_ci    member specifying a decode operation
266e5c31af7Sopenharmony_ciendif::VK_KHR_video_decode_queue[]
267e5c31af7Sopenharmony_ciifdef::VK_KHR_video_encode_queue[]
268e5c31af7Sopenharmony_ci  * [[VUID-VkBufferCreateInfo-usage-04814]]
269e5c31af7Sopenharmony_ci    If pname:usage includes ename:VK_BUFFER_USAGE_VIDEO_ENCODE_SRC_BIT_KHR
270e5c31af7Sopenharmony_ci    or ename:VK_BUFFER_USAGE_VIDEO_ENCODE_DST_BIT_KHR,
271e5c31af7Sopenharmony_ciifdef::VK_KHR_video_maintenance1[]
272e5c31af7Sopenharmony_ci    and pname:flags does not include
273e5c31af7Sopenharmony_ci    ename:VK_BUFFER_CREATE_VIDEO_PROFILE_INDEPENDENT_BIT_KHR,
274e5c31af7Sopenharmony_ciendif::VK_KHR_video_maintenance1[]
275e5c31af7Sopenharmony_ci    then the pname:pNext chain must: include a
276e5c31af7Sopenharmony_ci    slink:VkVideoProfileListInfoKHR structure with pname:profileCount
277e5c31af7Sopenharmony_ci    greater than `0` and pname:pProfiles including at least one
278e5c31af7Sopenharmony_ci    slink:VkVideoProfileInfoKHR structure with a pname:videoCodecOperation
279e5c31af7Sopenharmony_ci    member specifying an encode operation
280e5c31af7Sopenharmony_ciendif::VK_KHR_video_encode_queue[]
281e5c31af7Sopenharmony_ciifdef::VK_KHR_video_maintenance1[]
282e5c31af7Sopenharmony_ci  * [[VUID-VkBufferCreateInfo-flags-08325]]
283e5c31af7Sopenharmony_ci    If pname:flags includes
284e5c31af7Sopenharmony_ci    ename:VK_BUFFER_CREATE_VIDEO_PROFILE_INDEPENDENT_BIT_KHR, then
285e5c31af7Sopenharmony_ci    <<features-videoMaintenance1,pname:videoMaintenance1>> must: be enabled
286e5c31af7Sopenharmony_ciendif::VK_KHR_video_maintenance1[]
287e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_3,VK_KHR_maintenance4[]
288e5c31af7Sopenharmony_ci  * [[VUID-VkBufferCreateInfo-size-06409]]
289e5c31af7Sopenharmony_ci    pname:size must: be less than or equal to
290e5c31af7Sopenharmony_ci    slink:VkPhysicalDeviceMaintenance4Properties::pname:maxBufferSize
291e5c31af7Sopenharmony_ciendif::VK_VERSION_1_3,VK_KHR_maintenance4[]
292e5c31af7Sopenharmony_ciifdef::VK_EXT_descriptor_buffer[]
293e5c31af7Sopenharmony_ci  * [[VUID-VkBufferCreateInfo-usage-08097]]
294e5c31af7Sopenharmony_ci    If pname:usage includes
295e5c31af7Sopenharmony_ci    ename:VK_BUFFER_USAGE_SAMPLER_DESCRIPTOR_BUFFER_BIT_EXT, creating this
296e5c31af7Sopenharmony_ci    sname:VkBuffer must: not cause the total required space for all
297e5c31af7Sopenharmony_ci    currently valid buffers using this flag on the device to exceed
298e5c31af7Sopenharmony_ci    slink:VkPhysicalDeviceDescriptorBufferPropertiesEXT::pname:samplerDescriptorBufferAddressSpaceSize
299e5c31af7Sopenharmony_ci    or
300e5c31af7Sopenharmony_ci    slink:VkPhysicalDeviceDescriptorBufferPropertiesEXT::pname:descriptorBufferAddressSpaceSize
301e5c31af7Sopenharmony_ci  * [[VUID-VkBufferCreateInfo-usage-08098]]
302e5c31af7Sopenharmony_ci    If pname:usage includes
303e5c31af7Sopenharmony_ci    ename:VK_BUFFER_USAGE_RESOURCE_DESCRIPTOR_BUFFER_BIT_EXT, creating this
304e5c31af7Sopenharmony_ci    sname:VkBuffer must: not cause the total required space for all
305e5c31af7Sopenharmony_ci    currently valid buffers using this flag on the device to exceed
306e5c31af7Sopenharmony_ci    slink:VkPhysicalDeviceDescriptorBufferPropertiesEXT::pname:resourceDescriptorBufferAddressSpaceSize
307e5c31af7Sopenharmony_ci    or
308e5c31af7Sopenharmony_ci    slink:VkPhysicalDeviceDescriptorBufferPropertiesEXT::pname:descriptorBufferAddressSpaceSize
309e5c31af7Sopenharmony_ci  * [[VUID-VkBufferCreateInfo-flags-08099]]
310e5c31af7Sopenharmony_ci    If pname:flags includes
311e5c31af7Sopenharmony_ci    ename:VK_BUFFER_CREATE_DESCRIPTOR_BUFFER_CAPTURE_REPLAY_BIT_EXT, the
312e5c31af7Sopenharmony_ci    <<features-descriptorBufferCaptureReplay,
313e5c31af7Sopenharmony_ci    pname:descriptorBufferCaptureReplay>> feature must: be enabled
314e5c31af7Sopenharmony_ci  * [[VUID-VkBufferCreateInfo-pNext-08100]]
315e5c31af7Sopenharmony_ci    If the pname:pNext chain includes a
316e5c31af7Sopenharmony_ci    slink:VkOpaqueCaptureDescriptorDataCreateInfoEXT structure, pname:flags
317e5c31af7Sopenharmony_ci    must: contain
318e5c31af7Sopenharmony_ci    ename:VK_BUFFER_CREATE_DESCRIPTOR_BUFFER_CAPTURE_REPLAY_BIT_EXT
319e5c31af7Sopenharmony_ci  * [[VUID-VkBufferCreateInfo-usage-08101]]
320e5c31af7Sopenharmony_ci    If pname:usage includes
321e5c31af7Sopenharmony_ci    ename:VK_BUFFER_USAGE_PUSH_DESCRIPTORS_DESCRIPTOR_BUFFER_BIT_EXT, the
322e5c31af7Sopenharmony_ci    <<features-descriptorBufferPushDescriptors,
323e5c31af7Sopenharmony_ci    pname:descriptorBufferPushDescriptors>> feature must: be enabled
324e5c31af7Sopenharmony_ci  * [[VUID-VkBufferCreateInfo-usage-08102]]
325e5c31af7Sopenharmony_ci    If pname:usage includes
326e5c31af7Sopenharmony_ci    ename:VK_BUFFER_USAGE_PUSH_DESCRIPTORS_DESCRIPTOR_BUFFER_BIT_EXT
327e5c31af7Sopenharmony_ci    <<limits-bufferlessPushDescriptors,
328e5c31af7Sopenharmony_ci    sname:VkPhysicalDeviceDescriptorBufferPropertiesEXT::pname:bufferlessPushDescriptors>>
329e5c31af7Sopenharmony_ci    must: be ename:VK_FALSE
330e5c31af7Sopenharmony_ci  * [[VUID-VkBufferCreateInfo-usage-08103]]
331e5c31af7Sopenharmony_ci    If pname:usage includes
332e5c31af7Sopenharmony_ci    ename:VK_BUFFER_USAGE_PUSH_DESCRIPTORS_DESCRIPTOR_BUFFER_BIT_EXT,
333e5c31af7Sopenharmony_ci    pname:usage must: contain at least one of
334e5c31af7Sopenharmony_ci    ename:VK_BUFFER_USAGE_RESOURCE_DESCRIPTOR_BUFFER_BIT_EXT or
335e5c31af7Sopenharmony_ci    ename:VK_BUFFER_USAGE_SAMPLER_DESCRIPTOR_BUFFER_BIT_EXT
336e5c31af7Sopenharmony_ciendif::VK_EXT_descriptor_buffer[]
337e5c31af7Sopenharmony_ci****
338e5c31af7Sopenharmony_ciifdef::VKSC_VERSION_1_0[]
339e5c31af7Sopenharmony_ciifdef::hidden[]
340e5c31af7Sopenharmony_ci// tag::scdeviation[]
341e5c31af7Sopenharmony_ci  * slink:VkBufferCreateInfo::pname:flags must: not contain any of the
342e5c31af7Sopenharmony_ci    ename:VK_BUFFER_CREATE_SPARSE_BINDING_BIT,
343e5c31af7Sopenharmony_ci    ename:VK_BUFFER_CREATE_SPARSE_RESIDENCY_BIT, or
344e5c31af7Sopenharmony_ci    ename:VK_BUFFER_CREATE_SPARSE_ALIASED_BIT flags <<SCID-8>>.
345e5c31af7Sopenharmony_ci// end::scdeviation[]
346e5c31af7Sopenharmony_ciendif::hidden[]
347e5c31af7Sopenharmony_ciendif::VKSC_VERSION_1_0[]
348e5c31af7Sopenharmony_ci
349e5c31af7Sopenharmony_ciinclude::{generated}/validity/structs/VkBufferCreateInfo.adoc[]
350e5c31af7Sopenharmony_ci--
351e5c31af7Sopenharmony_ci
352e5c31af7Sopenharmony_ciifdef::VK_KHR_maintenance5[]
353e5c31af7Sopenharmony_ci[open,refpage='VkBufferUsageFlags2CreateInfoKHR',desc='Extended buffer usage flags',type='structs']
354e5c31af7Sopenharmony_ci--
355e5c31af7Sopenharmony_ciThe sname:VkBufferUsageFlags2CreateInfoKHR structure is defined as:
356e5c31af7Sopenharmony_ci
357e5c31af7Sopenharmony_ciinclude::{generated}/api/structs/VkBufferUsageFlags2CreateInfoKHR.adoc[]
358e5c31af7Sopenharmony_ci
359e5c31af7Sopenharmony_ci  * pname:sType is a elink:VkStructureType value identifying this structure.
360e5c31af7Sopenharmony_ci  * pname:pNext is `NULL` or a pointer to a structure extending this
361e5c31af7Sopenharmony_ci    structure.
362e5c31af7Sopenharmony_ci  * pname:usage is a bitmask of elink:VkBufferUsageFlagBits2KHR specifying
363e5c31af7Sopenharmony_ci    allowed usages of the buffer.
364e5c31af7Sopenharmony_ci
365e5c31af7Sopenharmony_ciIf this structure is included in the pname:pNext chain of a buffer creation
366e5c31af7Sopenharmony_cistructure, pname:usage is used instead of the corresponding pname:usage
367e5c31af7Sopenharmony_civalue passed in that creation structure, allowing additional usage flags to
368e5c31af7Sopenharmony_cibe specified.
369e5c31af7Sopenharmony_ciIf this structure is included in the pname:pNext chain of a buffer query
370e5c31af7Sopenharmony_cistructure, the usage flags of the buffer are returned in pname:usage of this
371e5c31af7Sopenharmony_cistructure, and the usage flags representable in pname:usage of the buffer
372e5c31af7Sopenharmony_ciquery structure are also returned in that field.
373e5c31af7Sopenharmony_ci
374e5c31af7Sopenharmony_ciinclude::{generated}/validity/structs/VkBufferUsageFlags2CreateInfoKHR.adoc[]
375e5c31af7Sopenharmony_ci--
376e5c31af7Sopenharmony_ci
377e5c31af7Sopenharmony_ci[open,refpage='VkBufferUsageFlagBits2KHR',desc='Bitmask controlling how a pipeline is created',type='enums']
378e5c31af7Sopenharmony_ci--
379e5c31af7Sopenharmony_ciBits which can: be set in
380e5c31af7Sopenharmony_cislink:VkBufferUsageFlags2CreateInfoKHR::pname:usage, specifying usage
381e5c31af7Sopenharmony_cibehavior of a buffer, are:
382e5c31af7Sopenharmony_ci
383e5c31af7Sopenharmony_ciinclude::{generated}/api/enums/VkBufferUsageFlagBits2KHR.adoc[]
384e5c31af7Sopenharmony_ci
385e5c31af7Sopenharmony_ci// Note - when editing this section, make sure that any relevant changes
386e5c31af7Sopenharmony_ci// are mirrored in VkBufferUsageFlagBits2KHR/VkBufferUsageFlagBits
387e5c31af7Sopenharmony_ci
388e5c31af7Sopenharmony_ci  * ename:VK_BUFFER_USAGE_2_TRANSFER_SRC_BIT_KHR specifies that the buffer
389e5c31af7Sopenharmony_ci    can: be used as the source of a _transfer command_ (see the definition
390e5c31af7Sopenharmony_ci    of <<synchronization-pipeline-stages-transfer,
391e5c31af7Sopenharmony_ci    ename:VK_PIPELINE_STAGE_TRANSFER_BIT>>).
392e5c31af7Sopenharmony_ci  * ename:VK_BUFFER_USAGE_2_TRANSFER_DST_BIT_KHR specifies that the buffer
393e5c31af7Sopenharmony_ci    can: be used as the destination of a transfer command.
394e5c31af7Sopenharmony_ci  * ename:VK_BUFFER_USAGE_2_UNIFORM_TEXEL_BUFFER_BIT_KHR specifies that the
395e5c31af7Sopenharmony_ci    buffer can: be used to create a sname:VkBufferView suitable for
396e5c31af7Sopenharmony_ci    occupying a sname:VkDescriptorSet slot of type
397e5c31af7Sopenharmony_ci    ename:VK_DESCRIPTOR_TYPE_UNIFORM_TEXEL_BUFFER.
398e5c31af7Sopenharmony_ci  * ename:VK_BUFFER_USAGE_2_STORAGE_TEXEL_BUFFER_BIT_KHR specifies that the
399e5c31af7Sopenharmony_ci    buffer can: be used to create a sname:VkBufferView suitable for
400e5c31af7Sopenharmony_ci    occupying a sname:VkDescriptorSet slot of type
401e5c31af7Sopenharmony_ci    ename:VK_DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER.
402e5c31af7Sopenharmony_ci  * ename:VK_BUFFER_USAGE_2_UNIFORM_BUFFER_BIT_KHR specifies that the buffer
403e5c31af7Sopenharmony_ci    can: be used in a sname:VkDescriptorBufferInfo suitable for occupying a
404e5c31af7Sopenharmony_ci    sname:VkDescriptorSet slot either of type
405e5c31af7Sopenharmony_ci    ename:VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER or
406e5c31af7Sopenharmony_ci    ename:VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC.
407e5c31af7Sopenharmony_ci  * ename:VK_BUFFER_USAGE_2_STORAGE_BUFFER_BIT_KHR specifies that the buffer
408e5c31af7Sopenharmony_ci    can: be used in a sname:VkDescriptorBufferInfo suitable for occupying a
409e5c31af7Sopenharmony_ci    sname:VkDescriptorSet slot either of type
410e5c31af7Sopenharmony_ci    ename:VK_DESCRIPTOR_TYPE_STORAGE_BUFFER or
411e5c31af7Sopenharmony_ci    ename:VK_DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC.
412e5c31af7Sopenharmony_ci  * ename:VK_BUFFER_USAGE_2_INDEX_BUFFER_BIT_KHR specifies that the buffer
413e5c31af7Sopenharmony_ci    is suitable for passing as the pname:buffer parameter to
414e5c31af7Sopenharmony_ciifdef::VK_KHR_maintenance5[flink:vkCmdBindIndexBuffer2KHR and]
415e5c31af7Sopenharmony_ci    flink:vkCmdBindIndexBuffer.
416e5c31af7Sopenharmony_ci  * ename:VK_BUFFER_USAGE_2_VERTEX_BUFFER_BIT_KHR specifies that the buffer
417e5c31af7Sopenharmony_ci    is suitable for passing as an element of the pname:pBuffers array to
418e5c31af7Sopenharmony_ci    flink:vkCmdBindVertexBuffers.
419e5c31af7Sopenharmony_ci  * ename:VK_BUFFER_USAGE_2_INDIRECT_BUFFER_BIT_KHR specifies that the
420e5c31af7Sopenharmony_ci    buffer is suitable for passing as the pname:buffer parameter to
421e5c31af7Sopenharmony_ci    flink:vkCmdDrawIndirect, flink:vkCmdDrawIndexedIndirect,
422e5c31af7Sopenharmony_ciifdef::VK_NV_mesh_shader[]
423e5c31af7Sopenharmony_ci    flink:vkCmdDrawMeshTasksIndirectNV,
424e5c31af7Sopenharmony_ci    flink:vkCmdDrawMeshTasksIndirectCountNV,
425e5c31af7Sopenharmony_ciendif::VK_NV_mesh_shader[]
426e5c31af7Sopenharmony_ciifdef::VK_EXT_mesh_shader[]
427e5c31af7Sopenharmony_ci    fname:vkCmdDrawMeshTasksIndirectEXT,
428e5c31af7Sopenharmony_ci    fname:vkCmdDrawMeshTasksIndirectCountEXT,
429e5c31af7Sopenharmony_ciendif::VK_EXT_mesh_shader[]
430e5c31af7Sopenharmony_ciifdef::VK_HUAWEI_cluster_culling_shader[]
431e5c31af7Sopenharmony_ci    flink:vkCmdDrawClusterIndirectHUAWEI,
432e5c31af7Sopenharmony_ciendif::VK_HUAWEI_cluster_culling_shader[]
433e5c31af7Sopenharmony_ci    or flink:vkCmdDispatchIndirect.
434e5c31af7Sopenharmony_ciifdef::VK_NV_device_generated_commands[]
435e5c31af7Sopenharmony_ci    It is also suitable for passing as the pname:buffer member of
436e5c31af7Sopenharmony_ci    sname:VkIndirectCommandsStreamNV, or pname:sequencesCountBuffer or
437e5c31af7Sopenharmony_ci    pname:sequencesIndexBuffer or pname:preprocessedBuffer member of
438e5c31af7Sopenharmony_ci    sname:VkGeneratedCommandsInfoNV
439e5c31af7Sopenharmony_ciendif::VK_NV_device_generated_commands[]
440e5c31af7Sopenharmony_ciifdef::VK_EXT_conditional_rendering[]
441e5c31af7Sopenharmony_ci  * ename:VK_BUFFER_USAGE_2_CONDITIONAL_RENDERING_BIT_EXT specifies that the
442e5c31af7Sopenharmony_ci    buffer is suitable for passing as the pname:buffer parameter to
443e5c31af7Sopenharmony_ci    flink:vkCmdBeginConditionalRenderingEXT.
444e5c31af7Sopenharmony_ciendif::VK_EXT_conditional_rendering[]
445e5c31af7Sopenharmony_ciifdef::VK_EXT_transform_feedback[]
446e5c31af7Sopenharmony_ci  * ename:VK_BUFFER_USAGE_2_TRANSFORM_FEEDBACK_BUFFER_BIT_EXT specifies that
447e5c31af7Sopenharmony_ci    the buffer is suitable for using for binding as a transform feedback
448e5c31af7Sopenharmony_ci    buffer with flink:vkCmdBindTransformFeedbackBuffersEXT.
449e5c31af7Sopenharmony_ci  * ename:VK_BUFFER_USAGE_2_TRANSFORM_FEEDBACK_COUNTER_BUFFER_BIT_EXT
450e5c31af7Sopenharmony_ci    specifies that the buffer is suitable for using as a counter buffer with
451e5c31af7Sopenharmony_ci    flink:vkCmdBeginTransformFeedbackEXT and
452e5c31af7Sopenharmony_ci    flink:vkCmdEndTransformFeedbackEXT.
453e5c31af7Sopenharmony_ciendif::VK_EXT_transform_feedback[]
454e5c31af7Sopenharmony_ciifdef::VK_EXT_descriptor_buffer[]
455e5c31af7Sopenharmony_ci  * ename:VK_BUFFER_USAGE_2_SAMPLER_DESCRIPTOR_BUFFER_BIT_EXT specifies that
456e5c31af7Sopenharmony_ci    the buffer is suitable to contain sampler and combined image sampler
457e5c31af7Sopenharmony_ci    descriptors when bound as a descriptor buffer.
458e5c31af7Sopenharmony_ci    Buffers containing combined image sampler descriptors must: also specify
459e5c31af7Sopenharmony_ci    ename:VK_BUFFER_USAGE_2_RESOURCE_DESCRIPTOR_BUFFER_BIT_EXT.
460e5c31af7Sopenharmony_ci  * ename:VK_BUFFER_USAGE_2_RESOURCE_DESCRIPTOR_BUFFER_BIT_EXT specifies
461e5c31af7Sopenharmony_ci    that the buffer is suitable to contain resource descriptors when bound
462e5c31af7Sopenharmony_ci    as a descriptor buffer.
463e5c31af7Sopenharmony_ci  * ename:VK_BUFFER_USAGE_2_PUSH_DESCRIPTORS_DESCRIPTOR_BUFFER_BIT_EXT
464e5c31af7Sopenharmony_ci    specifies that the buffer, when bound, can: be used by the
465e5c31af7Sopenharmony_ci    implementation to support push descriptors when using descriptor
466e5c31af7Sopenharmony_ci    buffers.
467e5c31af7Sopenharmony_ciendif::VK_EXT_descriptor_buffer[]
468e5c31af7Sopenharmony_ciifdef::VK_NV_ray_tracing[]
469e5c31af7Sopenharmony_ci  * ename:VK_BUFFER_USAGE_2_RAY_TRACING_BIT_NV specifies that the buffer is
470e5c31af7Sopenharmony_ci    suitable for use in flink:vkCmdTraceRaysNV.
471e5c31af7Sopenharmony_ciendif::VK_NV_ray_tracing[]
472e5c31af7Sopenharmony_ciifdef::VK_KHR_ray_tracing_pipeline[]
473e5c31af7Sopenharmony_ci  * ename:VK_BUFFER_USAGE_2_SHADER_BINDING_TABLE_BIT_KHR specifies that the
474e5c31af7Sopenharmony_ci    buffer is suitable for use as a <<shader-binding-table,Shader Binding
475e5c31af7Sopenharmony_ci    Table>>.
476e5c31af7Sopenharmony_ciendif::VK_KHR_ray_tracing_pipeline[]
477e5c31af7Sopenharmony_ciifdef::VK_KHR_acceleration_structure[]
478e5c31af7Sopenharmony_ci  * ename:VK_BUFFER_USAGE_2_ACCELERATION_STRUCTURE_BUILD_INPUT_READ_ONLY_BIT_KHR
479e5c31af7Sopenharmony_ci    specifies that the buffer is suitable for use as a read-only input to an
480e5c31af7Sopenharmony_ci    <<acceleration-structure-building,acceleration structure build>>.
481e5c31af7Sopenharmony_ci  * ename:VK_BUFFER_USAGE_2_ACCELERATION_STRUCTURE_STORAGE_BIT_KHR specifies
482e5c31af7Sopenharmony_ci    that the buffer is suitable for storage space for a
483e5c31af7Sopenharmony_ci    slink:VkAccelerationStructureKHR.
484e5c31af7Sopenharmony_ciendif::VK_KHR_acceleration_structure[]
485e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_2,VK_EXT_buffer_device_address,VK_KHR_buffer_device_address[]
486e5c31af7Sopenharmony_ci  * ename:VK_BUFFER_USAGE_2_SHADER_DEVICE_ADDRESS_BIT_KHR specifies that the
487e5c31af7Sopenharmony_ci    buffer can: be used to retrieve a buffer device address via
488e5c31af7Sopenharmony_ci    flink:vkGetBufferDeviceAddress and use that address to access the
489e5c31af7Sopenharmony_ci    buffer's memory from a shader.
490e5c31af7Sopenharmony_ciendif::VK_VERSION_1_2,VK_EXT_buffer_device_address,VK_KHR_buffer_device_address[]
491e5c31af7Sopenharmony_ciifdef::VK_KHR_video_decode_queue[]
492e5c31af7Sopenharmony_ci  * ename:VK_BUFFER_USAGE_2_VIDEO_DECODE_SRC_BIT_KHR specifies that the
493e5c31af7Sopenharmony_ci    buffer can: be used as the source video bitstream buffer in a
494e5c31af7Sopenharmony_ci    <<video-decode-operations, video decode operation>>.
495e5c31af7Sopenharmony_ci  * ename:VK_BUFFER_USAGE_2_VIDEO_DECODE_DST_BIT_KHR is reserved for future
496e5c31af7Sopenharmony_ci    use.
497e5c31af7Sopenharmony_ciendif::VK_KHR_video_decode_queue[]
498e5c31af7Sopenharmony_ciifdef::VK_KHR_video_encode_queue[]
499e5c31af7Sopenharmony_ci  * ename:VK_BUFFER_USAGE_2_VIDEO_ENCODE_DST_BIT_KHR specifies that the
500e5c31af7Sopenharmony_ci    buffer can: be used as the destination video bitstream buffer in a
501e5c31af7Sopenharmony_ci    <<video-encode-operations, video encode operation>>.
502e5c31af7Sopenharmony_ci  * ename:VK_BUFFER_USAGE_2_VIDEO_ENCODE_SRC_BIT_KHR is reserved for future
503e5c31af7Sopenharmony_ci    use.
504e5c31af7Sopenharmony_ciendif::VK_KHR_video_encode_queue[]
505e5c31af7Sopenharmony_ciifdef::VK_AMDX_shader_enqueue[]
506e5c31af7Sopenharmony_ci  * ename:VK_BUFFER_USAGE_2_EXECUTION_GRAPH_SCRATCH_BIT_AMDX specifies that
507e5c31af7Sopenharmony_ci    the buffer can: be used for as scratch memory for
508e5c31af7Sopenharmony_ci    <<executiongraphs,execution graph dispatch>>.
509e5c31af7Sopenharmony_ciendif::VK_AMDX_shader_enqueue[]
510e5c31af7Sopenharmony_ci--
511e5c31af7Sopenharmony_ci
512e5c31af7Sopenharmony_ci[open,refpage='VkBufferUsageFlags2KHR',desc='Bitmask of VkBufferUsageFlagBits2KHR',type='flags']
513e5c31af7Sopenharmony_ci--
514e5c31af7Sopenharmony_ciinclude::{generated}/api/flags/VkBufferUsageFlags2KHR.adoc[]
515e5c31af7Sopenharmony_ci
516e5c31af7Sopenharmony_citname:VkBufferUsageFlags2KHR is a bitmask type for setting a mask of zero or
517e5c31af7Sopenharmony_cimore elink:VkBufferUsageFlagBits2KHR.
518e5c31af7Sopenharmony_ci--
519e5c31af7Sopenharmony_ciendif::VK_KHR_maintenance5[]
520e5c31af7Sopenharmony_ci
521e5c31af7Sopenharmony_ci[open,refpage='VkBufferUsageFlagBits',desc='Bitmask specifying allowed usage of a buffer',type='enums']
522e5c31af7Sopenharmony_ci--
523e5c31af7Sopenharmony_ciBits which can: be set in slink:VkBufferCreateInfo::pname:usage, specifying
524e5c31af7Sopenharmony_ciusage behavior of a buffer, are:
525e5c31af7Sopenharmony_ci
526e5c31af7Sopenharmony_ciinclude::{generated}/api/enums/VkBufferUsageFlagBits.adoc[]
527e5c31af7Sopenharmony_ci
528e5c31af7Sopenharmony_ci// Note - when editing this section, make sure that any relevant changes
529e5c31af7Sopenharmony_ci// are mirrored in VkBufferUsageFlagBits2KHR/VkBufferUsageFlagBits
530e5c31af7Sopenharmony_ci
531e5c31af7Sopenharmony_ci  * ename:VK_BUFFER_USAGE_TRANSFER_SRC_BIT specifies that the buffer can: be
532e5c31af7Sopenharmony_ci    used as the source of a _transfer command_ (see the definition of
533e5c31af7Sopenharmony_ci    <<synchronization-pipeline-stages-transfer,
534e5c31af7Sopenharmony_ci    ename:VK_PIPELINE_STAGE_TRANSFER_BIT>>).
535e5c31af7Sopenharmony_ci  * ename:VK_BUFFER_USAGE_TRANSFER_DST_BIT specifies that the buffer can: be
536e5c31af7Sopenharmony_ci    used as the destination of a transfer command.
537e5c31af7Sopenharmony_ci  * ename:VK_BUFFER_USAGE_UNIFORM_TEXEL_BUFFER_BIT specifies that the buffer
538e5c31af7Sopenharmony_ci    can: be used to create a sname:VkBufferView suitable for occupying a
539e5c31af7Sopenharmony_ci    sname:VkDescriptorSet slot of type
540e5c31af7Sopenharmony_ci    ename:VK_DESCRIPTOR_TYPE_UNIFORM_TEXEL_BUFFER.
541e5c31af7Sopenharmony_ci  * ename:VK_BUFFER_USAGE_STORAGE_TEXEL_BUFFER_BIT specifies that the buffer
542e5c31af7Sopenharmony_ci    can: be used to create a sname:VkBufferView suitable for occupying a
543e5c31af7Sopenharmony_ci    sname:VkDescriptorSet slot of type
544e5c31af7Sopenharmony_ci    ename:VK_DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER.
545e5c31af7Sopenharmony_ci  * ename:VK_BUFFER_USAGE_UNIFORM_BUFFER_BIT specifies that the buffer can:
546e5c31af7Sopenharmony_ci    be used in a sname:VkDescriptorBufferInfo suitable for occupying a
547e5c31af7Sopenharmony_ci    sname:VkDescriptorSet slot either of type
548e5c31af7Sopenharmony_ci    ename:VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER or
549e5c31af7Sopenharmony_ci    ename:VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC.
550e5c31af7Sopenharmony_ci  * ename:VK_BUFFER_USAGE_STORAGE_BUFFER_BIT specifies that the buffer can:
551e5c31af7Sopenharmony_ci    be used in a sname:VkDescriptorBufferInfo suitable for occupying a
552e5c31af7Sopenharmony_ci    sname:VkDescriptorSet slot either of type
553e5c31af7Sopenharmony_ci    ename:VK_DESCRIPTOR_TYPE_STORAGE_BUFFER or
554e5c31af7Sopenharmony_ci    ename:VK_DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC.
555e5c31af7Sopenharmony_ci  * ename:VK_BUFFER_USAGE_INDEX_BUFFER_BIT specifies that the buffer is
556e5c31af7Sopenharmony_ci    suitable for passing as the pname:buffer parameter to
557e5c31af7Sopenharmony_ciifdef::VK_KHR_maintenance5[flink:vkCmdBindIndexBuffer2KHR and]
558e5c31af7Sopenharmony_ci    flink:vkCmdBindIndexBuffer.
559e5c31af7Sopenharmony_ci  * ename:VK_BUFFER_USAGE_VERTEX_BUFFER_BIT specifies that the buffer is
560e5c31af7Sopenharmony_ci    suitable for passing as an element of the pname:pBuffers array to
561e5c31af7Sopenharmony_ci    flink:vkCmdBindVertexBuffers.
562e5c31af7Sopenharmony_ci  * ename:VK_BUFFER_USAGE_INDIRECT_BUFFER_BIT specifies that the buffer is
563e5c31af7Sopenharmony_ci    suitable for passing as the pname:buffer parameter to
564e5c31af7Sopenharmony_ci    flink:vkCmdDrawIndirect, flink:vkCmdDrawIndexedIndirect,
565e5c31af7Sopenharmony_ciifdef::VK_NV_mesh_shader[]
566e5c31af7Sopenharmony_ci    flink:vkCmdDrawMeshTasksIndirectNV,
567e5c31af7Sopenharmony_ci    flink:vkCmdDrawMeshTasksIndirectCountNV,
568e5c31af7Sopenharmony_ciendif::VK_NV_mesh_shader[]
569e5c31af7Sopenharmony_ciifdef::VK_EXT_mesh_shader[]
570e5c31af7Sopenharmony_ci    fname:vkCmdDrawMeshTasksIndirectEXT,
571e5c31af7Sopenharmony_ci    fname:vkCmdDrawMeshTasksIndirectCountEXT,
572e5c31af7Sopenharmony_ciendif::VK_EXT_mesh_shader[]
573e5c31af7Sopenharmony_ciifdef::VK_HUAWEI_cluster_culling_shader[]
574e5c31af7Sopenharmony_ci    flink:vkCmdDrawClusterIndirectHUAWEI,
575e5c31af7Sopenharmony_ciendif::VK_HUAWEI_cluster_culling_shader[]
576e5c31af7Sopenharmony_ci    or flink:vkCmdDispatchIndirect.
577e5c31af7Sopenharmony_ciifdef::VK_NV_device_generated_commands[]
578e5c31af7Sopenharmony_ci    It is also suitable for passing as the pname:buffer member of
579e5c31af7Sopenharmony_ci    sname:VkIndirectCommandsStreamNV, or pname:sequencesCountBuffer or
580e5c31af7Sopenharmony_ci    pname:sequencesIndexBuffer or pname:preprocessedBuffer member of
581e5c31af7Sopenharmony_ci    sname:VkGeneratedCommandsInfoNV
582e5c31af7Sopenharmony_ciendif::VK_NV_device_generated_commands[]
583e5c31af7Sopenharmony_ciifdef::VK_EXT_conditional_rendering[]
584e5c31af7Sopenharmony_ci  * ename:VK_BUFFER_USAGE_CONDITIONAL_RENDERING_BIT_EXT specifies that the
585e5c31af7Sopenharmony_ci    buffer is suitable for passing as the pname:buffer parameter to
586e5c31af7Sopenharmony_ci    flink:vkCmdBeginConditionalRenderingEXT.
587e5c31af7Sopenharmony_ciendif::VK_EXT_conditional_rendering[]
588e5c31af7Sopenharmony_ciifdef::VK_EXT_transform_feedback[]
589e5c31af7Sopenharmony_ci  * ename:VK_BUFFER_USAGE_TRANSFORM_FEEDBACK_BUFFER_BIT_EXT specifies that
590e5c31af7Sopenharmony_ci    the buffer is suitable for using for binding as a transform feedback
591e5c31af7Sopenharmony_ci    buffer with flink:vkCmdBindTransformFeedbackBuffersEXT.
592e5c31af7Sopenharmony_ci  * ename:VK_BUFFER_USAGE_TRANSFORM_FEEDBACK_COUNTER_BUFFER_BIT_EXT
593e5c31af7Sopenharmony_ci    specifies that the buffer is suitable for using as a counter buffer with
594e5c31af7Sopenharmony_ci    flink:vkCmdBeginTransformFeedbackEXT and
595e5c31af7Sopenharmony_ci    flink:vkCmdEndTransformFeedbackEXT.
596e5c31af7Sopenharmony_ciendif::VK_EXT_transform_feedback[]
597e5c31af7Sopenharmony_ciifdef::VK_EXT_descriptor_buffer[]
598e5c31af7Sopenharmony_ci  * ename:VK_BUFFER_USAGE_SAMPLER_DESCRIPTOR_BUFFER_BIT_EXT specifies that
599e5c31af7Sopenharmony_ci    the buffer is suitable to contain sampler and combined image sampler
600e5c31af7Sopenharmony_ci    descriptors when bound as a descriptor buffer.
601e5c31af7Sopenharmony_ci    Buffers containing combined image sampler descriptors must: also specify
602e5c31af7Sopenharmony_ci    ename:VK_BUFFER_USAGE_RESOURCE_DESCRIPTOR_BUFFER_BIT_EXT.
603e5c31af7Sopenharmony_ci  * ename:VK_BUFFER_USAGE_RESOURCE_DESCRIPTOR_BUFFER_BIT_EXT specifies that
604e5c31af7Sopenharmony_ci    the buffer is suitable to contain resource descriptors when bound as a
605e5c31af7Sopenharmony_ci    descriptor buffer.
606e5c31af7Sopenharmony_ci  * ename:VK_BUFFER_USAGE_PUSH_DESCRIPTORS_DESCRIPTOR_BUFFER_BIT_EXT
607e5c31af7Sopenharmony_ci    specifies that the buffer, when bound, can: be used by the
608e5c31af7Sopenharmony_ci    implementation to support push descriptors when using descriptor
609e5c31af7Sopenharmony_ci    buffers.
610e5c31af7Sopenharmony_ciendif::VK_EXT_descriptor_buffer[]
611e5c31af7Sopenharmony_ciifdef::VK_NV_ray_tracing[]
612e5c31af7Sopenharmony_ci  * ename:VK_BUFFER_USAGE_RAY_TRACING_BIT_NV specifies that the buffer is
613e5c31af7Sopenharmony_ci    suitable for use in flink:vkCmdTraceRaysNV.
614e5c31af7Sopenharmony_ciendif::VK_NV_ray_tracing[]
615e5c31af7Sopenharmony_ciifdef::VK_KHR_ray_tracing_pipeline[]
616e5c31af7Sopenharmony_ci  * ename:VK_BUFFER_USAGE_SHADER_BINDING_TABLE_BIT_KHR specifies that the
617e5c31af7Sopenharmony_ci    buffer is suitable for use as a <<shader-binding-table,Shader Binding
618e5c31af7Sopenharmony_ci    Table>>.
619e5c31af7Sopenharmony_ciendif::VK_KHR_ray_tracing_pipeline[]
620e5c31af7Sopenharmony_ciifdef::VK_KHR_acceleration_structure[]
621e5c31af7Sopenharmony_ci  * ename:VK_BUFFER_USAGE_ACCELERATION_STRUCTURE_BUILD_INPUT_READ_ONLY_BIT_KHR
622e5c31af7Sopenharmony_ci    specifies that the buffer is suitable for use as a read-only input to an
623e5c31af7Sopenharmony_ci    <<acceleration-structure-building,acceleration structure build>>.
624e5c31af7Sopenharmony_ci  * ename:VK_BUFFER_USAGE_ACCELERATION_STRUCTURE_STORAGE_BIT_KHR specifies
625e5c31af7Sopenharmony_ci    that the buffer is suitable for storage space for a
626e5c31af7Sopenharmony_ci    slink:VkAccelerationStructureKHR.
627e5c31af7Sopenharmony_ciendif::VK_KHR_acceleration_structure[]
628e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_2,VK_EXT_buffer_device_address,VK_KHR_buffer_device_address[]
629e5c31af7Sopenharmony_ci  * ename:VK_BUFFER_USAGE_SHADER_DEVICE_ADDRESS_BIT specifies that the
630e5c31af7Sopenharmony_ci    buffer can: be used to retrieve a buffer device address via
631e5c31af7Sopenharmony_ci    flink:vkGetBufferDeviceAddress and use that address to access the
632e5c31af7Sopenharmony_ci    buffer's memory from a shader.
633e5c31af7Sopenharmony_ciendif::VK_VERSION_1_2,VK_EXT_buffer_device_address,VK_KHR_buffer_device_address[]
634e5c31af7Sopenharmony_ciifdef::VK_KHR_video_decode_queue[]
635e5c31af7Sopenharmony_ci  * ename:VK_BUFFER_USAGE_VIDEO_DECODE_SRC_BIT_KHR specifies that the buffer
636e5c31af7Sopenharmony_ci    can: be used as the source video bitstream buffer in a
637e5c31af7Sopenharmony_ci    <<video-decode-operations, video decode operation>>.
638e5c31af7Sopenharmony_ci  * ename:VK_BUFFER_USAGE_VIDEO_DECODE_DST_BIT_KHR is reserved for future
639e5c31af7Sopenharmony_ci    use.
640e5c31af7Sopenharmony_ciendif::VK_KHR_video_decode_queue[]
641e5c31af7Sopenharmony_ciifdef::VK_KHR_video_encode_queue[]
642e5c31af7Sopenharmony_ci  * ename:VK_BUFFER_USAGE_VIDEO_ENCODE_DST_BIT_KHR specifies that the buffer
643e5c31af7Sopenharmony_ci    can: be used as the destination video bitstream buffer in a
644e5c31af7Sopenharmony_ci    <<video-encode-operations, video encode operation>>.
645e5c31af7Sopenharmony_ci  * ename:VK_BUFFER_USAGE_VIDEO_ENCODE_SRC_BIT_KHR is reserved for future
646e5c31af7Sopenharmony_ci    use.
647e5c31af7Sopenharmony_ciendif::VK_KHR_video_encode_queue[]
648e5c31af7Sopenharmony_ciifdef::VK_AMDX_shader_enqueue[]
649e5c31af7Sopenharmony_ci  * ename:VK_BUFFER_USAGE_EXECUTION_GRAPH_SCRATCH_BIT_AMDX specifies that
650e5c31af7Sopenharmony_ci    the buffer can: be used for as scratch memory for
651e5c31af7Sopenharmony_ci    <<executiongraphs,execution graph dispatch>>.
652e5c31af7Sopenharmony_ciendif::VK_AMDX_shader_enqueue[]
653e5c31af7Sopenharmony_ci--
654e5c31af7Sopenharmony_ci
655e5c31af7Sopenharmony_ci[open,refpage='VkBufferUsageFlags',desc='Bitmask of VkBufferUsageFlagBits',type='flags']
656e5c31af7Sopenharmony_ci--
657e5c31af7Sopenharmony_ciinclude::{generated}/api/flags/VkBufferUsageFlags.adoc[]
658e5c31af7Sopenharmony_ci
659e5c31af7Sopenharmony_citname:VkBufferUsageFlags is a bitmask type for setting a mask of zero or
660e5c31af7Sopenharmony_cimore elink:VkBufferUsageFlagBits.
661e5c31af7Sopenharmony_ci--
662e5c31af7Sopenharmony_ci
663e5c31af7Sopenharmony_ci[open,refpage='VkBufferCreateFlagBits',desc='Bitmask specifying additional parameters of a buffer',type='enums']
664e5c31af7Sopenharmony_ci--
665e5c31af7Sopenharmony_ciBits which can: be set in slink:VkBufferCreateInfo::pname:flags, specifying
666e5c31af7Sopenharmony_ciadditional parameters of a buffer, are:
667e5c31af7Sopenharmony_ci
668e5c31af7Sopenharmony_ciinclude::{generated}/api/enums/VkBufferCreateFlagBits.adoc[]
669e5c31af7Sopenharmony_ci
670e5c31af7Sopenharmony_ci  * ename:VK_BUFFER_CREATE_SPARSE_BINDING_BIT specifies that the buffer will
671e5c31af7Sopenharmony_ci    be backed using sparse memory binding.
672e5c31af7Sopenharmony_ciifdef::VKSC_VERSION_1_0[]
673e5c31af7Sopenharmony_ci    This flag is not supported in Vulkan SC <<SCID-8>>.
674e5c31af7Sopenharmony_ciendif::VKSC_VERSION_1_0[]
675e5c31af7Sopenharmony_ci  * ename:VK_BUFFER_CREATE_SPARSE_RESIDENCY_BIT specifies that the buffer
676e5c31af7Sopenharmony_ci    can: be partially backed using sparse memory binding.
677e5c31af7Sopenharmony_ci    Buffers created with this flag must: also be created with the
678e5c31af7Sopenharmony_ci    ename:VK_BUFFER_CREATE_SPARSE_BINDING_BIT flag.
679e5c31af7Sopenharmony_ciifdef::VKSC_VERSION_1_0[]
680e5c31af7Sopenharmony_ci    This flag is not supported in Vulkan SC <<SCID-8>>.
681e5c31af7Sopenharmony_ciendif::VKSC_VERSION_1_0[]
682e5c31af7Sopenharmony_ci  * ename:VK_BUFFER_CREATE_SPARSE_ALIASED_BIT specifies that the buffer will
683e5c31af7Sopenharmony_ci    be backed using sparse memory binding with memory ranges that might also
684e5c31af7Sopenharmony_ci    simultaneously be backing another buffer (or another portion of the same
685e5c31af7Sopenharmony_ci    buffer).
686e5c31af7Sopenharmony_ci    Buffers created with this flag must: also be created with the
687e5c31af7Sopenharmony_ci    ename:VK_BUFFER_CREATE_SPARSE_BINDING_BIT flag.
688e5c31af7Sopenharmony_ciifdef::VKSC_VERSION_1_0[]
689e5c31af7Sopenharmony_ci    This flag is not supported in Vulkan SC <<SCID-8>>.
690e5c31af7Sopenharmony_ciendif::VKSC_VERSION_1_0[]
691e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_1[]
692e5c31af7Sopenharmony_ci  * ename:VK_BUFFER_CREATE_PROTECTED_BIT specifies that the buffer is a
693e5c31af7Sopenharmony_ci    protected buffer.
694e5c31af7Sopenharmony_ciendif::VK_VERSION_1_1[]
695e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_2,VK_EXT_buffer_device_address,VK_KHR_buffer_device_address[]
696e5c31af7Sopenharmony_ci  * ename:VK_BUFFER_CREATE_DEVICE_ADDRESS_CAPTURE_REPLAY_BIT specifies that
697e5c31af7Sopenharmony_ci    the buffer's address can: be saved and reused on a subsequent run (e.g.
698e5c31af7Sopenharmony_ci    for trace capture and replay), see
699e5c31af7Sopenharmony_ci    slink:VkBufferOpaqueCaptureAddressCreateInfo for more detail.
700e5c31af7Sopenharmony_ciendif::VK_VERSION_1_2,VK_EXT_buffer_device_address,VK_KHR_buffer_device_address[]
701e5c31af7Sopenharmony_ciifdef::VK_EXT_descriptor_buffer[]
702e5c31af7Sopenharmony_ci  * ename:VK_BUFFER_CREATE_DESCRIPTOR_BUFFER_CAPTURE_REPLAY_BIT_EXT
703e5c31af7Sopenharmony_ci    specifies that the buffer can: be used with descriptor buffers when
704e5c31af7Sopenharmony_ci    capturing and replaying (e.g. for trace capture and replay), see
705e5c31af7Sopenharmony_ci    slink:VkOpaqueCaptureDescriptorDataCreateInfoEXT for more detail.
706e5c31af7Sopenharmony_ciendif::VK_EXT_descriptor_buffer[]
707e5c31af7Sopenharmony_ciifdef::VK_KHR_video_maintenance1[]
708e5c31af7Sopenharmony_ci  * ename:VK_BUFFER_CREATE_VIDEO_PROFILE_INDEPENDENT_BIT_KHR specifies that
709e5c31af7Sopenharmony_ci    the buffer can: be used in <<video-coding,video coding operations>>
710e5c31af7Sopenharmony_ci    without having to specify at buffer creation time the set of video
711e5c31af7Sopenharmony_ci    profiles the buffer will be used with.
712e5c31af7Sopenharmony_ciendif::VK_KHR_video_maintenance1[]
713e5c31af7Sopenharmony_ci
714e5c31af7Sopenharmony_ciSee <<sparsememory-sparseresourcefeatures,Sparse Resource Features>> and
715e5c31af7Sopenharmony_ci<<features, Physical Device Features>> for details of the sparse memory
716e5c31af7Sopenharmony_cifeatures supported on a device.
717e5c31af7Sopenharmony_ci--
718e5c31af7Sopenharmony_ci
719e5c31af7Sopenharmony_ci[open,refpage='VkBufferCreateFlags',desc='Bitmask of VkBufferCreateFlagBits',type='flags']
720e5c31af7Sopenharmony_ci--
721e5c31af7Sopenharmony_ciinclude::{generated}/api/flags/VkBufferCreateFlags.adoc[]
722e5c31af7Sopenharmony_ci
723e5c31af7Sopenharmony_citname:VkBufferCreateFlags is a bitmask type for setting a mask of zero or
724e5c31af7Sopenharmony_cimore elink:VkBufferCreateFlagBits.
725e5c31af7Sopenharmony_ci--
726e5c31af7Sopenharmony_ci
727e5c31af7Sopenharmony_ciifdef::VK_NV_dedicated_allocation[]
728e5c31af7Sopenharmony_ci[open,refpage='VkDedicatedAllocationBufferCreateInfoNV',desc='Specify that a buffer is bound to a dedicated memory resource',type='structs']
729e5c31af7Sopenharmony_ci--
730e5c31af7Sopenharmony_ciIf the pname:pNext chain includes a
731e5c31af7Sopenharmony_cisname:VkDedicatedAllocationBufferCreateInfoNV structure, then that structure
732e5c31af7Sopenharmony_ciincludes an enable controlling whether the buffer will have a dedicated
733e5c31af7Sopenharmony_cimemory allocation bound to it.
734e5c31af7Sopenharmony_ci
735e5c31af7Sopenharmony_ciThe sname:VkDedicatedAllocationBufferCreateInfoNV structure is defined as:
736e5c31af7Sopenharmony_ci
737e5c31af7Sopenharmony_ciinclude::{generated}/api/structs/VkDedicatedAllocationBufferCreateInfoNV.adoc[]
738e5c31af7Sopenharmony_ci
739e5c31af7Sopenharmony_ci  * pname:sType is a elink:VkStructureType value identifying this structure.
740e5c31af7Sopenharmony_ci  * pname:pNext is `NULL` or a pointer to a structure extending this
741e5c31af7Sopenharmony_ci    structure.
742e5c31af7Sopenharmony_ci  * pname:dedicatedAllocation specifies whether the buffer will have a
743e5c31af7Sopenharmony_ci    dedicated allocation bound to it.
744e5c31af7Sopenharmony_ci
745e5c31af7Sopenharmony_ciinclude::{generated}/validity/structs/VkDedicatedAllocationBufferCreateInfoNV.adoc[]
746e5c31af7Sopenharmony_ci--
747e5c31af7Sopenharmony_ciendif::VK_NV_dedicated_allocation[]
748e5c31af7Sopenharmony_ci
749e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_1,VK_KHR_external_memory[]
750e5c31af7Sopenharmony_ci[open,refpage='VkExternalMemoryBufferCreateInfo',desc='Specify that a buffer may be backed by external memory',type='structs']
751e5c31af7Sopenharmony_ci--
752e5c31af7Sopenharmony_ciTo define a set of external memory handle types that may: be used as backing
753e5c31af7Sopenharmony_cistore for a buffer, add a slink:VkExternalMemoryBufferCreateInfo structure
754e5c31af7Sopenharmony_cito the pname:pNext chain of the slink:VkBufferCreateInfo structure.
755e5c31af7Sopenharmony_ciThe sname:VkExternalMemoryBufferCreateInfo structure is defined as:
756e5c31af7Sopenharmony_ci
757e5c31af7Sopenharmony_ciinclude::{generated}/api/structs/VkExternalMemoryBufferCreateInfo.adoc[]
758e5c31af7Sopenharmony_ci
759e5c31af7Sopenharmony_ciifdef::VK_KHR_external_memory[]
760e5c31af7Sopenharmony_cior the equivalent
761e5c31af7Sopenharmony_ci
762e5c31af7Sopenharmony_ciinclude::{generated}/api/structs/VkExternalMemoryBufferCreateInfoKHR.adoc[]
763e5c31af7Sopenharmony_ciendif::VK_KHR_external_memory[]
764e5c31af7Sopenharmony_ci
765e5c31af7Sopenharmony_ci[NOTE]
766e5c31af7Sopenharmony_ci.Note
767e5c31af7Sopenharmony_ci====
768e5c31af7Sopenharmony_ciA sname:VkExternalMemoryBufferCreateInfo structure with a non-zero
769e5c31af7Sopenharmony_cipname:handleTypes field must be included in the creation parameters for a
770e5c31af7Sopenharmony_cibuffer that will be bound to memory that is either exported or imported.
771e5c31af7Sopenharmony_ci====
772e5c31af7Sopenharmony_ci
773e5c31af7Sopenharmony_ci  * pname:sType is a elink:VkStructureType value identifying this structure.
774e5c31af7Sopenharmony_ci  * pname:pNext is `NULL` or a pointer to a structure extending this
775e5c31af7Sopenharmony_ci    structure.
776e5c31af7Sopenharmony_ci  * pname:handleTypes is zero or a bitmask of
777e5c31af7Sopenharmony_ci    elink:VkExternalMemoryHandleTypeFlagBits specifying one or more external
778e5c31af7Sopenharmony_ci    memory handle types.
779e5c31af7Sopenharmony_ci
780e5c31af7Sopenharmony_ciinclude::{generated}/validity/structs/VkExternalMemoryBufferCreateInfo.adoc[]
781e5c31af7Sopenharmony_ci--
782e5c31af7Sopenharmony_ciendif::VK_VERSION_1_1,VK_KHR_external_memory[]
783e5c31af7Sopenharmony_ci
784e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_2,VK_KHR_buffer_device_address[]
785e5c31af7Sopenharmony_ci[open,refpage='VkBufferOpaqueCaptureAddressCreateInfo',desc='Request a specific address for a buffer',type='structs',alias='VkBufferOpaqueCaptureAddressCreateInfoKHR']
786e5c31af7Sopenharmony_ci--
787e5c31af7Sopenharmony_ciTo request a specific device address for a buffer, add a
788e5c31af7Sopenharmony_cislink:VkBufferOpaqueCaptureAddressCreateInfo structure to the pname:pNext
789e5c31af7Sopenharmony_cichain of the slink:VkBufferCreateInfo structure.
790e5c31af7Sopenharmony_ciThe sname:VkBufferOpaqueCaptureAddressCreateInfo structure is defined as:
791e5c31af7Sopenharmony_ci
792e5c31af7Sopenharmony_ciinclude::{generated}/api/structs/VkBufferOpaqueCaptureAddressCreateInfo.adoc[]
793e5c31af7Sopenharmony_ci
794e5c31af7Sopenharmony_ciifdef::VK_KHR_buffer_device_address[]
795e5c31af7Sopenharmony_cior the equivalent
796e5c31af7Sopenharmony_ci
797e5c31af7Sopenharmony_ciinclude::{generated}/api/structs/VkBufferOpaqueCaptureAddressCreateInfoKHR.adoc[]
798e5c31af7Sopenharmony_ciendif::VK_KHR_buffer_device_address[]
799e5c31af7Sopenharmony_ci
800e5c31af7Sopenharmony_ci  * pname:sType is a elink:VkStructureType value identifying this structure.
801e5c31af7Sopenharmony_ci  * pname:pNext is `NULL` or a pointer to a structure extending this
802e5c31af7Sopenharmony_ci    structure.
803e5c31af7Sopenharmony_ci  * pname:opaqueCaptureAddress is the opaque capture address requested for
804e5c31af7Sopenharmony_ci    the buffer.
805e5c31af7Sopenharmony_ci
806e5c31af7Sopenharmony_ciIf pname:opaqueCaptureAddress is zero, no specific address is requested.
807e5c31af7Sopenharmony_ci
808e5c31af7Sopenharmony_ciIf pname:opaqueCaptureAddress is not zero, then it should: be an address
809e5c31af7Sopenharmony_ciretrieved from flink:vkGetBufferOpaqueCaptureAddress for an identically
810e5c31af7Sopenharmony_cicreated buffer on the same implementation.
811e5c31af7Sopenharmony_ci
812e5c31af7Sopenharmony_ciIf this structure is not present, it is as if pname:opaqueCaptureAddress is
813e5c31af7Sopenharmony_cizero.
814e5c31af7Sopenharmony_ci
815e5c31af7Sopenharmony_ciApps should: avoid creating buffers with app-provided addresses and
816e5c31af7Sopenharmony_ciimplementation-provided addresses in the same process, to reduce the
817e5c31af7Sopenharmony_cilikelihood of ename:VK_ERROR_INVALID_OPAQUE_CAPTURE_ADDRESS errors.
818e5c31af7Sopenharmony_ci
819e5c31af7Sopenharmony_ci[NOTE]
820e5c31af7Sopenharmony_ci.Note
821e5c31af7Sopenharmony_ci====
822e5c31af7Sopenharmony_ciThe expected usage for this is that a trace capture/replay tool will add the
823e5c31af7Sopenharmony_ciename:VK_BUFFER_CREATE_DEVICE_ADDRESS_CAPTURE_REPLAY_BIT flag to all buffers
824e5c31af7Sopenharmony_cithat use ename:VK_BUFFER_USAGE_SHADER_DEVICE_ADDRESS_BIT, and during capture
825e5c31af7Sopenharmony_ciwill save the queried opaque device addresses in the trace.
826e5c31af7Sopenharmony_ciDuring replay, the buffers will be created specifying the original address
827e5c31af7Sopenharmony_ciso any address values stored in the trace data will remain valid.
828e5c31af7Sopenharmony_ci
829e5c31af7Sopenharmony_ciImplementations are expected to separate such buffers in the GPU address
830e5c31af7Sopenharmony_cispace so normal allocations will avoid using these addresses.
831e5c31af7Sopenharmony_ciApps/tools should avoid mixing app-provided and implementation-provided
832e5c31af7Sopenharmony_ciaddresses for buffers created with
833e5c31af7Sopenharmony_ciename:VK_BUFFER_CREATE_DEVICE_ADDRESS_CAPTURE_REPLAY_BIT, to avoid address
834e5c31af7Sopenharmony_cispace allocation conflicts.
835e5c31af7Sopenharmony_ci====
836e5c31af7Sopenharmony_ci
837e5c31af7Sopenharmony_ciinclude::{generated}/validity/structs/VkBufferOpaqueCaptureAddressCreateInfo.adoc[]
838e5c31af7Sopenharmony_ci--
839e5c31af7Sopenharmony_ciendif::VK_VERSION_1_2,VK_KHR_buffer_device_address[]
840e5c31af7Sopenharmony_ci
841e5c31af7Sopenharmony_ciifdef::VK_EXT_buffer_device_address[]
842e5c31af7Sopenharmony_ci[open,refpage='VkBufferDeviceAddressCreateInfoEXT',desc='Request a specific address for a buffer',type='structs']
843e5c31af7Sopenharmony_ci--
844e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_2,VK_KHR_buffer_device_address[]
845e5c31af7Sopenharmony_ciAlternatively, to
846e5c31af7Sopenharmony_ciendif::VK_VERSION_1_2,VK_KHR_buffer_device_address[]
847e5c31af7Sopenharmony_ciifndef::VK_VERSION_1_2,VK_KHR_buffer_device_address[]
848e5c31af7Sopenharmony_ciTo
849e5c31af7Sopenharmony_ciendif::VK_VERSION_1_2,VK_KHR_buffer_device_address[]
850e5c31af7Sopenharmony_cirequest a specific device address for a buffer, add a
851e5c31af7Sopenharmony_cislink:VkBufferDeviceAddressCreateInfoEXT structure to the pname:pNext chain
852e5c31af7Sopenharmony_ciof the slink:VkBufferCreateInfo structure.
853e5c31af7Sopenharmony_ciThe sname:VkBufferDeviceAddressCreateInfoEXT structure is defined as:
854e5c31af7Sopenharmony_ci
855e5c31af7Sopenharmony_ciinclude::{generated}/api/structs/VkBufferDeviceAddressCreateInfoEXT.adoc[]
856e5c31af7Sopenharmony_ci
857e5c31af7Sopenharmony_ci  * pname:sType is a elink:VkStructureType value identifying this structure.
858e5c31af7Sopenharmony_ci  * pname:pNext is `NULL` or a pointer to a structure extending this
859e5c31af7Sopenharmony_ci    structure.
860e5c31af7Sopenharmony_ci  * pname:deviceAddress is the device address requested for the buffer.
861e5c31af7Sopenharmony_ci
862e5c31af7Sopenharmony_ciIf pname:deviceAddress is zero, no specific address is requested.
863e5c31af7Sopenharmony_ci
864e5c31af7Sopenharmony_ciIf pname:deviceAddress is not zero, then it must: be an address retrieved
865e5c31af7Sopenharmony_cifrom an identically created buffer on the same implementation.
866e5c31af7Sopenharmony_ciThe buffer must: also be bound to an identically created
867e5c31af7Sopenharmony_cisname:VkDeviceMemory object.
868e5c31af7Sopenharmony_ci
869e5c31af7Sopenharmony_ciIf this structure is not present, it is as if pname:deviceAddress is zero.
870e5c31af7Sopenharmony_ci
871e5c31af7Sopenharmony_ciApps should: avoid creating buffers with app-provided addresses and
872e5c31af7Sopenharmony_ciimplementation-provided addresses in the same process, to reduce the
873e5c31af7Sopenharmony_cilikelihood of ename:VK_ERROR_INVALID_DEVICE_ADDRESS_EXT errors.
874e5c31af7Sopenharmony_ci
875e5c31af7Sopenharmony_ciinclude::{generated}/validity/structs/VkBufferDeviceAddressCreateInfoEXT.adoc[]
876e5c31af7Sopenharmony_ci--
877e5c31af7Sopenharmony_ciendif::VK_EXT_buffer_device_address[]
878e5c31af7Sopenharmony_ci
879e5c31af7Sopenharmony_ci
880e5c31af7Sopenharmony_ciifdef::VK_FUCHSIA_buffer_collection[]
881e5c31af7Sopenharmony_ci[open,refpage='VkBufferCollectionBufferCreateInfoFUCHSIA',desc='Create a VkBufferCollectionFUCHSIA-compatible VkBuffer',type='structs']
882e5c31af7Sopenharmony_ci--
883e5c31af7Sopenharmony_ciThe sname:VkBufferCollectionBufferCreateInfoFUCHSIA structure is defined as:
884e5c31af7Sopenharmony_ci
885e5c31af7Sopenharmony_ciinclude::{generated}/api/structs/VkBufferCollectionBufferCreateInfoFUCHSIA.adoc[]
886e5c31af7Sopenharmony_ci
887e5c31af7Sopenharmony_ci  * pname:sType is a elink:VkStructureType value identifying this structure.
888e5c31af7Sopenharmony_ci  * pname:pNext is `NULL` or a pointer to a structure extending this
889e5c31af7Sopenharmony_ci    structure
890e5c31af7Sopenharmony_ci  * pname:collection is the slink:VkBufferCollectionFUCHSIA handle
891e5c31af7Sopenharmony_ci  * pname:index is the index of the buffer in the buffer collection from
892e5c31af7Sopenharmony_ci    which the memory will be imported
893e5c31af7Sopenharmony_ci
894e5c31af7Sopenharmony_ci.Valid Usage
895e5c31af7Sopenharmony_ci****
896e5c31af7Sopenharmony_ci  * [[VUID-VkBufferCollectionBufferCreateInfoFUCHSIA-index-06388]]
897e5c31af7Sopenharmony_ci    pname:index must: be less than
898e5c31af7Sopenharmony_ci    slink:VkBufferCollectionPropertiesFUCHSIA::pname:bufferCount
899e5c31af7Sopenharmony_ci****
900e5c31af7Sopenharmony_ci
901e5c31af7Sopenharmony_ciinclude::{generated}/validity/structs/VkBufferCollectionBufferCreateInfoFUCHSIA.adoc[]
902e5c31af7Sopenharmony_ci--
903e5c31af7Sopenharmony_ciendif::VK_FUCHSIA_buffer_collection[]
904e5c31af7Sopenharmony_ci
905e5c31af7Sopenharmony_ci[open,refpage='vkDestroyBuffer',desc='Destroy a buffer object',type='protos']
906e5c31af7Sopenharmony_ci--
907e5c31af7Sopenharmony_ciTo destroy a buffer, call:
908e5c31af7Sopenharmony_ci
909e5c31af7Sopenharmony_ciinclude::{generated}/api/protos/vkDestroyBuffer.adoc[]
910e5c31af7Sopenharmony_ci
911e5c31af7Sopenharmony_ci  * pname:device is the logical device that destroys the buffer.
912e5c31af7Sopenharmony_ci  * pname:buffer is the buffer to destroy.
913e5c31af7Sopenharmony_ci  * pname:pAllocator controls host memory allocation as described in the
914e5c31af7Sopenharmony_ci    <<memory-allocation, Memory Allocation>> chapter.
915e5c31af7Sopenharmony_ci
916e5c31af7Sopenharmony_ci.Valid Usage
917e5c31af7Sopenharmony_ci****
918e5c31af7Sopenharmony_ci  * [[VUID-vkDestroyBuffer-buffer-00922]]
919e5c31af7Sopenharmony_ci    All submitted commands that refer to pname:buffer, either directly or
920e5c31af7Sopenharmony_ci    via a sname:VkBufferView, must: have completed execution
921e5c31af7Sopenharmony_ciifndef::VKSC_VERSION_1_0[]
922e5c31af7Sopenharmony_ci  * [[VUID-vkDestroyBuffer-buffer-00923]]
923e5c31af7Sopenharmony_ci    If sname:VkAllocationCallbacks were provided when pname:buffer was
924e5c31af7Sopenharmony_ci    created, a compatible set of callbacks must: be provided here
925e5c31af7Sopenharmony_ci  * [[VUID-vkDestroyBuffer-buffer-00924]]
926e5c31af7Sopenharmony_ci    If no sname:VkAllocationCallbacks were provided when pname:buffer was
927e5c31af7Sopenharmony_ci    created, pname:pAllocator must: be `NULL`
928e5c31af7Sopenharmony_ciendif::VKSC_VERSION_1_0[]
929e5c31af7Sopenharmony_ci****
930e5c31af7Sopenharmony_ci
931e5c31af7Sopenharmony_ciinclude::{generated}/validity/protos/vkDestroyBuffer.adoc[]
932e5c31af7Sopenharmony_ci--
933e5c31af7Sopenharmony_ci
934e5c31af7Sopenharmony_ci
935e5c31af7Sopenharmony_ci[[resources-buffer-views]]
936e5c31af7Sopenharmony_ci== Buffer Views
937e5c31af7Sopenharmony_ci
938e5c31af7Sopenharmony_ci[open,refpage='VkBufferView',desc='Opaque handle to a buffer view object',type='handles']
939e5c31af7Sopenharmony_ci--
940e5c31af7Sopenharmony_ciA _buffer view_ represents a contiguous range of a buffer and a specific
941e5c31af7Sopenharmony_ciformat to be used to interpret the data.
942e5c31af7Sopenharmony_ciBuffer views are used to enable shaders to access buffer contents using
943e5c31af7Sopenharmony_ci<<textures,image operations>>.
944e5c31af7Sopenharmony_ciIn order to create a valid buffer view, the buffer must: have been created
945e5c31af7Sopenharmony_ciwith at least one of the following usage flags:
946e5c31af7Sopenharmony_ci
947e5c31af7Sopenharmony_ci  * ename:VK_BUFFER_USAGE_UNIFORM_TEXEL_BUFFER_BIT
948e5c31af7Sopenharmony_ci  * ename:VK_BUFFER_USAGE_STORAGE_TEXEL_BUFFER_BIT
949e5c31af7Sopenharmony_ci
950e5c31af7Sopenharmony_ciBuffer views are represented by sname:VkBufferView handles:
951e5c31af7Sopenharmony_ci
952e5c31af7Sopenharmony_ciinclude::{generated}/api/handles/VkBufferView.adoc[]
953e5c31af7Sopenharmony_ci--
954e5c31af7Sopenharmony_ci
955e5c31af7Sopenharmony_ci[open,refpage='vkCreateBufferView',desc='Create a new buffer view object',type='protos']
956e5c31af7Sopenharmony_ci--
957e5c31af7Sopenharmony_ci:refpage: vkCreateBufferView
958e5c31af7Sopenharmony_ci:objectnameplural: buffer views
959e5c31af7Sopenharmony_ci:objectnamecamelcase: bufferView
960e5c31af7Sopenharmony_ci:objectcount: 1
961e5c31af7Sopenharmony_ci
962e5c31af7Sopenharmony_ciTo create a buffer view, call:
963e5c31af7Sopenharmony_ci
964e5c31af7Sopenharmony_ciinclude::{generated}/api/protos/vkCreateBufferView.adoc[]
965e5c31af7Sopenharmony_ci
966e5c31af7Sopenharmony_ci  * pname:device is the logical device that creates the buffer view.
967e5c31af7Sopenharmony_ci  * pname:pCreateInfo is a pointer to a slink:VkBufferViewCreateInfo
968e5c31af7Sopenharmony_ci    structure containing parameters to be used to create the buffer view.
969e5c31af7Sopenharmony_ci  * pname:pAllocator controls host memory allocation as described in the
970e5c31af7Sopenharmony_ci    <<memory-allocation, Memory Allocation>> chapter.
971e5c31af7Sopenharmony_ci  * pname:pView is a pointer to a slink:VkBufferView handle in which the
972e5c31af7Sopenharmony_ci    resulting buffer view object is returned.
973e5c31af7Sopenharmony_ci
974e5c31af7Sopenharmony_ciinclude::{chapters}/commonvalidity/no_dynamic_allocations_common.adoc[]
975e5c31af7Sopenharmony_ci
976e5c31af7Sopenharmony_ciifdef::VKSC_VERSION_1_0[]
977e5c31af7Sopenharmony_ci.Valid Usage
978e5c31af7Sopenharmony_ci****
979e5c31af7Sopenharmony_ciinclude::{chapters}/commonvalidity/memory_reservation_request_count_common.adoc[]
980e5c31af7Sopenharmony_ci****
981e5c31af7Sopenharmony_ciendif::VKSC_VERSION_1_0[]
982e5c31af7Sopenharmony_ci
983e5c31af7Sopenharmony_ciinclude::{generated}/validity/protos/vkCreateBufferView.adoc[]
984e5c31af7Sopenharmony_ci--
985e5c31af7Sopenharmony_ci
986e5c31af7Sopenharmony_ci[open,refpage='VkBufferViewCreateInfo',desc='Structure specifying parameters of a newly created buffer view',type='structs']
987e5c31af7Sopenharmony_ci--
988e5c31af7Sopenharmony_ciThe sname:VkBufferViewCreateInfo structure is defined as:
989e5c31af7Sopenharmony_ci
990e5c31af7Sopenharmony_ciinclude::{generated}/api/structs/VkBufferViewCreateInfo.adoc[]
991e5c31af7Sopenharmony_ci
992e5c31af7Sopenharmony_ci  * pname:sType is a elink:VkStructureType value identifying this structure.
993e5c31af7Sopenharmony_ci  * pname:pNext is `NULL` or a pointer to a structure extending this
994e5c31af7Sopenharmony_ci    structure.
995e5c31af7Sopenharmony_ci  * pname:flags is reserved for future use.
996e5c31af7Sopenharmony_ci  * pname:buffer is a slink:VkBuffer on which the view will be created.
997e5c31af7Sopenharmony_ci  * pname:format is a elink:VkFormat describing the format of the data
998e5c31af7Sopenharmony_ci    elements in the buffer.
999e5c31af7Sopenharmony_ci  * pname:offset is an offset in bytes from the base address of the buffer.
1000e5c31af7Sopenharmony_ci    Accesses to the buffer view from shaders use addressing that is relative
1001e5c31af7Sopenharmony_ci    to this starting offset.
1002e5c31af7Sopenharmony_ci  * pname:range is a size in bytes of the buffer view.
1003e5c31af7Sopenharmony_ci    If pname:range is equal to ename:VK_WHOLE_SIZE, the range from
1004e5c31af7Sopenharmony_ci    pname:offset to the end of the buffer is used.
1005e5c31af7Sopenharmony_ci    If ename:VK_WHOLE_SIZE is used and the remaining size of the buffer is
1006e5c31af7Sopenharmony_ci    not a multiple of the <<texel-block-size, texel block size>> of
1007e5c31af7Sopenharmony_ci    pname:format, the nearest smaller multiple is used.
1008e5c31af7Sopenharmony_ci
1009e5c31af7Sopenharmony_ci[[resources-buffer-views-usage]]
1010e5c31af7Sopenharmony_ciThe buffer view has a _buffer view usage_ identifying which descriptor types
1011e5c31af7Sopenharmony_cican be created from it.
1012e5c31af7Sopenharmony_ciThis usage
1013e5c31af7Sopenharmony_ciifdef::VK_KHR_maintenance5[]
1014e5c31af7Sopenharmony_cican: be defined by including the slink:VkBufferUsageFlags2CreateInfoKHR
1015e5c31af7Sopenharmony_cistructure in the pname:pNext chain, and specifying the pname:usage value
1016e5c31af7Sopenharmony_cithere.
1017e5c31af7Sopenharmony_ciIf this structure is not included, it
1018e5c31af7Sopenharmony_ciendif::VK_KHR_maintenance5[]
1019e5c31af7Sopenharmony_ciis equal to the slink:VkBufferCreateInfo::pname:usage value used to create
1020e5c31af7Sopenharmony_cipname:buffer.
1021e5c31af7Sopenharmony_ci
1022e5c31af7Sopenharmony_ci.Valid Usage
1023e5c31af7Sopenharmony_ci****
1024e5c31af7Sopenharmony_ci  * [[VUID-VkBufferViewCreateInfo-offset-00925]]
1025e5c31af7Sopenharmony_ci    pname:offset must: be less than the size of pname:buffer
1026e5c31af7Sopenharmony_ci  * [[VUID-VkBufferViewCreateInfo-range-00928]]
1027e5c31af7Sopenharmony_ci    If pname:range is not equal to ename:VK_WHOLE_SIZE, pname:range must: be
1028e5c31af7Sopenharmony_ci    greater than `0`
1029e5c31af7Sopenharmony_ci  * [[VUID-VkBufferViewCreateInfo-range-00929]]
1030e5c31af7Sopenharmony_ci    If pname:range is not equal to ename:VK_WHOLE_SIZE, pname:range must: be
1031e5c31af7Sopenharmony_ci    an integer multiple of the texel block size of pname:format
1032e5c31af7Sopenharmony_ci  * [[VUID-VkBufferViewCreateInfo-range-00930]]
1033e5c31af7Sopenharmony_ci    If pname:range is not equal to ename:VK_WHOLE_SIZE, the number of texel
1034e5c31af7Sopenharmony_ci    buffer elements given by [eq]#({lfloor}pname:range / (texel block
1035e5c31af7Sopenharmony_ci    size){rfloor} {times} (texels per block))# where texel block size and
1036e5c31af7Sopenharmony_ci    texels per block are as defined in the <<formats-compatibility,
1037e5c31af7Sopenharmony_ci    Compatible Formats>> table for pname:format, must: be less than or equal
1038e5c31af7Sopenharmony_ci    to sname:VkPhysicalDeviceLimits::pname:maxTexelBufferElements
1039e5c31af7Sopenharmony_ci  * [[VUID-VkBufferViewCreateInfo-offset-00931]]
1040e5c31af7Sopenharmony_ci    If pname:range is not equal to ename:VK_WHOLE_SIZE, the sum of
1041e5c31af7Sopenharmony_ci    pname:offset and pname:range must: be less than or equal to the size of
1042e5c31af7Sopenharmony_ci    pname:buffer
1043e5c31af7Sopenharmony_ci  * [[VUID-VkBufferViewCreateInfo-range-04059]]
1044e5c31af7Sopenharmony_ci    If pname:range is equal to ename:VK_WHOLE_SIZE, the number of texel
1045e5c31af7Sopenharmony_ci    buffer elements given by [eq]#({lfloor}(size - pname:offset) / (texel
1046e5c31af7Sopenharmony_ci    block size){rfloor} {times} (texels per block))# where size is the size
1047e5c31af7Sopenharmony_ci    of pname:buffer, and texel block size and texels per block are as
1048e5c31af7Sopenharmony_ci    defined in the <<formats-compatibility, Compatible Formats>> table for
1049e5c31af7Sopenharmony_ci    pname:format, must: be less than or equal to
1050e5c31af7Sopenharmony_ci    sname:VkPhysicalDeviceLimits::pname:maxTexelBufferElements
1051e5c31af7Sopenharmony_ci  * [[VUID-VkBufferViewCreateInfo-buffer-00932]]
1052e5c31af7Sopenharmony_ci    pname:buffer must: have been created with a pname:usage value containing
1053e5c31af7Sopenharmony_ci    at least one of ename:VK_BUFFER_USAGE_UNIFORM_TEXEL_BUFFER_BIT or
1054e5c31af7Sopenharmony_ci    ename:VK_BUFFER_USAGE_STORAGE_TEXEL_BUFFER_BIT
1055e5c31af7Sopenharmony_ci  * [[VUID-VkBufferViewCreateInfo-format-08778]]
1056e5c31af7Sopenharmony_ci    If the <<resources-buffer-views-usage, buffer view usage>> contains
1057e5c31af7Sopenharmony_ci    ename:VK_BUFFER_USAGE_UNIFORM_TEXEL_BUFFER_BIT, then
1058e5c31af7Sopenharmony_ci    <<resources-buffer-view-format-features,format features>> of
1059e5c31af7Sopenharmony_ci    pname:format must: contain
1060e5c31af7Sopenharmony_ci    ename:VK_FORMAT_FEATURE_UNIFORM_TEXEL_BUFFER_BIT
1061e5c31af7Sopenharmony_ci  * [[VUID-VkBufferViewCreateInfo-format-08779]]
1062e5c31af7Sopenharmony_ci    If the <<resources-buffer-views-usage, buffer view usage>> contains
1063e5c31af7Sopenharmony_ci    ename:VK_BUFFER_USAGE_STORAGE_TEXEL_BUFFER_BIT, then
1064e5c31af7Sopenharmony_ci    <<resources-buffer-view-format-features,format features>> of
1065e5c31af7Sopenharmony_ci    pname:format must: contain
1066e5c31af7Sopenharmony_ci    ename:VK_FORMAT_FEATURE_STORAGE_TEXEL_BUFFER_BIT
1067e5c31af7Sopenharmony_ci  * [[VUID-VkBufferViewCreateInfo-buffer-00935]]
1068e5c31af7Sopenharmony_ci    If pname:buffer is non-sparse then it must: be bound completely and
1069e5c31af7Sopenharmony_ci    contiguously to a single sname:VkDeviceMemory object
1070e5c31af7Sopenharmony_ci  * [[VUID-VkBufferViewCreateInfo-offset-02749]]
1071e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_3,VK_EXT_texel_buffer_alignment[]
1072e5c31af7Sopenharmony_ci    If the <<features-texelBufferAlignment, pname:texelBufferAlignment>>
1073e5c31af7Sopenharmony_ci    feature is not enabled,
1074e5c31af7Sopenharmony_ciendif::VK_VERSION_1_3,VK_EXT_texel_buffer_alignment[]
1075e5c31af7Sopenharmony_ci    pname:offset must: be a multiple of
1076e5c31af7Sopenharmony_ci    sname:VkPhysicalDeviceLimits::pname:minTexelBufferOffsetAlignment
1077e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_3,VK_EXT_texel_buffer_alignment[]
1078e5c31af7Sopenharmony_ci  * [[VUID-VkBufferViewCreateInfo-buffer-02750]]
1079e5c31af7Sopenharmony_ci    If the <<features-texelBufferAlignment, pname:texelBufferAlignment>>
1080e5c31af7Sopenharmony_ci    feature is enabled and if pname:buffer was created with pname:usage
1081e5c31af7Sopenharmony_ci    containing ename:VK_BUFFER_USAGE_STORAGE_TEXEL_BUFFER_BIT, pname:offset
1082e5c31af7Sopenharmony_ci    must: be a multiple of the lesser of
1083e5c31af7Sopenharmony_ci    slink:VkPhysicalDeviceTexelBufferAlignmentProperties::pname:storageTexelBufferOffsetAlignmentBytes
1084e5c31af7Sopenharmony_ci    or, if
1085e5c31af7Sopenharmony_ci    slink:VkPhysicalDeviceTexelBufferAlignmentProperties::pname:storageTexelBufferOffsetSingleTexelAlignment
1086e5c31af7Sopenharmony_ci    is ename:VK_TRUE, the size of a texel of the requested pname:format.
1087e5c31af7Sopenharmony_ci    If the size of a texel is a multiple of three bytes, then the size of a
1088e5c31af7Sopenharmony_ci    single component of pname:format is used instead
1089e5c31af7Sopenharmony_ci  * [[VUID-VkBufferViewCreateInfo-buffer-02751]]
1090e5c31af7Sopenharmony_ci    If the <<features-texelBufferAlignment, pname:texelBufferAlignment>>
1091e5c31af7Sopenharmony_ci    feature is enabled and if pname:buffer was created with pname:usage
1092e5c31af7Sopenharmony_ci    containing ename:VK_BUFFER_USAGE_UNIFORM_TEXEL_BUFFER_BIT, pname:offset
1093e5c31af7Sopenharmony_ci    must: be a multiple of the lesser of
1094e5c31af7Sopenharmony_ci    slink:VkPhysicalDeviceTexelBufferAlignmentProperties::pname:uniformTexelBufferOffsetAlignmentBytes
1095e5c31af7Sopenharmony_ci    or, if
1096e5c31af7Sopenharmony_ci    slink:VkPhysicalDeviceTexelBufferAlignmentProperties::pname:uniformTexelBufferOffsetSingleTexelAlignment
1097e5c31af7Sopenharmony_ci    is ename:VK_TRUE, the size of a texel of the requested pname:format.
1098e5c31af7Sopenharmony_ci    If the size of a texel is a multiple of three bytes, then the size of a
1099e5c31af7Sopenharmony_ci    single component of pname:format is used instead
1100e5c31af7Sopenharmony_ciendif::VK_VERSION_1_3,VK_EXT_texel_buffer_alignment[]
1101e5c31af7Sopenharmony_ciifdef::VK_EXT_metal_objects[]
1102e5c31af7Sopenharmony_ci  * [[VUID-VkBufferViewCreateInfo-pNext-06782]]
1103e5c31af7Sopenharmony_ci    If the pname:pNext chain includes a
1104e5c31af7Sopenharmony_ci    slink:VkExportMetalObjectCreateInfoEXT structure, its
1105e5c31af7Sopenharmony_ci    pname:exportObjectType member must: be
1106e5c31af7Sopenharmony_ci    ename:VK_EXPORT_METAL_OBJECT_TYPE_METAL_TEXTURE_BIT_EXT
1107e5c31af7Sopenharmony_ciendif::VK_EXT_metal_objects[]
1108e5c31af7Sopenharmony_ciifdef::VK_KHR_maintenance5[]
1109e5c31af7Sopenharmony_ci  * [[VUID-VkBufferViewCreateInfo-pNext-08780]]
1110e5c31af7Sopenharmony_ci    If the pname:pNext chain includes a
1111e5c31af7Sopenharmony_ci    slink:VkBufferUsageFlags2CreateInfoKHR, its pname:usage must: not
1112e5c31af7Sopenharmony_ci    contain any other bit than
1113e5c31af7Sopenharmony_ci    ename:VK_BUFFER_USAGE_2_UNIFORM_TEXEL_BUFFER_BIT_KHR or
1114e5c31af7Sopenharmony_ci    ename:VK_BUFFER_USAGE_2_STORAGE_TEXEL_BUFFER_BIT_KHR
1115e5c31af7Sopenharmony_ci  * [[VUID-VkBufferViewCreateInfo-pNext-08781]]
1116e5c31af7Sopenharmony_ci    If the pname:pNext chain includes a
1117e5c31af7Sopenharmony_ci    slink:VkBufferUsageFlags2CreateInfoKHR, its pname:usage must: be a
1118e5c31af7Sopenharmony_ci    subset of the slink:VkBufferCreateInfo::pname:usage specified or
1119e5c31af7Sopenharmony_ci    slink:VkBufferUsageFlags2CreateInfoKHR::pname:usage from
1120e5c31af7Sopenharmony_ci    slink:VkBufferCreateInfo::pname:pNext when creating pname:buffer
1121e5c31af7Sopenharmony_ciendif::VK_KHR_maintenance5[]
1122e5c31af7Sopenharmony_ci****
1123e5c31af7Sopenharmony_ci
1124e5c31af7Sopenharmony_ciinclude::{generated}/validity/structs/VkBufferViewCreateInfo.adoc[]
1125e5c31af7Sopenharmony_ci--
1126e5c31af7Sopenharmony_ci
1127e5c31af7Sopenharmony_ci[open,refpage='VkBufferViewCreateFlags',desc='Reserved for future use',type='flags']
1128e5c31af7Sopenharmony_ci--
1129e5c31af7Sopenharmony_ciinclude::{generated}/api/flags/VkBufferViewCreateFlags.adoc[]
1130e5c31af7Sopenharmony_ci
1131e5c31af7Sopenharmony_citname:VkBufferViewCreateFlags is a bitmask type for setting a mask, but is
1132e5c31af7Sopenharmony_cicurrently reserved for future use.
1133e5c31af7Sopenharmony_ci--
1134e5c31af7Sopenharmony_ci
1135e5c31af7Sopenharmony_ci[open,refpage='vkDestroyBufferView',desc='Destroy a buffer view object',type='protos']
1136e5c31af7Sopenharmony_ci--
1137e5c31af7Sopenharmony_ciTo destroy a buffer view, call:
1138e5c31af7Sopenharmony_ci
1139e5c31af7Sopenharmony_ciinclude::{generated}/api/protos/vkDestroyBufferView.adoc[]
1140e5c31af7Sopenharmony_ci
1141e5c31af7Sopenharmony_ci  * pname:device is the logical device that destroys the buffer view.
1142e5c31af7Sopenharmony_ci  * pname:bufferView is the buffer view to destroy.
1143e5c31af7Sopenharmony_ci  * pname:pAllocator controls host memory allocation as described in the
1144e5c31af7Sopenharmony_ci    <<memory-allocation, Memory Allocation>> chapter.
1145e5c31af7Sopenharmony_ci
1146e5c31af7Sopenharmony_ci.Valid Usage
1147e5c31af7Sopenharmony_ci****
1148e5c31af7Sopenharmony_ci  * [[VUID-vkDestroyBufferView-bufferView-00936]]
1149e5c31af7Sopenharmony_ci    All submitted commands that refer to pname:bufferView must: have
1150e5c31af7Sopenharmony_ci    completed execution
1151e5c31af7Sopenharmony_ciifndef::VKSC_VERSION_1_0[]
1152e5c31af7Sopenharmony_ci  * [[VUID-vkDestroyBufferView-bufferView-00937]]
1153e5c31af7Sopenharmony_ci    If sname:VkAllocationCallbacks were provided when pname:bufferView was
1154e5c31af7Sopenharmony_ci    created, a compatible set of callbacks must: be provided here
1155e5c31af7Sopenharmony_ci  * [[VUID-vkDestroyBufferView-bufferView-00938]]
1156e5c31af7Sopenharmony_ci    If no sname:VkAllocationCallbacks were provided when pname:bufferView
1157e5c31af7Sopenharmony_ci    was created, pname:pAllocator must: be `NULL`
1158e5c31af7Sopenharmony_ciendif::VKSC_VERSION_1_0[]
1159e5c31af7Sopenharmony_ci****
1160e5c31af7Sopenharmony_ci
1161e5c31af7Sopenharmony_ciinclude::{generated}/validity/protos/vkDestroyBufferView.adoc[]
1162e5c31af7Sopenharmony_ci--
1163e5c31af7Sopenharmony_ci
1164e5c31af7Sopenharmony_ci[[resources-buffer-view-format-features]]
1165e5c31af7Sopenharmony_ci=== Buffer View Format Features
1166e5c31af7Sopenharmony_ci
1167e5c31af7Sopenharmony_ciValid uses of a slink:VkBufferView may: depend on the buffer view's _format
1168e5c31af7Sopenharmony_cifeatures_, defined below.
1169e5c31af7Sopenharmony_ciSuch constraints are documented in the affected valid usage statement.
1170e5c31af7Sopenharmony_ci
1171e5c31af7Sopenharmony_ciifndef::VK_VERSION_1_3,VK_KHR_format_feature_flags2[]
1172e5c31af7Sopenharmony_ci  * The buffer view's set of _format features_ is the value of
1173e5c31af7Sopenharmony_ci    slink:VkFormatProperties::pname:bufferFeatures found by calling
1174e5c31af7Sopenharmony_ci    flink:vkGetPhysicalDeviceFormatProperties on the same pname:format as
1175e5c31af7Sopenharmony_ci    slink:VkBufferViewCreateInfo::pname:format.
1176e5c31af7Sopenharmony_ciendif::VK_VERSION_1_3,VK_KHR_format_feature_flags2[]
1177e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_3,VK_KHR_format_feature_flags2[]
1178e5c31af7Sopenharmony_ci  * If Vulkan 1.3 is supported or the `apiext:VK_KHR_format_feature_flags2`
1179e5c31af7Sopenharmony_ci    extension is supported, then the buffer view's set of _format features_
1180e5c31af7Sopenharmony_ci    is the value of slink:VkFormatProperties3::pname:bufferFeatures found by
1181e5c31af7Sopenharmony_ci    calling flink:vkGetPhysicalDeviceFormatProperties2 on the same
1182e5c31af7Sopenharmony_ci    pname:format as slink:VkBufferViewCreateInfo::pname:format.
1183e5c31af7Sopenharmony_ciendif::VK_VERSION_1_3,VK_KHR_format_feature_flags2[]
1184e5c31af7Sopenharmony_ci
1185e5c31af7Sopenharmony_ci[[resources-images]]
1186e5c31af7Sopenharmony_ci== Images
1187e5c31af7Sopenharmony_ci
1188e5c31af7Sopenharmony_ci[open,refpage='VkImage',desc='Opaque handle to an image object',type='handles']
1189e5c31af7Sopenharmony_ci--
1190e5c31af7Sopenharmony_ciImages represent multidimensional - up to 3 - arrays of data which can: be
1191e5c31af7Sopenharmony_ciused for various purposes (e.g. attachments, textures), by binding them to a
1192e5c31af7Sopenharmony_cigraphics or compute pipeline via descriptor sets, or by directly specifying
1193e5c31af7Sopenharmony_cithem as parameters to certain commands.
1194e5c31af7Sopenharmony_ci
1195e5c31af7Sopenharmony_ciImages are represented by sname:VkImage handles:
1196e5c31af7Sopenharmony_ci
1197e5c31af7Sopenharmony_ciinclude::{generated}/api/handles/VkImage.adoc[]
1198e5c31af7Sopenharmony_ci--
1199e5c31af7Sopenharmony_ci
1200e5c31af7Sopenharmony_ci[open,refpage='vkCreateImage',desc='Create a new image object',type='protos']
1201e5c31af7Sopenharmony_ci--
1202e5c31af7Sopenharmony_ci:refpage: vkCreateImage
1203e5c31af7Sopenharmony_ci:objectnameplural: images
1204e5c31af7Sopenharmony_ci:objectnamecamelcase: image
1205e5c31af7Sopenharmony_ci:objectcount: 1
1206e5c31af7Sopenharmony_ci
1207e5c31af7Sopenharmony_ciTo create images, call:
1208e5c31af7Sopenharmony_ci
1209e5c31af7Sopenharmony_ciinclude::{generated}/api/protos/vkCreateImage.adoc[]
1210e5c31af7Sopenharmony_ci
1211e5c31af7Sopenharmony_ci  * pname:device is the logical device that creates the image.
1212e5c31af7Sopenharmony_ci  * pname:pCreateInfo is a pointer to a slink:VkImageCreateInfo structure
1213e5c31af7Sopenharmony_ci    containing parameters to be used to create the image.
1214e5c31af7Sopenharmony_ci  * pname:pAllocator controls host memory allocation as described in the
1215e5c31af7Sopenharmony_ci    <<memory-allocation, Memory Allocation>> chapter.
1216e5c31af7Sopenharmony_ci  * pname:pImage is a pointer to a slink:VkImage handle in which the
1217e5c31af7Sopenharmony_ci    resulting image object is returned.
1218e5c31af7Sopenharmony_ci
1219e5c31af7Sopenharmony_ciinclude::{chapters}/commonvalidity/no_dynamic_allocations_common.adoc[]
1220e5c31af7Sopenharmony_ci
1221e5c31af7Sopenharmony_ci.Valid Usage
1222e5c31af7Sopenharmony_ci****
1223e5c31af7Sopenharmony_ciifndef::VKSC_VERSION_1_0[]
1224e5c31af7Sopenharmony_ci  * [[VUID-vkCreateImage-flags-00939]]
1225e5c31af7Sopenharmony_ci    If the pname:flags member of pname:pCreateInfo includes
1226e5c31af7Sopenharmony_ci    ename:VK_IMAGE_CREATE_SPARSE_BINDING_BIT,
1227e5c31af7Sopenharmony_ciifdef::VK_NV_extended_sparse_address_space[]
1228e5c31af7Sopenharmony_ci    and the <<features-extendedSparseAddressSpace,
1229e5c31af7Sopenharmony_ci    pname:extendedSparseAddressSpace>> feature is not enabled,
1230e5c31af7Sopenharmony_ciendif::VK_NV_extended_sparse_address_space[]
1231e5c31af7Sopenharmony_ci    creating this sname:VkImage must: not cause the total required sparse
1232e5c31af7Sopenharmony_ci    memory for all currently valid sparse resources on the device to exceed
1233e5c31af7Sopenharmony_ci    sname:VkPhysicalDeviceLimits::pname:sparseAddressSpaceSize
1234e5c31af7Sopenharmony_ciifdef::VK_NV_extended_sparse_address_space[]
1235e5c31af7Sopenharmony_ci  * [[VUID-vkCreateImage-flags-09385]]
1236e5c31af7Sopenharmony_ci    If the pname:flags member of pname:pCreateInfo includes
1237e5c31af7Sopenharmony_ci    ename:VK_IMAGE_CREATE_SPARSE_BINDING_BIT, the
1238e5c31af7Sopenharmony_ci    <<features-extendedSparseAddressSpace,
1239e5c31af7Sopenharmony_ci    pname:extendedSparseAddressSpace>> feature is enabled, and the
1240e5c31af7Sopenharmony_ci    pname:usage member of pname:pCreateInfo contains bits not in
1241e5c31af7Sopenharmony_ci    sname:VkPhysicalDeviceExtendedSparseAddressSpacePropertiesNV::pname:extendedSparseImageUsageFlags,
1242e5c31af7Sopenharmony_ci    creating this sname:VkImage must: not cause the total required sparse
1243e5c31af7Sopenharmony_ci    memory for all currently valid sparse resources on the device, excluding
1244e5c31af7Sopenharmony_ci    sname:VkBuffer created with pname:usage member of pname:pCreateInfo
1245e5c31af7Sopenharmony_ci    containing bits in
1246e5c31af7Sopenharmony_ci    sname:VkPhysicalDeviceExtendedSparseAddressSpacePropertiesNV::pname:extendedSparseBufferUsageFlags
1247e5c31af7Sopenharmony_ci    and sname:VkImage created with pname:usage member of pname:pCreateInfo
1248e5c31af7Sopenharmony_ci    containing bits in
1249e5c31af7Sopenharmony_ci    sname:VkPhysicalDeviceExtendedSparseAddressSpacePropertiesNV::pname:extendedSparseImageUsageFlags,
1250e5c31af7Sopenharmony_ci    to exceed sname:VkPhysicalDeviceLimits::pname:sparseAddressSpaceSize
1251e5c31af7Sopenharmony_ci  * [[VUID-vkCreateImage-flags-09386]]
1252e5c31af7Sopenharmony_ci    If the pname:flags member of pname:pCreateInfo includes
1253e5c31af7Sopenharmony_ci    ename:VK_IMAGE_CREATE_SPARSE_BINDING_BIT and the
1254e5c31af7Sopenharmony_ci    <<features-extendedSparseAddressSpace,
1255e5c31af7Sopenharmony_ci    pname:extendedSparseAddressSpace>> feature is enabled, creating this
1256e5c31af7Sopenharmony_ci    sname:VkImage must: not cause the total required sparse memory for all
1257e5c31af7Sopenharmony_ci    currently valid sparse resources on the device to exceed
1258e5c31af7Sopenharmony_ci    sname:VkPhysicalDeviceExtendedSparseAddressSpacePropertiesNV::pname:extendedSparseAddressSpaceSize
1259e5c31af7Sopenharmony_ciendif::VK_NV_extended_sparse_address_space[]
1260e5c31af7Sopenharmony_ciendif::VKSC_VERSION_1_0[]
1261e5c31af7Sopenharmony_ciinclude::{chapters}/commonvalidity/memory_reservation_request_count_common.adoc[]
1262e5c31af7Sopenharmony_ciifdef::VK_FUCHSIA_buffer_collection[]
1263e5c31af7Sopenharmony_ci  * [[VUID-vkCreateImage-pNext-06389]]
1264e5c31af7Sopenharmony_ci    If a slink:VkBufferCollectionImageCreateInfoFUCHSIA has been chained to
1265e5c31af7Sopenharmony_ci    pname:pNext, pname:pCreateInfo must: match the
1266e5c31af7Sopenharmony_ci    <<sysmem-chosen-create-infos,Sysmem chosen sname:VkImageCreateInfo>>
1267e5c31af7Sopenharmony_ci    excepting members slink:VkImageCreateInfo::pname:extent and
1268e5c31af7Sopenharmony_ci    slink:VkImageCreateInfo::pname:usage in the match criteria
1269e5c31af7Sopenharmony_ciendif::VK_FUCHSIA_buffer_collection[]
1270e5c31af7Sopenharmony_ci****
1271e5c31af7Sopenharmony_ci
1272e5c31af7Sopenharmony_ciinclude::{generated}/validity/protos/vkCreateImage.adoc[]
1273e5c31af7Sopenharmony_ci--
1274e5c31af7Sopenharmony_ci
1275e5c31af7Sopenharmony_ci[open,refpage='VkImageCreateInfo',desc='Structure specifying the parameters of a newly created image object',type='structs']
1276e5c31af7Sopenharmony_ci--
1277e5c31af7Sopenharmony_ciThe sname:VkImageCreateInfo structure is defined as:
1278e5c31af7Sopenharmony_ci
1279e5c31af7Sopenharmony_ciinclude::{generated}/api/structs/VkImageCreateInfo.adoc[]
1280e5c31af7Sopenharmony_ci
1281e5c31af7Sopenharmony_ci  * pname:sType is a elink:VkStructureType value identifying this structure.
1282e5c31af7Sopenharmony_ci  * pname:pNext is `NULL` or a pointer to a structure extending this
1283e5c31af7Sopenharmony_ci    structure.
1284e5c31af7Sopenharmony_ci  * pname:flags is a bitmask of elink:VkImageCreateFlagBits describing
1285e5c31af7Sopenharmony_ci    additional parameters of the image.
1286e5c31af7Sopenharmony_ci  * pname:imageType is a elink:VkImageType value specifying the basic
1287e5c31af7Sopenharmony_ci    dimensionality of the image.
1288e5c31af7Sopenharmony_ci    Layers in array textures do not count as a dimension for the purposes of
1289e5c31af7Sopenharmony_ci    the image type.
1290e5c31af7Sopenharmony_ci  * pname:format is a elink:VkFormat describing the format and type of the
1291e5c31af7Sopenharmony_ci    texel blocks that will be contained in the image.
1292e5c31af7Sopenharmony_ci  * pname:extent is a slink:VkExtent3D describing the number of data
1293e5c31af7Sopenharmony_ci    elements in each dimension of the base level.
1294e5c31af7Sopenharmony_ci  * pname:mipLevels describes the number of levels of detail available for
1295e5c31af7Sopenharmony_ci    minified sampling of the image.
1296e5c31af7Sopenharmony_ci  * pname:arrayLayers is the number of layers in the image.
1297e5c31af7Sopenharmony_ci  * pname:samples is a elink:VkSampleCountFlagBits value specifying the
1298e5c31af7Sopenharmony_ci    number of <<primsrast-multisampling,samples per texel>>.
1299e5c31af7Sopenharmony_ci  * pname:tiling is a elink:VkImageTiling value specifying the tiling
1300e5c31af7Sopenharmony_ci    arrangement of the texel blocks in memory.
1301e5c31af7Sopenharmony_ci  * pname:usage is a bitmask of elink:VkImageUsageFlagBits describing the
1302e5c31af7Sopenharmony_ci    intended usage of the image.
1303e5c31af7Sopenharmony_ci  * pname:sharingMode is a elink:VkSharingMode value specifying the sharing
1304e5c31af7Sopenharmony_ci    mode of the image when it will be accessed by multiple queue families.
1305e5c31af7Sopenharmony_ci  * pname:queueFamilyIndexCount is the number of entries in the
1306e5c31af7Sopenharmony_ci    pname:pQueueFamilyIndices array.
1307e5c31af7Sopenharmony_ci  * pname:pQueueFamilyIndices is a pointer to an array of queue families
1308e5c31af7Sopenharmony_ci    that will access this image.
1309e5c31af7Sopenharmony_ci    It is ignored if pname:sharingMode is not
1310e5c31af7Sopenharmony_ci    ename:VK_SHARING_MODE_CONCURRENT.
1311e5c31af7Sopenharmony_ci  * pname:initialLayout is a elink:VkImageLayout value specifying the
1312e5c31af7Sopenharmony_ci    initial elink:VkImageLayout of all image subresources of the image.
1313e5c31af7Sopenharmony_ci    See <<resources-image-layouts,Image Layouts>>.
1314e5c31af7Sopenharmony_ci
1315e5c31af7Sopenharmony_ciImages created with pname:tiling equal to ename:VK_IMAGE_TILING_LINEAR have
1316e5c31af7Sopenharmony_cifurther restrictions on their limits and capabilities compared to images
1317e5c31af7Sopenharmony_cicreated with pname:tiling equal to ename:VK_IMAGE_TILING_OPTIMAL.
1318e5c31af7Sopenharmony_ciCreation of images with tiling ename:VK_IMAGE_TILING_LINEAR may: not be
1319e5c31af7Sopenharmony_cisupported unless other parameters meet all of the constraints:
1320e5c31af7Sopenharmony_ci
1321e5c31af7Sopenharmony_ci  * pname:imageType is ename:VK_IMAGE_TYPE_2D
1322e5c31af7Sopenharmony_ci  * pname:format is not a depth/stencil format
1323e5c31af7Sopenharmony_ci  * pname:mipLevels is 1
1324e5c31af7Sopenharmony_ci  * pname:arrayLayers is 1
1325e5c31af7Sopenharmony_ci  * pname:samples is ename:VK_SAMPLE_COUNT_1_BIT
1326e5c31af7Sopenharmony_ci  * pname:usage only includes ename:VK_IMAGE_USAGE_TRANSFER_SRC_BIT and/or
1327e5c31af7Sopenharmony_ci    ename:VK_IMAGE_USAGE_TRANSFER_DST_BIT
1328e5c31af7Sopenharmony_ci
1329e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_1,VK_KHR_sampler_ycbcr_conversion[]
1330e5c31af7Sopenharmony_ciImages created with one of the <<formats-requiring-sampler-ycbcr-conversion,
1331e5c31af7Sopenharmony_ciformats that require a sampler {YCbCr} conversion>>, have further
1332e5c31af7Sopenharmony_cirestrictions on their limits and capabilities compared to images created
1333e5c31af7Sopenharmony_ciwith other formats.
1334e5c31af7Sopenharmony_ciCreation of images with a format requiring
1335e5c31af7Sopenharmony_ci<<formats-requiring-sampler-ycbcr-conversion, {YCbCr} conversion>> may: not
1336e5c31af7Sopenharmony_cibe supported unless other parameters meet all of the constraints:
1337e5c31af7Sopenharmony_ci
1338e5c31af7Sopenharmony_ci  * pname:imageType is ename:VK_IMAGE_TYPE_2D
1339e5c31af7Sopenharmony_ci  * pname:mipLevels is 1
1340e5c31af7Sopenharmony_ci  * pname:arrayLayers is 1, unless
1341e5c31af7Sopenharmony_ciifdef::VK_EXT_ycbcr_image_arrays[]
1342e5c31af7Sopenharmony_ci    the pname:ycbcrImageArrays feature is enabled, or
1343e5c31af7Sopenharmony_ciendif::VK_EXT_ycbcr_image_arrays[]
1344e5c31af7Sopenharmony_ci    otherwise indicated by
1345e5c31af7Sopenharmony_ci    slink:VkImageFormatProperties::pname:maxArrayLayers, as returned by
1346e5c31af7Sopenharmony_ci    flink:vkGetPhysicalDeviceImageFormatProperties
1347e5c31af7Sopenharmony_ci  * pname:samples is ename:VK_SAMPLE_COUNT_1_BIT
1348e5c31af7Sopenharmony_ciendif::VK_VERSION_1_1,VK_KHR_sampler_ycbcr_conversion[]
1349e5c31af7Sopenharmony_ci
1350e5c31af7Sopenharmony_ciImplementations may: support additional limits and capabilities beyond those
1351e5c31af7Sopenharmony_cilisted above.
1352e5c31af7Sopenharmony_ci
1353e5c31af7Sopenharmony_ciTo determine the set of valid pname:usage bits for a given format, call
1354e5c31af7Sopenharmony_ciflink:vkGetPhysicalDeviceFormatProperties.
1355e5c31af7Sopenharmony_ci
1356e5c31af7Sopenharmony_ciIf the size of the resultant image would exceed pname:maxResourceSize, then
1357e5c31af7Sopenharmony_ciflink:vkCreateImage must: fail and return
1358e5c31af7Sopenharmony_ciename:VK_ERROR_OUT_OF_DEVICE_MEMORY.
1359e5c31af7Sopenharmony_ciThis failure may: occur even when all image creation parameters satisfy
1360e5c31af7Sopenharmony_citheir valid usage requirements.
1361e5c31af7Sopenharmony_ci
1362e5c31af7Sopenharmony_ciifdef::VK_EXT_host_image_copy[]
1363e5c31af7Sopenharmony_ciIf the implementation reports ename:VK_TRUE in
1364e5c31af7Sopenharmony_cislink:VkPhysicalDeviceHostImageCopyPropertiesEXT::pname:identicalMemoryTypeRequirements,
1365e5c31af7Sopenharmony_ciusage of ename:VK_IMAGE_USAGE_HOST_TRANSFER_BIT_EXT must: not affect the
1366e5c31af7Sopenharmony_cimemory type requirements of the image as described in
1367e5c31af7Sopenharmony_ciifndef::VKSC_VERSION_1_0[]
1368e5c31af7Sopenharmony_ci<<sparsememory-memory-requirements,Sparse Resource Memory Requirements>> and
1369e5c31af7Sopenharmony_ciendif::VKSC_VERSION_1_0[]
1370e5c31af7Sopenharmony_ci<<resources-association,Resource Memory Association>>.
1371e5c31af7Sopenharmony_ciendif::VK_EXT_host_image_copy[]
1372e5c31af7Sopenharmony_ci
1373e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_1,VK_KHR_maintenance2[]
1374e5c31af7Sopenharmony_ci[NOTE]
1375e5c31af7Sopenharmony_ci.Note
1376e5c31af7Sopenharmony_ci====
1377e5c31af7Sopenharmony_ciFor images created without ename:VK_IMAGE_CREATE_EXTENDED_USAGE_BIT a
1378e5c31af7Sopenharmony_cipname:usage bit is valid if it is supported for the format the image is
1379e5c31af7Sopenharmony_cicreated with.
1380e5c31af7Sopenharmony_ci
1381e5c31af7Sopenharmony_ciFor images created with ename:VK_IMAGE_CREATE_EXTENDED_USAGE_BIT a
1382e5c31af7Sopenharmony_cipname:usage bit is valid if it is supported for at least one of the formats
1383e5c31af7Sopenharmony_cia sname:VkImageView created from the image can: have (see
1384e5c31af7Sopenharmony_ci<<resources-image-views,Image Views>> for more detail).
1385e5c31af7Sopenharmony_ci====
1386e5c31af7Sopenharmony_ciendif::VK_VERSION_1_1,VK_KHR_maintenance2[]
1387e5c31af7Sopenharmony_ci
1388e5c31af7Sopenharmony_ci[[resources-image-creation-limits]]
1389e5c31af7Sopenharmony_ci.Image Creation Limits
1390e5c31af7Sopenharmony_ci****
1391e5c31af7Sopenharmony_ciValid values for some image creation parameters are limited by a numerical
1392e5c31af7Sopenharmony_ciupper bound or by inclusion in a bitset.
1393e5c31af7Sopenharmony_ciFor example, slink:VkImageCreateInfo::pname:arrayLayers is limited by
1394e5c31af7Sopenharmony_cipname:imageCreateMaxArrayLayers, defined below; and
1395e5c31af7Sopenharmony_cislink:VkImageCreateInfo::pname:samples is limited by
1396e5c31af7Sopenharmony_cipname:imageCreateSampleCounts, also defined below.
1397e5c31af7Sopenharmony_ci
1398e5c31af7Sopenharmony_ciSeveral limiting values are defined below, as well as assisting values from
1399e5c31af7Sopenharmony_ciwhich the limiting values are derived.
1400e5c31af7Sopenharmony_ciThe limiting values are referenced by the relevant valid usage statements of
1401e5c31af7Sopenharmony_cislink:VkImageCreateInfo.
1402e5c31af7Sopenharmony_ci
1403e5c31af7Sopenharmony_ciifdef::VK_EXT_image_drm_format_modifier[]
1404e5c31af7Sopenharmony_ci  * Let `uint64_t imageCreateDrmFormatModifiers[]` be the set of
1405e5c31af7Sopenharmony_ci    <<glossary-drm-format-modifier,Linux DRM format modifiers>> that the
1406e5c31af7Sopenharmony_ci    resultant image may: have.
1407e5c31af7Sopenharmony_ci  ** If pname:tiling is not ename:VK_IMAGE_TILING_DRM_FORMAT_MODIFIER_EXT,
1408e5c31af7Sopenharmony_ci     then pname:imageCreateDrmFormatModifiers is empty.
1409e5c31af7Sopenharmony_ci  ** If slink:VkImageCreateInfo::pname:pNext contains
1410e5c31af7Sopenharmony_ci     slink:VkImageDrmFormatModifierExplicitCreateInfoEXT, then
1411e5c31af7Sopenharmony_ci     pname:imageCreateDrmFormatModifiers contains exactly one modifier,
1412e5c31af7Sopenharmony_ci     slink:VkImageDrmFormatModifierExplicitCreateInfoEXT::pname:drmFormatModifier.
1413e5c31af7Sopenharmony_ci  ** If slink:VkImageCreateInfo::pname:pNext contains
1414e5c31af7Sopenharmony_ci     slink:VkImageDrmFormatModifierListCreateInfoEXT, then
1415e5c31af7Sopenharmony_ci     pname:imageCreateDrmFormatModifiers contains the entire array
1416e5c31af7Sopenharmony_ci     slink:VkImageDrmFormatModifierListCreateInfoEXT::pname:pDrmFormatModifiers.
1417e5c31af7Sopenharmony_ciendif::VK_EXT_image_drm_format_modifier[]
1418e5c31af7Sopenharmony_ci
1419e5c31af7Sopenharmony_ci  * Let `VkBool32 imageCreateMaybeLinear` indicate if the resultant image
1420e5c31af7Sopenharmony_ci    may be <<glossary-linear-resource,linear>>.
1421e5c31af7Sopenharmony_ciifndef::VK_EXT_image_drm_format_modifier[]
1422e5c31af7Sopenharmony_ci    (The definition below is trivial because certain extensions are disabled
1423e5c31af7Sopenharmony_ci    in this build of the specification).
1424e5c31af7Sopenharmony_ciendif::VK_EXT_image_drm_format_modifier[]
1425e5c31af7Sopenharmony_ci  ** If pname:tiling is ename:VK_IMAGE_TILING_LINEAR, then
1426e5c31af7Sopenharmony_ci     pname:imageCreateMaybeLinear is ename:VK_TRUE.
1427e5c31af7Sopenharmony_ci  ** If pname:tiling is ename:VK_IMAGE_TILING_OPTIMAL, then
1428e5c31af7Sopenharmony_ci     pname:imageCreateMaybeLinear is ename:VK_FALSE.
1429e5c31af7Sopenharmony_ciifdef::VK_EXT_image_drm_format_modifier[]
1430e5c31af7Sopenharmony_ci  ** If pname:tiling is ename:VK_IMAGE_TILING_DRM_FORMAT_MODIFIER_EXT, then
1431e5c31af7Sopenharmony_ci     pname:imageCreateMaybeLinear is ename:VK_TRUE if and only if
1432e5c31af7Sopenharmony_ci     pname:imageCreateDrmFormatModifiers contains
1433e5c31af7Sopenharmony_ci     etext:DRM_FORMAT_MOD_LINEAR.
1434e5c31af7Sopenharmony_ciendif::VK_EXT_image_drm_format_modifier[]
1435e5c31af7Sopenharmony_ci
1436e5c31af7Sopenharmony_ci  * Let `VkFormatFeatureFlags imageCreateFormatFeatures` be the set of valid
1437e5c31af7Sopenharmony_ci    _format features_ available during image creation.
1438e5c31af7Sopenharmony_ci  ** If pname:tiling is ename:VK_IMAGE_TILING_LINEAR, then
1439e5c31af7Sopenharmony_ci     pname:imageCreateFormatFeatures is the value of
1440e5c31af7Sopenharmony_ci     slink:VkFormatProperties::pname:linearTilingFeatures found by calling
1441e5c31af7Sopenharmony_ci     flink:vkGetPhysicalDeviceFormatProperties with parameter pname:format
1442e5c31af7Sopenharmony_ci     equal to slink:VkImageCreateInfo::pname:format.
1443e5c31af7Sopenharmony_ci  ** If pname:tiling is ename:VK_IMAGE_TILING_OPTIMAL,
1444e5c31af7Sopenharmony_ciifdef::VK_ANDROID_external_memory_android_hardware_buffer,VK_QNX_external_memory_screen_buffer[]
1445e5c31af7Sopenharmony_ci     and if the pname:pNext chain includes no
1446e5c31af7Sopenharmony_ciifdef::VK_ANDROID_external_memory_android_hardware_buffer[]
1447e5c31af7Sopenharmony_ci     slink:VkExternalFormatANDROID
1448e5c31af7Sopenharmony_ciendif::VK_ANDROID_external_memory_android_hardware_buffer[]
1449e5c31af7Sopenharmony_ciifdef::VK_QNX_external_memory_screen_buffer[]
1450e5c31af7Sopenharmony_ciifdef::VK_ANDROID_external_memory_android_hardware_buffer[]
1451e5c31af7Sopenharmony_ci     or
1452e5c31af7Sopenharmony_ciendif::VK_ANDROID_external_memory_android_hardware_buffer[]
1453e5c31af7Sopenharmony_ci     slink:VkExternalFormatQNX
1454e5c31af7Sopenharmony_ciendif::VK_QNX_external_memory_screen_buffer[]
1455e5c31af7Sopenharmony_ci     structure with non-zero pname:externalFormat,
1456e5c31af7Sopenharmony_ciendif::VK_ANDROID_external_memory_android_hardware_buffer,VK_QNX_external_memory_screen_buffer[]
1457e5c31af7Sopenharmony_ci     then pname:imageCreateFormatFeatures is the value of
1458e5c31af7Sopenharmony_ci     slink:VkFormatProperties::pname:optimalTilingFeatures found by calling
1459e5c31af7Sopenharmony_ci     flink:vkGetPhysicalDeviceFormatProperties with parameter pname:format
1460e5c31af7Sopenharmony_ci     equal to slink:VkImageCreateInfo::pname:format.
1461e5c31af7Sopenharmony_ciifdef::VK_ANDROID_external_memory_android_hardware_buffer[]
1462e5c31af7Sopenharmony_ci  ** If pname:tiling is ename:VK_IMAGE_TILING_OPTIMAL, and if the
1463e5c31af7Sopenharmony_ci     pname:pNext chain includes a slink:VkExternalFormatANDROID structure
1464e5c31af7Sopenharmony_ci     with non-zero pname:externalFormat, then
1465e5c31af7Sopenharmony_ci     pname:imageCreateFormatFeatures is the value of
1466e5c31af7Sopenharmony_ci     slink:VkAndroidHardwareBufferFormatPropertiesANDROID::pname:formatFeatures
1467e5c31af7Sopenharmony_ci     obtained by flink:vkGetAndroidHardwareBufferPropertiesANDROID with a
1468e5c31af7Sopenharmony_ci     matching pname:externalFormat value.
1469e5c31af7Sopenharmony_ciendif::VK_ANDROID_external_memory_android_hardware_buffer[]
1470e5c31af7Sopenharmony_ciifdef::VK_QNX_external_memory_screen_buffer[]
1471e5c31af7Sopenharmony_ci  ** If pname:tiling is ename:VK_IMAGE_TILING_OPTIMAL, and if the
1472e5c31af7Sopenharmony_ci     pname:pNext chain includes a slink:VkExternalFormatQNX structure with
1473e5c31af7Sopenharmony_ci     non-zero pname:externalFormat, then pname:imageCreateFormatFeatures is
1474e5c31af7Sopenharmony_ci     the value of
1475e5c31af7Sopenharmony_ci     slink:VkScreenBufferFormatPropertiesQNX::pname:formatFeatures obtained
1476e5c31af7Sopenharmony_ci     by flink:vkGetScreenBufferPropertiesQNX with a matching
1477e5c31af7Sopenharmony_ci     pname:externalFormat value.
1478e5c31af7Sopenharmony_ciendif::VK_QNX_external_memory_screen_buffer[]
1479e5c31af7Sopenharmony_ciifdef::VK_FUCHSIA_buffer_collection[]
1480e5c31af7Sopenharmony_ci  ** If the pname:pNext chain includes a
1481e5c31af7Sopenharmony_ci     slink:VkBufferCollectionImageCreateInfoFUCHSIA structure, then
1482e5c31af7Sopenharmony_ci     pname:imageCreateFormatFeatures is the value of
1483e5c31af7Sopenharmony_ci     slink:VkBufferCollectionPropertiesFUCHSIA::pname:formatFeatures found
1484e5c31af7Sopenharmony_ci     by calling flink:vkGetBufferCollectionPropertiesFUCHSIA with a
1485e5c31af7Sopenharmony_ci     parameter pname:collection equal to
1486e5c31af7Sopenharmony_ci     slink:VkBufferCollectionImageCreateInfoFUCHSIA::pname:collection
1487e5c31af7Sopenharmony_ciendif::VK_FUCHSIA_buffer_collection[]
1488e5c31af7Sopenharmony_ciifdef::VK_EXT_image_drm_format_modifier[]
1489e5c31af7Sopenharmony_ci  ** If pname:tiling is ename:VK_IMAGE_TILING_DRM_FORMAT_MODIFIER_EXT, then
1490e5c31af7Sopenharmony_ci     the value of pname:imageCreateFormatFeatures is found by calling
1491e5c31af7Sopenharmony_ci     flink:vkGetPhysicalDeviceFormatProperties2 with
1492e5c31af7Sopenharmony_ci     slink:VkImageFormatProperties::pname:format equal to
1493e5c31af7Sopenharmony_ci     slink:VkImageCreateInfo::pname:format and with
1494e5c31af7Sopenharmony_ci     slink:VkDrmFormatModifierPropertiesListEXT chained into
1495e5c31af7Sopenharmony_ci     slink:VkFormatProperties2; by collecting all members of the returned
1496e5c31af7Sopenharmony_ci     array
1497e5c31af7Sopenharmony_ci     slink:VkDrmFormatModifierPropertiesListEXT::pname:pDrmFormatModifierProperties
1498e5c31af7Sopenharmony_ci     whose pname:drmFormatModifier belongs to
1499e5c31af7Sopenharmony_ci     pname:imageCreateDrmFormatModifiers; and by taking the bitwise
1500e5c31af7Sopenharmony_ci     intersection, over the collected array members, of
1501e5c31af7Sopenharmony_ci     pname:drmFormatModifierTilingFeatures.
1502e5c31af7Sopenharmony_ci     (The resultant pname:imageCreateFormatFeatures may: be empty).
1503e5c31af7Sopenharmony_ciendif::VK_EXT_image_drm_format_modifier[]
1504e5c31af7Sopenharmony_ci
1505e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_1,VK_KHR_external_memory[]
1506e5c31af7Sopenharmony_ci  * Let `VkImageFormatProperties2 imageCreateImageFormatPropertiesList[]` be
1507e5c31af7Sopenharmony_ciifdef::VK_ANDROID_external_memory_android_hardware_buffer,VK_QNX_external_memory_screen_buffer[]
1508e5c31af7Sopenharmony_ci    defined as follows.
1509e5c31af7Sopenharmony_ci  ** If slink:VkImageCreateInfo::pname:pNext contains no
1510e5c31af7Sopenharmony_ciifdef::VK_ANDROID_external_memory_android_hardware_buffer[]
1511e5c31af7Sopenharmony_ci     slink:VkExternalFormatANDROID
1512e5c31af7Sopenharmony_ciendif::VK_ANDROID_external_memory_android_hardware_buffer[]
1513e5c31af7Sopenharmony_ciifdef::VK_QNX_external_memory_screen_buffer[]
1514e5c31af7Sopenharmony_ciifdef::VK_ANDROID_external_memory_android_hardware_buffer[]
1515e5c31af7Sopenharmony_ci     or
1516e5c31af7Sopenharmony_ciendif::VK_ANDROID_external_memory_android_hardware_buffer[]
1517e5c31af7Sopenharmony_ci     slink:VkExternalFormatQNX
1518e5c31af7Sopenharmony_ciendif::VK_QNX_external_memory_screen_buffer[]
1519e5c31af7Sopenharmony_ci     structure with non-zero pname:externalFormat, then
1520e5c31af7Sopenharmony_ci     pname:imageCreateImageFormatPropertiesList is
1521e5c31af7Sopenharmony_ciendif::VK_ANDROID_external_memory_android_hardware_buffer,VK_QNX_external_memory_screen_buffer[]
1522e5c31af7Sopenharmony_ci     the list of structures obtained by calling
1523e5c31af7Sopenharmony_ci     flink:vkGetPhysicalDeviceImageFormatProperties2, possibly multiple
1524e5c31af7Sopenharmony_ci     times, as follows:
1525e5c31af7Sopenharmony_ci  *** The parameters slink:VkPhysicalDeviceImageFormatInfo2::pname:format,
1526e5c31af7Sopenharmony_ci      pname:imageType, pname:tiling, pname:usage, and pname:flags must: be
1527e5c31af7Sopenharmony_ci      equal to those in slink:VkImageCreateInfo.
1528e5c31af7Sopenharmony_ci  *** If slink:VkImageCreateInfo::pname:pNext contains a
1529e5c31af7Sopenharmony_ci      slink:VkExternalMemoryImageCreateInfo structure whose
1530e5c31af7Sopenharmony_ci      pname:handleTypes is not `0`, then
1531e5c31af7Sopenharmony_ci      slink:VkPhysicalDeviceImageFormatInfo2::pname:pNext must: contain a
1532e5c31af7Sopenharmony_ci      slink:VkPhysicalDeviceExternalImageFormatInfo structure whose
1533e5c31af7Sopenharmony_ci      pname:handleType is not `0`; and
1534e5c31af7Sopenharmony_ci      flink:vkGetPhysicalDeviceImageFormatProperties2 must: be called for
1535e5c31af7Sopenharmony_ci      each handle type in
1536e5c31af7Sopenharmony_ci      slink:VkExternalMemoryImageCreateInfo::pname:handleTypes, successively
1537e5c31af7Sopenharmony_ci      setting
1538e5c31af7Sopenharmony_ci      slink:VkPhysicalDeviceExternalImageFormatInfo::pname:handleType on
1539e5c31af7Sopenharmony_ci      each call.
1540e5c31af7Sopenharmony_ci  *** If slink:VkImageCreateInfo::pname:pNext contains no
1541e5c31af7Sopenharmony_ci      slink:VkExternalMemoryImageCreateInfo structure, or contains a
1542e5c31af7Sopenharmony_ci      structure whose pname:handleTypes is `0`, then
1543e5c31af7Sopenharmony_ci      slink:VkPhysicalDeviceImageFormatInfo2::pname:pNext must: either
1544e5c31af7Sopenharmony_ci      contain no slink:VkPhysicalDeviceExternalImageFormatInfo structure, or
1545e5c31af7Sopenharmony_ci      contain a structure whose pname:handleType is `0`.
1546e5c31af7Sopenharmony_ciifdef::VK_KHR_video_queue[]
1547e5c31af7Sopenharmony_ci  *** If slink:VkImageCreateInfo::pname:pNext contains a
1548e5c31af7Sopenharmony_ci      slink:VkVideoProfileListInfoKHR structure then
1549e5c31af7Sopenharmony_ci      slink:VkPhysicalDeviceImageFormatInfo2::pname:pNext must: also contain
1550e5c31af7Sopenharmony_ci      the same slink:VkVideoProfileListInfoKHR structure on each call.
1551e5c31af7Sopenharmony_ciendif::VK_KHR_video_queue[]
1552e5c31af7Sopenharmony_ciifdef::VK_EXT_image_drm_format_modifier[]
1553e5c31af7Sopenharmony_ci  *** If pname:tiling is ename:VK_IMAGE_TILING_DRM_FORMAT_MODIFIER_EXT,
1554e5c31af7Sopenharmony_ci      then:
1555e5c31af7Sopenharmony_ci  **** slink:VkPhysicalDeviceImageFormatInfo2::pname:pNext must: contain a
1556e5c31af7Sopenharmony_ci       slink:VkPhysicalDeviceImageDrmFormatModifierInfoEXT structure where
1557e5c31af7Sopenharmony_ci       pname:sharingMode is equal to
1558e5c31af7Sopenharmony_ci       slink:VkImageCreateInfo::pname:sharingMode;
1559e5c31af7Sopenharmony_ci  **** if pname:sharingMode is ename:VK_SHARING_MODE_CONCURRENT, then
1560e5c31af7Sopenharmony_ci       pname:queueFamilyIndexCount and pname:pQueueFamilyIndices must: be
1561e5c31af7Sopenharmony_ci       equal to those in slink:VkImageCreateInfo;
1562e5c31af7Sopenharmony_ci  **** if pname:flags contains ename:VK_IMAGE_CREATE_MUTABLE_FORMAT_BIT,
1563e5c31af7Sopenharmony_ci       then the slink:VkImageFormatListCreateInfo structure included in the
1564e5c31af7Sopenharmony_ci       pname:pNext chain of slink:VkPhysicalDeviceImageFormatInfo2 must: be
1565e5c31af7Sopenharmony_ci       equivalent to the one included in the pname:pNext chain of
1566e5c31af7Sopenharmony_ci       slink:VkImageCreateInfo;
1567e5c31af7Sopenharmony_ciifdef::VK_EXT_image_compression_control[]
1568e5c31af7Sopenharmony_ci  **** if slink:VkImageCreateInfo::pname:pNext contains a
1569e5c31af7Sopenharmony_ci       slink:VkImageCompressionControlEXT structure, then the
1570e5c31af7Sopenharmony_ci       slink:VkPhysicalDeviceImageFormatInfo2::pname:pNext chain must:
1571e5c31af7Sopenharmony_ci       contain an equivalent structure;
1572e5c31af7Sopenharmony_ciendif::VK_EXT_image_compression_control[]
1573e5c31af7Sopenharmony_ci  **** flink:vkGetPhysicalDeviceImageFormatProperties2 must: be called for
1574e5c31af7Sopenharmony_ci       each modifier in pname:imageCreateDrmFormatModifiers, successively
1575e5c31af7Sopenharmony_ci       setting
1576e5c31af7Sopenharmony_ci       slink:VkPhysicalDeviceImageDrmFormatModifierInfoEXT::pname:drmFormatModifier
1577e5c31af7Sopenharmony_ci       on each call.
1578e5c31af7Sopenharmony_ci  *** If pname:tiling is not ename:VK_IMAGE_TILING_DRM_FORMAT_MODIFIER_EXT,
1579e5c31af7Sopenharmony_ci      then slink:VkPhysicalDeviceImageFormatInfo2::pname:pNext must: contain
1580e5c31af7Sopenharmony_ci      no slink:VkPhysicalDeviceImageDrmFormatModifierInfoEXT structure.
1581e5c31af7Sopenharmony_ciendif::VK_EXT_image_drm_format_modifier[]
1582e5c31af7Sopenharmony_ci  *** If any call to flink:vkGetPhysicalDeviceImageFormatProperties2 returns
1583e5c31af7Sopenharmony_ci      an error, then pname:imageCreateImageFormatPropertiesList is defined
1584e5c31af7Sopenharmony_ci      to be the empty list.
1585e5c31af7Sopenharmony_ciifdef::VK_ANDROID_external_memory_android_hardware_buffer[]
1586e5c31af7Sopenharmony_ci  ** If slink:VkImageCreateInfo::pname:pNext contains a
1587e5c31af7Sopenharmony_ci     slink:VkExternalFormatANDROID structure with non-zero
1588e5c31af7Sopenharmony_ci     pname:externalFormat, then pname:imageCreateImageFormatPropertiesList
1589e5c31af7Sopenharmony_ci     contains a single element where:
1590e5c31af7Sopenharmony_ci  *** sname:VkImageFormatProperties::pname:maxMipLevels is
1591e5c31af7Sopenharmony_ci      [eq]#{lfloor}log~2~(max(pname:extent.width, pname:extent.height,
1592e5c31af7Sopenharmony_ci      pname:extent.depth)){rfloor} {plus} 1#.
1593e5c31af7Sopenharmony_ci  *** sname:VkImageFormatProperties::pname:maxArrayLayers is
1594e5c31af7Sopenharmony_ci      slink:VkPhysicalDeviceLimits::pname:maxImageArrayLayers.
1595e5c31af7Sopenharmony_ci  *** Each component of sname:VkImageFormatProperties::pname:maxExtent is
1596e5c31af7Sopenharmony_ci      slink:VkPhysicalDeviceLimits::pname:maxImageDimension2D.
1597e5c31af7Sopenharmony_ci  *** sname:VkImageFormatProperties::pname:sampleCounts contains exactly
1598e5c31af7Sopenharmony_ci      ename:VK_SAMPLE_COUNT_1_BIT.
1599e5c31af7Sopenharmony_ciendif::VK_ANDROID_external_memory_android_hardware_buffer[]
1600e5c31af7Sopenharmony_ciendif::VK_VERSION_1_1,VK_KHR_external_memory[]
1601e5c31af7Sopenharmony_ci
1602e5c31af7Sopenharmony_ci  * Let `uint32_t imageCreateMaxMipLevels` be
1603e5c31af7Sopenharmony_ciifndef::VK_VERSION_1_1,VK_KHR_external_memory[]
1604e5c31af7Sopenharmony_ci    the value of slink:VkImageFormatProperties::pname:maxMipLevels found by
1605e5c31af7Sopenharmony_ci    calling flink:vkGetPhysicalDeviceImageFormatProperties with parameters
1606e5c31af7Sopenharmony_ci    pname:format, pname:imageType, pname:tiling, pname:usage, and
1607e5c31af7Sopenharmony_ci    pname:flags equal to those in slink:VkImageCreateInfo.
1608e5c31af7Sopenharmony_ci    If flink:vkGetPhysicalDeviceFormatProperties returns an error, then the
1609e5c31af7Sopenharmony_ci    value of pname:imageCreateMaxMipLevels is undefined:.
1610e5c31af7Sopenharmony_ciendif::VK_VERSION_1_1,VK_KHR_external_memory[]
1611e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_1,VK_KHR_external_memory[]
1612e5c31af7Sopenharmony_ci    the minimum value of slink:VkImageFormatProperties::pname:maxMipLevels
1613e5c31af7Sopenharmony_ci    in pname:imageCreateImageFormatPropertiesList.
1614e5c31af7Sopenharmony_ci    The value is undefined: if pname:imageCreateImageFormatPropertiesList is
1615e5c31af7Sopenharmony_ci    empty.
1616e5c31af7Sopenharmony_ciendif::VK_VERSION_1_1,VK_KHR_external_memory[]
1617e5c31af7Sopenharmony_ci
1618e5c31af7Sopenharmony_ci  * Let `uint32_t imageCreateMaxArrayLayers` be
1619e5c31af7Sopenharmony_ciifndef::VK_VERSION_1_1,VK_KHR_external_memory[]
1620e5c31af7Sopenharmony_ci    defined analogously to pname:imageCreateMaxMipLevels.
1621e5c31af7Sopenharmony_ciendif::VK_VERSION_1_1,VK_KHR_external_memory[]
1622e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_1,VK_KHR_external_memory[]
1623e5c31af7Sopenharmony_ci    the minimum value of slink:VkImageFormatProperties::pname:maxArrayLayers
1624e5c31af7Sopenharmony_ci    in pname:imageCreateImageFormatPropertiesList.
1625e5c31af7Sopenharmony_ci    The value is undefined: if pname:imageCreateImageFormatPropertiesList is
1626e5c31af7Sopenharmony_ci    empty.
1627e5c31af7Sopenharmony_ciendif::VK_VERSION_1_1,VK_KHR_external_memory[]
1628e5c31af7Sopenharmony_ci
1629e5c31af7Sopenharmony_ci  * Let `VkExtent3D imageCreateMaxExtent` be
1630e5c31af7Sopenharmony_ciifndef::VK_VERSION_1_1,VK_KHR_external_memory[]
1631e5c31af7Sopenharmony_ci    defined analogously to pname:imageCreateMaxMipLevels.
1632e5c31af7Sopenharmony_ciendif::VK_VERSION_1_1,VK_KHR_external_memory[]
1633e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_1,VK_KHR_external_memory[]
1634e5c31af7Sopenharmony_ci    the component-wise minimum over all
1635e5c31af7Sopenharmony_ci    slink:VkImageFormatProperties::pname:maxExtent values in
1636e5c31af7Sopenharmony_ci    pname:imageCreateImageFormatPropertiesList.
1637e5c31af7Sopenharmony_ci    The value is undefined: if pname:imageCreateImageFormatPropertiesList is
1638e5c31af7Sopenharmony_ci    empty.
1639e5c31af7Sopenharmony_ciendif::VK_VERSION_1_1,VK_KHR_external_memory[]
1640e5c31af7Sopenharmony_ci
1641e5c31af7Sopenharmony_ci  * Let `VkSampleCountFlags imageCreateSampleCounts` be
1642e5c31af7Sopenharmony_ciifndef::VK_VERSION_1_1,VK_KHR_external_memory[]
1643e5c31af7Sopenharmony_ci    defined analogously to pname:imageCreateMaxMipLevels.
1644e5c31af7Sopenharmony_ciendif::VK_VERSION_1_1,VK_KHR_external_memory[]
1645e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_1,VK_KHR_external_memory[]
1646e5c31af7Sopenharmony_ci    the intersection of each
1647e5c31af7Sopenharmony_ci    slink:VkImageFormatProperties::pname:sampleCounts in
1648e5c31af7Sopenharmony_ci    pname:imageCreateImageFormatPropertiesList.
1649e5c31af7Sopenharmony_ci    The value is undefined: if pname:imageCreateImageFormatPropertiesList is
1650e5c31af7Sopenharmony_ci    empty.
1651e5c31af7Sopenharmony_ciendif::VK_VERSION_1_1,VK_KHR_external_memory[]
1652e5c31af7Sopenharmony_ci
1653e5c31af7Sopenharmony_ciifdef::VK_KHR_video_queue[]
1654e5c31af7Sopenharmony_ci  * Let `VkVideoFormatPropertiesKHR videoFormatProperties[]` be defined as
1655e5c31af7Sopenharmony_ci    follows.
1656e5c31af7Sopenharmony_ci  ** If slink:VkImageCreateInfo::pname:pNext contains a
1657e5c31af7Sopenharmony_ci     slink:VkVideoProfileListInfoKHR structure, then `videoFormatProperties`
1658e5c31af7Sopenharmony_ci     is the list of structures obtained by calling
1659e5c31af7Sopenharmony_ci     flink:vkGetPhysicalDeviceVideoFormatPropertiesKHR with
1660e5c31af7Sopenharmony_ci     slink:VkPhysicalDeviceVideoFormatInfoKHR::pname:imageUsage equal to the
1661e5c31af7Sopenharmony_ci     pname:usage member of slink:VkImageCreateInfo and
1662e5c31af7Sopenharmony_ci     slink:VkPhysicalDeviceVideoFormatInfoKHR::pname:pNext containing the
1663e5c31af7Sopenharmony_ci     same slink:VkVideoProfileListInfoKHR structure chained to
1664e5c31af7Sopenharmony_ci     slink:VkImageCreateInfo.
1665e5c31af7Sopenharmony_ci  ** If slink:VkImageCreateInfo::pname:pNext contains no
1666e5c31af7Sopenharmony_ci     slink:VkVideoProfileListInfoKHR structure, then `videoFormatProperties`
1667e5c31af7Sopenharmony_ci     is an empty list.
1668e5c31af7Sopenharmony_ci  * Let `VkBool32 supportedVideoFormat` indicate if the image parameters are
1669e5c31af7Sopenharmony_ci    supported by the specified video profiles.
1670e5c31af7Sopenharmony_ci  ** `supportedVideoFormat` is ename:VK_TRUE if there exists an element in
1671e5c31af7Sopenharmony_ci     the `videoFormatProperties` list for which all of the following
1672e5c31af7Sopenharmony_ci     conditions are true:
1673e5c31af7Sopenharmony_ci  *** slink:VkImageCreateInfo::pname:format equals
1674e5c31af7Sopenharmony_ci      slink:VkVideoFormatPropertiesKHR::pname:format.
1675e5c31af7Sopenharmony_ci  *** slink:VkImageCreateInfo::pname:flags only contains bits also set in
1676e5c31af7Sopenharmony_ci      slink:VkVideoFormatPropertiesKHR::pname:imageCreateFlags.
1677e5c31af7Sopenharmony_ci  *** slink:VkImageCreateInfo::pname:imageType equals
1678e5c31af7Sopenharmony_ci      slink:VkVideoFormatPropertiesKHR::pname:imageType.
1679e5c31af7Sopenharmony_ci  *** slink:VkImageCreateInfo::pname:tiling equals
1680e5c31af7Sopenharmony_ci      slink:VkVideoFormatPropertiesKHR::pname:imageTiling.
1681e5c31af7Sopenharmony_ci  *** slink:VkImageCreateInfo::pname:usage only contains bits also set in
1682e5c31af7Sopenharmony_ci      slink:VkVideoFormatPropertiesKHR::pname:imageUsageFlags.
1683e5c31af7Sopenharmony_ci  ** Otherwise `supportedVideoFormat` is ename:VK_FALSE.
1684e5c31af7Sopenharmony_ciendif::VK_KHR_video_queue[]
1685e5c31af7Sopenharmony_ci****
1686e5c31af7Sopenharmony_ci
1687e5c31af7Sopenharmony_ci.Valid Usage
1688e5c31af7Sopenharmony_ci****
1689e5c31af7Sopenharmony_ci  * [[VUID-VkImageCreateInfo-imageCreateMaxMipLevels-02251]]
1690e5c31af7Sopenharmony_ci    Each of the following values (as described in
1691e5c31af7Sopenharmony_ci    <<resources-image-creation-limits,Image Creation Limits>>) must: not be
1692e5c31af7Sopenharmony_ci    undefined: : pname:imageCreateMaxMipLevels,
1693e5c31af7Sopenharmony_ci    pname:imageCreateMaxArrayLayers, pname:imageCreateMaxExtent, and
1694e5c31af7Sopenharmony_ci    pname:imageCreateSampleCounts
1695e5c31af7Sopenharmony_ci  * [[VUID-VkImageCreateInfo-sharingMode-00941]]
1696e5c31af7Sopenharmony_ci    If pname:sharingMode is ename:VK_SHARING_MODE_CONCURRENT,
1697e5c31af7Sopenharmony_ci    pname:pQueueFamilyIndices must: be a valid pointer to an array of
1698e5c31af7Sopenharmony_ci    pname:queueFamilyIndexCount code:uint32_t values
1699e5c31af7Sopenharmony_ci  * [[VUID-VkImageCreateInfo-sharingMode-00942]]
1700e5c31af7Sopenharmony_ci    If pname:sharingMode is ename:VK_SHARING_MODE_CONCURRENT,
1701e5c31af7Sopenharmony_ci    pname:queueFamilyIndexCount must: be greater than `1`
1702e5c31af7Sopenharmony_ciifndef::VK_VERSION_1_1,VK_KHR_get_physical_device_properties2[]
1703e5c31af7Sopenharmony_ci  * [[VUID-VkImageCreateInfo-sharingMode-01392]]
1704e5c31af7Sopenharmony_ci    If pname:sharingMode is ename:VK_SHARING_MODE_CONCURRENT, each element
1705e5c31af7Sopenharmony_ci    of pname:pQueueFamilyIndices must: be unique and must: be less than
1706e5c31af7Sopenharmony_ci    pname:pQueueFamilyPropertyCount returned by
1707e5c31af7Sopenharmony_ci    flink:vkGetPhysicalDeviceQueueFamilyProperties for the
1708e5c31af7Sopenharmony_ci    pname:physicalDevice that was used to create pname:device
1709e5c31af7Sopenharmony_ciendif::VK_VERSION_1_1,VK_KHR_get_physical_device_properties2[]
1710e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_1,VK_KHR_get_physical_device_properties2[]
1711e5c31af7Sopenharmony_ci  * [[VUID-VkImageCreateInfo-sharingMode-01420]]
1712e5c31af7Sopenharmony_ci    If pname:sharingMode is ename:VK_SHARING_MODE_CONCURRENT, each element
1713e5c31af7Sopenharmony_ci    of pname:pQueueFamilyIndices must: be unique and must: be less than
1714e5c31af7Sopenharmony_ci    pname:pQueueFamilyPropertyCount returned by either
1715e5c31af7Sopenharmony_ci    flink:vkGetPhysicalDeviceQueueFamilyProperties or
1716e5c31af7Sopenharmony_ci    flink:vkGetPhysicalDeviceQueueFamilyProperties2 for the
1717e5c31af7Sopenharmony_ci    pname:physicalDevice that was used to create pname:device
1718e5c31af7Sopenharmony_ciendif::VK_VERSION_1_1,VK_KHR_get_physical_device_properties2[]
1719e5c31af7Sopenharmony_ciifndef::VK_ANDROID_external_memory_android_hardware_buffer[]
1720e5c31af7Sopenharmony_ci  * [[VUID-VkImageCreateInfo-format-00943]]
1721e5c31af7Sopenharmony_ci    pname:format must: not be ename:VK_FORMAT_UNDEFINED
1722e5c31af7Sopenharmony_ciendif::VK_ANDROID_external_memory_android_hardware_buffer[]
1723e5c31af7Sopenharmony_ciifdef::VK_ANDROID_external_memory_android_hardware_buffer[]
1724e5c31af7Sopenharmony_ci  * [[VUID-VkImageCreateInfo-pNext-01974]]
1725e5c31af7Sopenharmony_ci    If the pname:pNext chain includes a slink:VkExternalFormatANDROID
1726e5c31af7Sopenharmony_ci    structure, and its pname:externalFormat member is non-zero the
1727e5c31af7Sopenharmony_ci    pname:format must: be ename:VK_FORMAT_UNDEFINED
1728e5c31af7Sopenharmony_ci  * [[VUID-VkImageCreateInfo-pNext-01975]]
1729e5c31af7Sopenharmony_ci    If the pname:pNext chain does not include a
1730e5c31af7Sopenharmony_ci    slink:VkExternalFormatANDROID structure, or does and its
1731e5c31af7Sopenharmony_ci    pname:externalFormat member is `0`, the pname:format must: not be
1732e5c31af7Sopenharmony_ci    ename:VK_FORMAT_UNDEFINED
1733e5c31af7Sopenharmony_ciendif::VK_ANDROID_external_memory_android_hardware_buffer[]
1734e5c31af7Sopenharmony_ci  * [[VUID-VkImageCreateInfo-extent-00944]]
1735e5c31af7Sopenharmony_ci    pname:extent.width must: be greater than `0`
1736e5c31af7Sopenharmony_ci  * [[VUID-VkImageCreateInfo-extent-00945]]
1737e5c31af7Sopenharmony_ci    pname:extent.height must: be greater than `0`
1738e5c31af7Sopenharmony_ci  * [[VUID-VkImageCreateInfo-extent-00946]]
1739e5c31af7Sopenharmony_ci    pname:extent.depth must: be greater than `0`
1740e5c31af7Sopenharmony_ci  * [[VUID-VkImageCreateInfo-mipLevels-00947]]
1741e5c31af7Sopenharmony_ci    pname:mipLevels must: be greater than `0`
1742e5c31af7Sopenharmony_ci  * [[VUID-VkImageCreateInfo-arrayLayers-00948]]
1743e5c31af7Sopenharmony_ci    pname:arrayLayers must: be greater than `0`
1744e5c31af7Sopenharmony_ci  * [[VUID-VkImageCreateInfo-flags-00949]]
1745e5c31af7Sopenharmony_ci    If pname:flags contains ename:VK_IMAGE_CREATE_CUBE_COMPATIBLE_BIT,
1746e5c31af7Sopenharmony_ci    pname:imageType must: be ename:VK_IMAGE_TYPE_2D
1747e5c31af7Sopenharmony_ci  * [[VUID-VkImageCreateInfo-flags-08865]]
1748e5c31af7Sopenharmony_ci    If pname:flags contains ename:VK_IMAGE_CREATE_CUBE_COMPATIBLE_BIT,
1749e5c31af7Sopenharmony_ci    pname:extent.width and pname:extent.height must: be equal
1750e5c31af7Sopenharmony_ci  * [[VUID-VkImageCreateInfo-flags-08866]]
1751e5c31af7Sopenharmony_ci    If pname:flags contains ename:VK_IMAGE_CREATE_CUBE_COMPATIBLE_BIT,
1752e5c31af7Sopenharmony_ci    pname:arrayLayers must: be greater than or equal to 6
1753e5c31af7Sopenharmony_ciifdef::VK_EXT_fragment_density_map[]
1754e5c31af7Sopenharmony_ci  * [[VUID-VkImageCreateInfo-flags-02557]]
1755e5c31af7Sopenharmony_ci    If pname:flags contains
1756e5c31af7Sopenharmony_ci    ename:VK_IMAGE_USAGE_FRAGMENT_DENSITY_MAP_BIT_EXT, pname:imageType must:
1757e5c31af7Sopenharmony_ci    be ename:VK_IMAGE_TYPE_2D
1758e5c31af7Sopenharmony_ciendif::VK_EXT_fragment_density_map[]
1759e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_1,VK_KHR_maintenance1[]
1760e5c31af7Sopenharmony_ci  * [[VUID-VkImageCreateInfo-flags-00950]]
1761e5c31af7Sopenharmony_ci    If pname:flags contains ename:VK_IMAGE_CREATE_2D_ARRAY_COMPATIBLE_BIT,
1762e5c31af7Sopenharmony_ci    pname:imageType must: be ename:VK_IMAGE_TYPE_3D
1763e5c31af7Sopenharmony_ci  * [[VUID-VkImageCreateInfo-flags-09403]]
1764e5c31af7Sopenharmony_ci    If pname:flags contains ename:VK_IMAGE_CREATE_2D_ARRAY_COMPATIBLE_BIT,
1765e5c31af7Sopenharmony_ci    pname:flags must: not include ename:VK_IMAGE_CREATE_SPARSE_ALIASED_BIT,
1766e5c31af7Sopenharmony_ci    ename:VK_IMAGE_CREATE_SPARSE_BINDING_BIT, or
1767e5c31af7Sopenharmony_ci    ename:VK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT
1768e5c31af7Sopenharmony_ciendif::VK_VERSION_1_1,VK_KHR_maintenance1[]
1769e5c31af7Sopenharmony_ciifdef::VK_EXT_image_2d_view_of_3d[]
1770e5c31af7Sopenharmony_ci  * [[VUID-VkImageCreateInfo-flags-07755]]
1771e5c31af7Sopenharmony_ci    If pname:flags contains
1772e5c31af7Sopenharmony_ci    ename:VK_IMAGE_CREATE_2D_VIEW_COMPATIBLE_BIT_EXT, pname:imageType must:
1773e5c31af7Sopenharmony_ci    be ename:VK_IMAGE_TYPE_3D
1774e5c31af7Sopenharmony_ciendif::VK_EXT_image_2d_view_of_3d[]
1775e5c31af7Sopenharmony_ci  * [[VUID-VkImageCreateInfo-extent-02252]]
1776e5c31af7Sopenharmony_ci    pname:extent.width must: be less than or equal to
1777e5c31af7Sopenharmony_ci    pname:imageCreateMaxExtent.width (as defined in
1778e5c31af7Sopenharmony_ci    <<resources-image-creation-limits,Image Creation Limits>>)
1779e5c31af7Sopenharmony_ci  * [[VUID-VkImageCreateInfo-extent-02253]]
1780e5c31af7Sopenharmony_ci    pname:extent.height must: be less than or equal to
1781e5c31af7Sopenharmony_ci    pname:imageCreateMaxExtent.height (as defined in
1782e5c31af7Sopenharmony_ci    <<resources-image-creation-limits,Image Creation Limits>>)
1783e5c31af7Sopenharmony_ci  * [[VUID-VkImageCreateInfo-extent-02254]]
1784e5c31af7Sopenharmony_ci    pname:extent.depth must: be less than or equal to
1785e5c31af7Sopenharmony_ci    pname:imageCreateMaxExtent.depth (as defined in
1786e5c31af7Sopenharmony_ci    <<resources-image-creation-limits,Image Creation Limits>>)
1787e5c31af7Sopenharmony_ci  * [[VUID-VkImageCreateInfo-imageType-00956]]
1788e5c31af7Sopenharmony_ci    If pname:imageType is ename:VK_IMAGE_TYPE_1D, both pname:extent.height
1789e5c31af7Sopenharmony_ci    and pname:extent.depth must: be `1`
1790e5c31af7Sopenharmony_ci  * [[VUID-VkImageCreateInfo-imageType-00957]]
1791e5c31af7Sopenharmony_ci    If pname:imageType is ename:VK_IMAGE_TYPE_2D, pname:extent.depth must:
1792e5c31af7Sopenharmony_ci    be `1`
1793e5c31af7Sopenharmony_ci  * [[VUID-VkImageCreateInfo-mipLevels-00958]]
1794e5c31af7Sopenharmony_ci    pname:mipLevels must: be less than or equal to the number of levels in
1795e5c31af7Sopenharmony_ci    the complete mipmap chain based on [eq]#pname:extent.width#,
1796e5c31af7Sopenharmony_ci    [eq]#pname:extent.height#, and [eq]#pname:extent.depth#
1797e5c31af7Sopenharmony_ci  * [[VUID-VkImageCreateInfo-mipLevels-02255]]
1798e5c31af7Sopenharmony_ci    pname:mipLevels must: be less than or equal to
1799e5c31af7Sopenharmony_ci    pname:imageCreateMaxMipLevels (as defined in
1800e5c31af7Sopenharmony_ci    <<resources-image-creation-limits,Image Creation Limits>>)
1801e5c31af7Sopenharmony_ci  * [[VUID-VkImageCreateInfo-arrayLayers-02256]]
1802e5c31af7Sopenharmony_ci    pname:arrayLayers must: be less than or equal to
1803e5c31af7Sopenharmony_ci    pname:imageCreateMaxArrayLayers (as defined in
1804e5c31af7Sopenharmony_ci    <<resources-image-creation-limits,Image Creation Limits>>)
1805e5c31af7Sopenharmony_ci  * [[VUID-VkImageCreateInfo-imageType-00961]]
1806e5c31af7Sopenharmony_ci    If pname:imageType is ename:VK_IMAGE_TYPE_3D, pname:arrayLayers must: be
1807e5c31af7Sopenharmony_ci    `1`
1808e5c31af7Sopenharmony_ci  * [[VUID-VkImageCreateInfo-samples-02257]]
1809e5c31af7Sopenharmony_ci    If pname:samples is not ename:VK_SAMPLE_COUNT_1_BIT, then
1810e5c31af7Sopenharmony_ci    pname:imageType must: be ename:VK_IMAGE_TYPE_2D, pname:flags must: not
1811e5c31af7Sopenharmony_ci    contain ename:VK_IMAGE_CREATE_CUBE_COMPATIBLE_BIT, pname:mipLevels must:
1812e5c31af7Sopenharmony_ci    be equal to `1`, and pname:imageCreateMaybeLinear (as defined in
1813e5c31af7Sopenharmony_ci    <<resources-image-creation-limits,Image Creation Limits>>) must: be
1814e5c31af7Sopenharmony_ci    ename:VK_FALSE,
1815e5c31af7Sopenharmony_ciifdef::VK_EXT_fragment_density_map[]
1816e5c31af7Sopenharmony_ci  * [[VUID-VkImageCreateInfo-samples-02558]]
1817e5c31af7Sopenharmony_ci    If pname:samples is not ename:VK_SAMPLE_COUNT_1_BIT, pname:usage must:
1818e5c31af7Sopenharmony_ci    not contain ename:VK_IMAGE_USAGE_FRAGMENT_DENSITY_MAP_BIT_EXT
1819e5c31af7Sopenharmony_ciendif::VK_EXT_fragment_density_map[]
1820e5c31af7Sopenharmony_ci  * [[VUID-VkImageCreateInfo-usage-00963]]
1821e5c31af7Sopenharmony_ci    If pname:usage includes ename:VK_IMAGE_USAGE_TRANSIENT_ATTACHMENT_BIT,
1822e5c31af7Sopenharmony_ci    then bits other than ename:VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT,
1823e5c31af7Sopenharmony_ci    ename:VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT, and
1824e5c31af7Sopenharmony_ci    ename:VK_IMAGE_USAGE_INPUT_ATTACHMENT_BIT must: not be set
1825e5c31af7Sopenharmony_ci  * [[VUID-VkImageCreateInfo-usage-00964]]
1826e5c31af7Sopenharmony_ci    If pname:usage includes ename:VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT,
1827e5c31af7Sopenharmony_ci    ename:VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT,
1828e5c31af7Sopenharmony_ci    ename:VK_IMAGE_USAGE_TRANSIENT_ATTACHMENT_BIT, or
1829e5c31af7Sopenharmony_ci    ename:VK_IMAGE_USAGE_INPUT_ATTACHMENT_BIT, pname:extent.width must: be
1830e5c31af7Sopenharmony_ci    less than or equal to
1831e5c31af7Sopenharmony_ci    sname:VkPhysicalDeviceLimits::pname:maxFramebufferWidth
1832e5c31af7Sopenharmony_ci  * [[VUID-VkImageCreateInfo-usage-00965]]
1833e5c31af7Sopenharmony_ci    If pname:usage includes ename:VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT,
1834e5c31af7Sopenharmony_ci    ename:VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT,
1835e5c31af7Sopenharmony_ci    ename:VK_IMAGE_USAGE_TRANSIENT_ATTACHMENT_BIT, or
1836e5c31af7Sopenharmony_ci    ename:VK_IMAGE_USAGE_INPUT_ATTACHMENT_BIT, pname:extent.height must: be
1837e5c31af7Sopenharmony_ci    less than or equal to
1838e5c31af7Sopenharmony_ci    sname:VkPhysicalDeviceLimits::pname:maxFramebufferHeight
1839e5c31af7Sopenharmony_ciifdef::VK_EXT_fragment_density_map[]
1840e5c31af7Sopenharmony_ciifndef::VK_QCOM_fragment_density_map_offset[]
1841e5c31af7Sopenharmony_ci  * [[VUID-VkImageCreateInfo-usage-02559]]
1842e5c31af7Sopenharmony_ci    If pname:usage includes
1843e5c31af7Sopenharmony_ci    ename:VK_IMAGE_USAGE_FRAGMENT_DENSITY_MAP_BIT_EXT, pname:extent.width
1844e5c31af7Sopenharmony_ci    must: be less than or equal to
1845e5c31af7Sopenharmony_ci    latexmath:[\left\lceil{\frac{maxFramebufferWidth}{minFragmentDensityTexelSize_{width}}}\right\rceil]
1846e5c31af7Sopenharmony_ci  * [[VUID-VkImageCreateInfo-usage-02560]]
1847e5c31af7Sopenharmony_ci    If pname:usage includes
1848e5c31af7Sopenharmony_ci    ename:VK_IMAGE_USAGE_FRAGMENT_DENSITY_MAP_BIT_EXT, pname:extent.height
1849e5c31af7Sopenharmony_ci    must: be less than or equal to
1850e5c31af7Sopenharmony_ci    latexmath:[\left\lceil{\frac{maxFramebufferHeight}{minFragmentDensityTexelSize_{height}}}\right\rceil]
1851e5c31af7Sopenharmony_ciendif::VK_QCOM_fragment_density_map_offset[]
1852e5c31af7Sopenharmony_ciifdef::VK_QCOM_fragment_density_map_offset[]
1853e5c31af7Sopenharmony_ci  * [[VUID-VkImageCreateInfo-fragmentDensityMapOffset-06514]]
1854e5c31af7Sopenharmony_ci    If the <<features-fragmentDensityMapOffsets,
1855e5c31af7Sopenharmony_ci    pname:fragmentDensityMapOffset>> feature is not enabled and pname:usage
1856e5c31af7Sopenharmony_ci    includes ename:VK_IMAGE_USAGE_FRAGMENT_DENSITY_MAP_BIT_EXT,
1857e5c31af7Sopenharmony_ci    pname:extent.width must: be less than or equal to
1858e5c31af7Sopenharmony_ci    latexmath:[\left\lceil{\frac{maxFramebufferWidth}{minFragmentDensityTexelSize_{width}}}\right\rceil]
1859e5c31af7Sopenharmony_ci  * [[VUID-VkImageCreateInfo-fragmentDensityMapOffset-06515]]
1860e5c31af7Sopenharmony_ci    If the <<features-fragmentDensityMapOffsets,
1861e5c31af7Sopenharmony_ci    pname:fragmentDensityMapOffset>> feature is not enabled and pname:usage
1862e5c31af7Sopenharmony_ci    includes ename:VK_IMAGE_USAGE_FRAGMENT_DENSITY_MAP_BIT_EXT,
1863e5c31af7Sopenharmony_ci    pname:extent.height must: be less than or equal to
1864e5c31af7Sopenharmony_ci    latexmath:[\left\lceil{\frac{maxFramebufferHeight}{minFragmentDensityTexelSize_{height}}}\right\rceil]
1865e5c31af7Sopenharmony_ciendif::VK_QCOM_fragment_density_map_offset[]
1866e5c31af7Sopenharmony_ciendif::VK_EXT_fragment_density_map[]
1867e5c31af7Sopenharmony_ci  * [[VUID-VkImageCreateInfo-usage-00966]]
1868e5c31af7Sopenharmony_ci    If pname:usage includes ename:VK_IMAGE_USAGE_TRANSIENT_ATTACHMENT_BIT,
1869e5c31af7Sopenharmony_ci    pname:usage must: also contain at least one of
1870e5c31af7Sopenharmony_ci    ename:VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT,
1871e5c31af7Sopenharmony_ci    ename:VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT, or
1872e5c31af7Sopenharmony_ci    ename:VK_IMAGE_USAGE_INPUT_ATTACHMENT_BIT
1873e5c31af7Sopenharmony_ci  * [[VUID-VkImageCreateInfo-samples-02258]]
1874e5c31af7Sopenharmony_ci    pname:samples must: be a valid elink:VkSampleCountFlagBits value that is
1875e5c31af7Sopenharmony_ci    set in pname:imageCreateSampleCounts (as defined in
1876e5c31af7Sopenharmony_ci    <<resources-image-creation-limits,Image Creation Limits>>)
1877e5c31af7Sopenharmony_ci  * [[VUID-VkImageCreateInfo-usage-00968]]
1878e5c31af7Sopenharmony_ci    If the <<features-shaderStorageImageMultisample,
1879e5c31af7Sopenharmony_ci    pname:shaderStorageImageMultisample>> feature is not enabled, and
1880e5c31af7Sopenharmony_ci    pname:usage contains ename:VK_IMAGE_USAGE_STORAGE_BIT, pname:samples
1881e5c31af7Sopenharmony_ci    must: be ename:VK_SAMPLE_COUNT_1_BIT
1882e5c31af7Sopenharmony_ciifndef::VKSC_VERSION_1_0[]
1883e5c31af7Sopenharmony_ci  * [[VUID-VkImageCreateInfo-flags-00969]]
1884e5c31af7Sopenharmony_ci    If the <<features-sparseBinding, pname:sparseBinding>> feature is not
1885e5c31af7Sopenharmony_ci    enabled, pname:flags must: not contain
1886e5c31af7Sopenharmony_ci    ename:VK_IMAGE_CREATE_SPARSE_BINDING_BIT
1887e5c31af7Sopenharmony_ci  * [[VUID-VkImageCreateInfo-flags-01924]]
1888e5c31af7Sopenharmony_ci    If the <<features-sparseResidencyAliased, pname:sparseResidencyAliased>>
1889e5c31af7Sopenharmony_ci    feature is not enabled, pname:flags must: not contain
1890e5c31af7Sopenharmony_ci    ename:VK_IMAGE_CREATE_SPARSE_ALIASED_BIT
1891e5c31af7Sopenharmony_ci  * [[VUID-VkImageCreateInfo-tiling-04121]]
1892e5c31af7Sopenharmony_ci    If pname:tiling is ename:VK_IMAGE_TILING_LINEAR, pname:flags must: not
1893e5c31af7Sopenharmony_ci    contain ename:VK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT
1894e5c31af7Sopenharmony_ci  * [[VUID-VkImageCreateInfo-imageType-00970]]
1895e5c31af7Sopenharmony_ci    If pname:imageType is ename:VK_IMAGE_TYPE_1D, pname:flags must: not
1896e5c31af7Sopenharmony_ci    contain ename:VK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT
1897e5c31af7Sopenharmony_ci  * [[VUID-VkImageCreateInfo-imageType-00971]]
1898e5c31af7Sopenharmony_ci    If the <<features-sparseResidencyImage2D, pname:sparseResidencyImage2D>>
1899e5c31af7Sopenharmony_ci    feature is not enabled, and pname:imageType is ename:VK_IMAGE_TYPE_2D,
1900e5c31af7Sopenharmony_ci    pname:flags must: not contain ename:VK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT
1901e5c31af7Sopenharmony_ci  * [[VUID-VkImageCreateInfo-imageType-00972]]
1902e5c31af7Sopenharmony_ci    If the <<features-sparseResidencyImage3D, pname:sparseResidencyImage3D>>
1903e5c31af7Sopenharmony_ci    feature is not enabled, and pname:imageType is ename:VK_IMAGE_TYPE_3D,
1904e5c31af7Sopenharmony_ci    pname:flags must: not contain ename:VK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT
1905e5c31af7Sopenharmony_ci  * [[VUID-VkImageCreateInfo-imageType-00973]]
1906e5c31af7Sopenharmony_ci    If the <<features-sparseResidency2Samples,
1907e5c31af7Sopenharmony_ci    pname:sparseResidency2Samples>> feature is not enabled, pname:imageType
1908e5c31af7Sopenharmony_ci    is ename:VK_IMAGE_TYPE_2D, and pname:samples is
1909e5c31af7Sopenharmony_ci    ename:VK_SAMPLE_COUNT_2_BIT, pname:flags must: not contain
1910e5c31af7Sopenharmony_ci    ename:VK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT
1911e5c31af7Sopenharmony_ci  * [[VUID-VkImageCreateInfo-imageType-00974]]
1912e5c31af7Sopenharmony_ci    If the <<features-sparseResidency4Samples,
1913e5c31af7Sopenharmony_ci    pname:sparseResidency4Samples>> feature is not enabled, pname:imageType
1914e5c31af7Sopenharmony_ci    is ename:VK_IMAGE_TYPE_2D, and pname:samples is
1915e5c31af7Sopenharmony_ci    ename:VK_SAMPLE_COUNT_4_BIT, pname:flags must: not contain
1916e5c31af7Sopenharmony_ci    ename:VK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT
1917e5c31af7Sopenharmony_ci  * [[VUID-VkImageCreateInfo-imageType-00975]]
1918e5c31af7Sopenharmony_ci    If the <<features-sparseResidency8Samples,
1919e5c31af7Sopenharmony_ci    pname:sparseResidency8Samples>> feature is not enabled, pname:imageType
1920e5c31af7Sopenharmony_ci    is ename:VK_IMAGE_TYPE_2D, and pname:samples is
1921e5c31af7Sopenharmony_ci    ename:VK_SAMPLE_COUNT_8_BIT, pname:flags must: not contain
1922e5c31af7Sopenharmony_ci    ename:VK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT
1923e5c31af7Sopenharmony_ci  * [[VUID-VkImageCreateInfo-imageType-00976]]
1924e5c31af7Sopenharmony_ci    If the <<features-sparseResidency16Samples,
1925e5c31af7Sopenharmony_ci    pname:sparseResidency16Samples>> feature is not enabled, pname:imageType
1926e5c31af7Sopenharmony_ci    is ename:VK_IMAGE_TYPE_2D, and pname:samples is
1927e5c31af7Sopenharmony_ci    ename:VK_SAMPLE_COUNT_16_BIT, pname:flags must: not contain
1928e5c31af7Sopenharmony_ci    ename:VK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT
1929e5c31af7Sopenharmony_ci  * [[VUID-VkImageCreateInfo-flags-00987]]
1930e5c31af7Sopenharmony_ci    If pname:flags contains ename:VK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT or
1931e5c31af7Sopenharmony_ci    ename:VK_IMAGE_CREATE_SPARSE_ALIASED_BIT, it must: also contain
1932e5c31af7Sopenharmony_ci    ename:VK_IMAGE_CREATE_SPARSE_BINDING_BIT
1933e5c31af7Sopenharmony_ci  * [[VUID-VkImageCreateInfo-None-01925]]
1934e5c31af7Sopenharmony_ci    If any of the bits ename:VK_IMAGE_CREATE_SPARSE_BINDING_BIT,
1935e5c31af7Sopenharmony_ci    ename:VK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT, or
1936e5c31af7Sopenharmony_ci    ename:VK_IMAGE_CREATE_SPARSE_ALIASED_BIT are set,
1937e5c31af7Sopenharmony_ci    ename:VK_IMAGE_USAGE_TRANSIENT_ATTACHMENT_BIT must: not also be set
1938e5c31af7Sopenharmony_ciendif::VKSC_VERSION_1_0[]
1939e5c31af7Sopenharmony_ciifdef::VKSC_VERSION_1_0[]
1940e5c31af7Sopenharmony_ci  * [[VUID-VkImageCreateInfo-flags-05062]]
1941e5c31af7Sopenharmony_ci    pname:flags must: not contain ename:VK_IMAGE_CREATE_SPARSE_BINDING_BIT,
1942e5c31af7Sopenharmony_ci    ename:VK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT,
1943e5c31af7Sopenharmony_ci    ename:VK_IMAGE_CREATE_SPARSE_ALIASED_BIT, or
1944e5c31af7Sopenharmony_ci    ename:VK_IMAGE_CREATE_SPLIT_INSTANCE_BIND_REGIONS_BIT
1945e5c31af7Sopenharmony_ciendif::VKSC_VERSION_1_0[]
1946e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_1[]
1947e5c31af7Sopenharmony_ci  * [[VUID-VkImageCreateInfo-flags-01890]]
1948e5c31af7Sopenharmony_ci    If the <<features-protectedMemory, pname:protectedMemory>> feature is
1949e5c31af7Sopenharmony_ci    not enabled, pname:flags must: not contain
1950e5c31af7Sopenharmony_ci    ename:VK_IMAGE_CREATE_PROTECTED_BIT
1951e5c31af7Sopenharmony_ciifndef::VKSC_VERSION_1_0[]
1952e5c31af7Sopenharmony_ci  * [[VUID-VkImageCreateInfo-None-01891]]
1953e5c31af7Sopenharmony_ci    If any of the bits ename:VK_IMAGE_CREATE_SPARSE_BINDING_BIT,
1954e5c31af7Sopenharmony_ci    ename:VK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT, or
1955e5c31af7Sopenharmony_ci    ename:VK_IMAGE_CREATE_SPARSE_ALIASED_BIT are set,
1956e5c31af7Sopenharmony_ci    ename:VK_IMAGE_CREATE_PROTECTED_BIT must: not also be set
1957e5c31af7Sopenharmony_ciendif::VKSC_VERSION_1_0[]
1958e5c31af7Sopenharmony_ciendif::VK_VERSION_1_1[]
1959e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_1,VK_KHR_external_memory[]
1960e5c31af7Sopenharmony_ciifdef::VK_NV_external_memory[]
1961e5c31af7Sopenharmony_ci  * [[VUID-VkImageCreateInfo-pNext-00988]]
1962e5c31af7Sopenharmony_ci    If the pname:pNext chain includes a
1963e5c31af7Sopenharmony_ci    slink:VkExternalMemoryImageCreateInfoNV structure, it must: not contain
1964e5c31af7Sopenharmony_ci    a slink:VkExternalMemoryImageCreateInfo structure
1965e5c31af7Sopenharmony_ciendif::VK_NV_external_memory[]
1966e5c31af7Sopenharmony_ci  * [[VUID-VkImageCreateInfo-pNext-00990]]
1967e5c31af7Sopenharmony_ci    If the pname:pNext chain includes a
1968e5c31af7Sopenharmony_ci    slink:VkExternalMemoryImageCreateInfo structure, its pname:handleTypes
1969e5c31af7Sopenharmony_ci    member must: only contain bits that are also in
1970e5c31af7Sopenharmony_ci    slink:VkExternalImageFormatProperties::pname:externalMemoryProperties.compatibleHandleTypes,
1971e5c31af7Sopenharmony_ci    as returned by flink:vkGetPhysicalDeviceImageFormatProperties2 with
1972e5c31af7Sopenharmony_ci    pname:format, pname:imageType, pname:tiling, pname:usage, and
1973e5c31af7Sopenharmony_ci    pname:flags equal to those in this structure, and with a
1974e5c31af7Sopenharmony_ci    slink:VkPhysicalDeviceExternalImageFormatInfo structure included in the
1975e5c31af7Sopenharmony_ci    pname:pNext chain, with a pname:handleType equal to any one of the
1976e5c31af7Sopenharmony_ci    handle types specified in
1977e5c31af7Sopenharmony_ci    slink:VkExternalMemoryImageCreateInfo::pname:handleTypes
1978e5c31af7Sopenharmony_ciendif::VK_VERSION_1_1,VK_KHR_external_memory[]
1979e5c31af7Sopenharmony_ciifdef::VK_NV_external_memory+VK_NV_external_memory_capabilities[]
1980e5c31af7Sopenharmony_ci  * [[VUID-VkImageCreateInfo-pNext-00991]]
1981e5c31af7Sopenharmony_ci    If the pname:pNext chain includes a
1982e5c31af7Sopenharmony_ci    slink:VkExternalMemoryImageCreateInfoNV structure, its pname:handleTypes
1983e5c31af7Sopenharmony_ci    member must: only contain bits that are also in
1984e5c31af7Sopenharmony_ci    slink:VkExternalImageFormatPropertiesNV::pname:externalMemoryProperties.compatibleHandleTypes,
1985e5c31af7Sopenharmony_ci    as returned by flink:vkGetPhysicalDeviceExternalImageFormatPropertiesNV
1986e5c31af7Sopenharmony_ci    with pname:format, pname:imageType, pname:tiling, pname:usage, and
1987e5c31af7Sopenharmony_ci    pname:flags equal to those in this structure, and with
1988e5c31af7Sopenharmony_ci    pname:externalHandleType equal to any one of the handle types specified
1989e5c31af7Sopenharmony_ci    in slink:VkExternalMemoryImageCreateInfoNV::pname:handleTypes
1990e5c31af7Sopenharmony_ciendif::VK_NV_external_memory+VK_NV_external_memory_capabilities[]
1991e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_1,VK_KHR_device_group[]
1992e5c31af7Sopenharmony_ciifndef::VKSC_VERSION_1_0[]
1993e5c31af7Sopenharmony_ci  * [[VUID-VkImageCreateInfo-physicalDeviceCount-01421]]
1994e5c31af7Sopenharmony_ci    If the logical device was created with
1995e5c31af7Sopenharmony_ci    slink:VkDeviceGroupDeviceCreateInfo::pname:physicalDeviceCount equal to
1996e5c31af7Sopenharmony_ci    1, pname:flags must: not contain
1997e5c31af7Sopenharmony_ci    ename:VK_IMAGE_CREATE_SPLIT_INSTANCE_BIND_REGIONS_BIT
1998e5c31af7Sopenharmony_ci  * [[VUID-VkImageCreateInfo-flags-02259]]
1999e5c31af7Sopenharmony_ci    If pname:flags contains
2000e5c31af7Sopenharmony_ci    ename:VK_IMAGE_CREATE_SPLIT_INSTANCE_BIND_REGIONS_BIT, then
2001e5c31af7Sopenharmony_ci    pname:mipLevels must: be one, pname:arrayLayers must: be one,
2002e5c31af7Sopenharmony_ci    pname:imageType must: be ename:VK_IMAGE_TYPE_2D.
2003e5c31af7Sopenharmony_ci    and pname:imageCreateMaybeLinear (as defined in
2004e5c31af7Sopenharmony_ci    <<resources-image-creation-limits,Image Creation Limits>>) must: be
2005e5c31af7Sopenharmony_ci    ename:VK_FALSE
2006e5c31af7Sopenharmony_ciendif::VKSC_VERSION_1_0[]
2007e5c31af7Sopenharmony_ciendif::VK_VERSION_1_1,VK_KHR_device_group[]
2008e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_1,VK_KHR_maintenance2[]
2009e5c31af7Sopenharmony_ci  * [[VUID-VkImageCreateInfo-flags-01572]]
2010e5c31af7Sopenharmony_ci    If pname:flags contains
2011e5c31af7Sopenharmony_ci    ename:VK_IMAGE_CREATE_BLOCK_TEXEL_VIEW_COMPATIBLE_BIT, then pname:format
2012e5c31af7Sopenharmony_ci    must: be a <<compressed_image_formats,compressed image format>>
2013e5c31af7Sopenharmony_ci  * [[VUID-VkImageCreateInfo-flags-01573]]
2014e5c31af7Sopenharmony_ci    If pname:flags contains
2015e5c31af7Sopenharmony_ci    ename:VK_IMAGE_CREATE_BLOCK_TEXEL_VIEW_COMPATIBLE_BIT, then pname:flags
2016e5c31af7Sopenharmony_ci    must: also contain ename:VK_IMAGE_CREATE_MUTABLE_FORMAT_BIT
2017e5c31af7Sopenharmony_ciendif::VK_VERSION_1_1,VK_KHR_maintenance2[]
2018e5c31af7Sopenharmony_ci  * [[VUID-VkImageCreateInfo-initialLayout-00993]]
2019e5c31af7Sopenharmony_ci    pname:initialLayout must: be ename:VK_IMAGE_LAYOUT_UNDEFINED or
2020e5c31af7Sopenharmony_ci    ename:VK_IMAGE_LAYOUT_PREINITIALIZED
2021e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_1,VK_KHR_external_memory,VK_NV_external_memory[]
2022e5c31af7Sopenharmony_ci  * [[VUID-VkImageCreateInfo-pNext-01443]]
2023e5c31af7Sopenharmony_ci    If the pname:pNext chain includes a
2024e5c31af7Sopenharmony_ci    slink:VkExternalMemoryImageCreateInfo or
2025e5c31af7Sopenharmony_ci    sname:VkExternalMemoryImageCreateInfoNV structure whose
2026e5c31af7Sopenharmony_ci    pname:handleTypes member is not `0`, pname:initialLayout must: be
2027e5c31af7Sopenharmony_ci    ename:VK_IMAGE_LAYOUT_UNDEFINED
2028e5c31af7Sopenharmony_ciendif::VK_VERSION_1_1,VK_KHR_external_memory,VK_NV_external_memory[]
2029e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_1,VK_KHR_sampler_ycbcr_conversion[]
2030e5c31af7Sopenharmony_ci  * [[VUID-VkImageCreateInfo-format-06410]]
2031e5c31af7Sopenharmony_ci    If the image pname:format is one of the
2032e5c31af7Sopenharmony_ci    <<formats-requiring-sampler-ycbcr-conversion, formats that require a
2033e5c31af7Sopenharmony_ci    sampler {YCbCr} conversion>>, pname:mipLevels must: be 1
2034e5c31af7Sopenharmony_ci  * [[VUID-VkImageCreateInfo-format-06411]]
2035e5c31af7Sopenharmony_ci    If the image pname:format is one of the
2036e5c31af7Sopenharmony_ci    <<formats-requiring-sampler-ycbcr-conversion, formats that require a
2037e5c31af7Sopenharmony_ci    sampler {YCbCr} conversion>>, pname:samples must: be
2038e5c31af7Sopenharmony_ci    ename:VK_SAMPLE_COUNT_1_BIT
2039e5c31af7Sopenharmony_ci  * [[VUID-VkImageCreateInfo-format-06412]]
2040e5c31af7Sopenharmony_ci    If the image pname:format is one of the
2041e5c31af7Sopenharmony_ci    <<formats-requiring-sampler-ycbcr-conversion, formats that require a
2042e5c31af7Sopenharmony_ci    sampler {YCbCr} conversion>>, pname:imageType must: be
2043e5c31af7Sopenharmony_ci    ename:VK_IMAGE_TYPE_2D
2044e5c31af7Sopenharmony_ci  * [[VUID-VkImageCreateInfo-imageCreateFormatFeatures-02260]]
2045e5c31af7Sopenharmony_ci    If pname:format is a _multi-planar_ format, and if
2046e5c31af7Sopenharmony_ci    pname:imageCreateFormatFeatures (as defined in
2047e5c31af7Sopenharmony_ci    <<resources-image-creation-limits,Image Creation Limits>>) does not
2048e5c31af7Sopenharmony_ci    contain ename:VK_FORMAT_FEATURE_DISJOINT_BIT, then pname:flags must: not
2049e5c31af7Sopenharmony_ci    contain ename:VK_IMAGE_CREATE_DISJOINT_BIT
2050e5c31af7Sopenharmony_ci  * [[VUID-VkImageCreateInfo-format-01577]]
2051e5c31af7Sopenharmony_ci    If pname:format is not a _multi-planar_ format, and pname:flags does not
2052e5c31af7Sopenharmony_ci    include ename:VK_IMAGE_CREATE_ALIAS_BIT, pname:flags must: not contain
2053e5c31af7Sopenharmony_ci    ename:VK_IMAGE_CREATE_DISJOINT_BIT
2054e5c31af7Sopenharmony_ci  * [[VUID-VkImageCreateInfo-format-04712]]
2055e5c31af7Sopenharmony_ci    If pname:format has a code:_422 or code:_420 suffix, pname:width must:
2056e5c31af7Sopenharmony_ci    be a multiple of 2
2057e5c31af7Sopenharmony_ci  * [[VUID-VkImageCreateInfo-format-04713]]
2058e5c31af7Sopenharmony_ci    If pname:format has a code:_420 suffix, pname:height must: be a multiple
2059e5c31af7Sopenharmony_ci    of 2
2060e5c31af7Sopenharmony_ciendif::VK_VERSION_1_1,VK_KHR_sampler_ycbcr_conversion[]
2061e5c31af7Sopenharmony_ciifdef::VK_EXT_image_drm_format_modifier[]
2062e5c31af7Sopenharmony_ci  * [[VUID-VkImageCreateInfo-tiling-02261]]
2063e5c31af7Sopenharmony_ci    If pname:tiling is ename:VK_IMAGE_TILING_DRM_FORMAT_MODIFIER_EXT, then
2064e5c31af7Sopenharmony_ci    the pname:pNext chain must: include exactly one of
2065e5c31af7Sopenharmony_ci    slink:VkImageDrmFormatModifierListCreateInfoEXT or
2066e5c31af7Sopenharmony_ci    slink:VkImageDrmFormatModifierExplicitCreateInfoEXT structures
2067e5c31af7Sopenharmony_ci  * [[VUID-VkImageCreateInfo-pNext-02262]]
2068e5c31af7Sopenharmony_ci    If the pname:pNext chain includes a
2069e5c31af7Sopenharmony_ci    slink:VkImageDrmFormatModifierListCreateInfoEXT or
2070e5c31af7Sopenharmony_ci    slink:VkImageDrmFormatModifierExplicitCreateInfoEXT structure, then
2071e5c31af7Sopenharmony_ci    pname:tiling must: be ename:VK_IMAGE_TILING_DRM_FORMAT_MODIFIER_EXT
2072e5c31af7Sopenharmony_ci  * [[VUID-VkImageCreateInfo-tiling-02353]]
2073e5c31af7Sopenharmony_ci    If pname:tiling is ename:VK_IMAGE_TILING_DRM_FORMAT_MODIFIER_EXT and
2074e5c31af7Sopenharmony_ci    pname:flags contains ename:VK_IMAGE_CREATE_MUTABLE_FORMAT_BIT, then the
2075e5c31af7Sopenharmony_ci    pname:pNext chain must: include a slink:VkImageFormatListCreateInfo
2076e5c31af7Sopenharmony_ci    structure with non-zero pname:viewFormatCount
2077e5c31af7Sopenharmony_ciendif::VK_EXT_image_drm_format_modifier[]
2078e5c31af7Sopenharmony_ciifdef::VK_EXT_sample_locations[]
2079e5c31af7Sopenharmony_ci  * [[VUID-VkImageCreateInfo-flags-01533]]
2080e5c31af7Sopenharmony_ci    If pname:flags contains
2081e5c31af7Sopenharmony_ci    ename:VK_IMAGE_CREATE_SAMPLE_LOCATIONS_COMPATIBLE_DEPTH_BIT_EXT
2082e5c31af7Sopenharmony_ci    pname:format must: be a depth or depth/stencil format
2083e5c31af7Sopenharmony_ciendif::VK_EXT_sample_locations[]
2084e5c31af7Sopenharmony_ciifdef::VK_ANDROID_external_memory_android_hardware_buffer[]
2085e5c31af7Sopenharmony_ci  * [[VUID-VkImageCreateInfo-pNext-02393]]
2086e5c31af7Sopenharmony_ci    If the pname:pNext chain includes a
2087e5c31af7Sopenharmony_ci    slink:VkExternalMemoryImageCreateInfo structure whose pname:handleTypes
2088e5c31af7Sopenharmony_ci    member includes
2089e5c31af7Sopenharmony_ci    ename:VK_EXTERNAL_MEMORY_HANDLE_TYPE_ANDROID_HARDWARE_BUFFER_BIT_ANDROID,
2090e5c31af7Sopenharmony_ci    pname:imageType must: be ename:VK_IMAGE_TYPE_2D
2091e5c31af7Sopenharmony_ci  * [[VUID-VkImageCreateInfo-pNext-02394]]
2092e5c31af7Sopenharmony_ci    If the pname:pNext chain includes a
2093e5c31af7Sopenharmony_ci    slink:VkExternalMemoryImageCreateInfo structure whose pname:handleTypes
2094e5c31af7Sopenharmony_ci    member includes
2095e5c31af7Sopenharmony_ci    ename:VK_EXTERNAL_MEMORY_HANDLE_TYPE_ANDROID_HARDWARE_BUFFER_BIT_ANDROID,
2096e5c31af7Sopenharmony_ci    pname:mipLevels must: either be `1` or equal to the number of levels in
2097e5c31af7Sopenharmony_ci    the complete mipmap chain based on [eq]#pname:extent.width#,
2098e5c31af7Sopenharmony_ci    [eq]#pname:extent.height#, and [eq]#pname:extent.depth#
2099e5c31af7Sopenharmony_ci  * [[VUID-VkImageCreateInfo-pNext-02396]]
2100e5c31af7Sopenharmony_ci    If the pname:pNext chain includes a slink:VkExternalFormatANDROID
2101e5c31af7Sopenharmony_ci    structure whose pname:externalFormat member is not `0`, pname:flags
2102e5c31af7Sopenharmony_ci    must: not include ename:VK_IMAGE_CREATE_MUTABLE_FORMAT_BIT
2103e5c31af7Sopenharmony_ci  * [[VUID-VkImageCreateInfo-pNext-02397]]
2104e5c31af7Sopenharmony_ci    If the pname:pNext chain includes a slink:VkExternalFormatANDROID
2105e5c31af7Sopenharmony_ci    structure whose pname:externalFormat member is not `0`, pname:usage
2106e5c31af7Sopenharmony_ci    must: not include any usages except
2107e5c31af7Sopenharmony_ciifdef::VK_ANDROID_external_format_resolve[]
2108e5c31af7Sopenharmony_ci    ename:VK_IMAGE_USAGE_INPUT_ATTACHMENT_BIT,
2109e5c31af7Sopenharmony_ci    ename:VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT, or
2110e5c31af7Sopenharmony_ciendif::VK_ANDROID_external_format_resolve[]
2111e5c31af7Sopenharmony_ci    ename:VK_IMAGE_USAGE_SAMPLED_BIT
2112e5c31af7Sopenharmony_ciifdef::VK_ANDROID_external_format_resolve[]
2113e5c31af7Sopenharmony_ci  * [[VUID-VkImageCreateInfo-pNext-09457]]
2114e5c31af7Sopenharmony_ci    If the pname:pNext chain includes a slink:VkExternalFormatANDROID
2115e5c31af7Sopenharmony_ci    structure whose pname:externalFormat member is not `0`, and
2116e5c31af7Sopenharmony_ci    <<features-externalFormatResolve, pname:externalFormatResolve>> feature
2117e5c31af7Sopenharmony_ci    is not enabled, pname:usage must: not include
2118e5c31af7Sopenharmony_ci    ename:VK_IMAGE_USAGE_INPUT_ATTACHMENT_BIT or
2119e5c31af7Sopenharmony_ci    ename:VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT
2120e5c31af7Sopenharmony_ciendif::VK_ANDROID_external_format_resolve[]
2121e5c31af7Sopenharmony_ci  * [[VUID-VkImageCreateInfo-pNext-02398]]
2122e5c31af7Sopenharmony_ci    If the pname:pNext chain includes a slink:VkExternalFormatANDROID
2123e5c31af7Sopenharmony_ci    structure whose pname:externalFormat member is not `0`, pname:tiling
2124e5c31af7Sopenharmony_ci    must: be ename:VK_IMAGE_TILING_OPTIMAL
2125e5c31af7Sopenharmony_ciendif::VK_ANDROID_external_memory_android_hardware_buffer[]
2126e5c31af7Sopenharmony_ciifdef::VK_QNX_external_memory_screen_buffer[]
2127e5c31af7Sopenharmony_ci  * [[VUID-VkImageCreateInfo-pNext-08951]]
2128e5c31af7Sopenharmony_ci    If the pname:pNext chain includes a
2129e5c31af7Sopenharmony_ci    slink:VkExternalMemoryImageCreateInfo structure whose pname:handleTypes
2130e5c31af7Sopenharmony_ci    member includes
2131e5c31af7Sopenharmony_ci    ename:VK_EXTERNAL_MEMORY_HANDLE_TYPE_SCREEN_BUFFER_BIT_QNX,
2132e5c31af7Sopenharmony_ci    pname:imageType must: be ename:VK_IMAGE_TYPE_2D
2133e5c31af7Sopenharmony_ci  * [[VUID-VkImageCreateInfo-pNext-08952]]
2134e5c31af7Sopenharmony_ci    If the pname:pNext chain includes a
2135e5c31af7Sopenharmony_ci    slink:VkExternalMemoryImageCreateInfo structure whose pname:handleTypes
2136e5c31af7Sopenharmony_ci    member includes
2137e5c31af7Sopenharmony_ci    ename:VK_EXTERNAL_MEMORY_HANDLE_TYPE_SCREEN_BUFFER_BIT_QNX,
2138e5c31af7Sopenharmony_ci    pname:mipLevels must: either be `1` or equal to the number of levels in
2139e5c31af7Sopenharmony_ci    the complete mipmap chain based on [eq]#pname:extent.width#,
2140e5c31af7Sopenharmony_ci    [eq]#pname:extent.height#, and [eq]#pname:extent.depth#
2141e5c31af7Sopenharmony_ci  * [[VUID-VkImageCreateInfo-pNext-08953]]
2142e5c31af7Sopenharmony_ci    If the pname:pNext chain includes a slink:VkExternalFormatQNX structure
2143e5c31af7Sopenharmony_ci    whose pname:externalFormat member is not `0`, pname:flags must: not
2144e5c31af7Sopenharmony_ci    include ename:VK_IMAGE_CREATE_MUTABLE_FORMAT_BIT
2145e5c31af7Sopenharmony_ci  * [[VUID-VkImageCreateInfo-pNext-08954]]
2146e5c31af7Sopenharmony_ci    If the pname:pNext chain includes a slink:VkExternalFormatQNX structure
2147e5c31af7Sopenharmony_ci    whose pname:externalFormat member is not `0`, pname:usage must: not
2148e5c31af7Sopenharmony_ci    include any usages except ename:VK_IMAGE_USAGE_SAMPLED_BIT
2149e5c31af7Sopenharmony_ci  * [[VUID-VkImageCreateInfo-pNext-08955]]
2150e5c31af7Sopenharmony_ci    If the pname:pNext chain includes a slink:VkExternalFormatQNX structure
2151e5c31af7Sopenharmony_ci    whose pname:externalFormat member is not `0`, pname:tiling must: be
2152e5c31af7Sopenharmony_ci    ename:VK_IMAGE_TILING_OPTIMAL
2153e5c31af7Sopenharmony_ciendif::VK_QNX_external_memory_screen_buffer[]
2154e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_2,VK_EXT_separate_stencil_usage[]
2155e5c31af7Sopenharmony_ci  * [[VUID-VkImageCreateInfo-format-02795]]
2156e5c31af7Sopenharmony_ci    If pname:format is a depth-stencil format, pname:usage includes
2157e5c31af7Sopenharmony_ci    ename:VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT, and the pname:pNext
2158e5c31af7Sopenharmony_ci    chain includes a slink:VkImageStencilUsageCreateInfo structure, then its
2159e5c31af7Sopenharmony_ci    slink:VkImageStencilUsageCreateInfo::pname:stencilUsage member must:
2160e5c31af7Sopenharmony_ci    also include ename:VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT
2161e5c31af7Sopenharmony_ci  * [[VUID-VkImageCreateInfo-format-02796]]
2162e5c31af7Sopenharmony_ci    If pname:format is a depth-stencil format, pname:usage does not include
2163e5c31af7Sopenharmony_ci    ename:VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT, and the pname:pNext
2164e5c31af7Sopenharmony_ci    chain includes a slink:VkImageStencilUsageCreateInfo structure, then its
2165e5c31af7Sopenharmony_ci    slink:VkImageStencilUsageCreateInfo::pname:stencilUsage member must:
2166e5c31af7Sopenharmony_ci    also not include ename:VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT
2167e5c31af7Sopenharmony_ci  * [[VUID-VkImageCreateInfo-format-02797]]
2168e5c31af7Sopenharmony_ci    If pname:format is a depth-stencil format, pname:usage includes
2169e5c31af7Sopenharmony_ci    ename:VK_IMAGE_USAGE_TRANSIENT_ATTACHMENT_BIT, and the pname:pNext chain
2170e5c31af7Sopenharmony_ci    includes a slink:VkImageStencilUsageCreateInfo structure, then its
2171e5c31af7Sopenharmony_ci    slink:VkImageStencilUsageCreateInfo::pname:stencilUsage member must:
2172e5c31af7Sopenharmony_ci    also include ename:VK_IMAGE_USAGE_TRANSIENT_ATTACHMENT_BIT
2173e5c31af7Sopenharmony_ci  * [[VUID-VkImageCreateInfo-format-02798]]
2174e5c31af7Sopenharmony_ci    If pname:format is a depth-stencil format, pname:usage does not include
2175e5c31af7Sopenharmony_ci    ename:VK_IMAGE_USAGE_TRANSIENT_ATTACHMENT_BIT, and the pname:pNext chain
2176e5c31af7Sopenharmony_ci    includes a slink:VkImageStencilUsageCreateInfo structure, then its
2177e5c31af7Sopenharmony_ci    slink:VkImageStencilUsageCreateInfo::pname:stencilUsage member must:
2178e5c31af7Sopenharmony_ci    also not include ename:VK_IMAGE_USAGE_TRANSIENT_ATTACHMENT_BIT
2179e5c31af7Sopenharmony_ci  * [[VUID-VkImageCreateInfo-Format-02536]]
2180e5c31af7Sopenharmony_ci    If pname:Format is a depth-stencil format and the pname:pNext chain
2181e5c31af7Sopenharmony_ci    includes a slink:VkImageStencilUsageCreateInfo structure with its
2182e5c31af7Sopenharmony_ci    pname:stencilUsage member including
2183e5c31af7Sopenharmony_ci    ename:VK_IMAGE_USAGE_INPUT_ATTACHMENT_BIT, pname:extent.width must: be
2184e5c31af7Sopenharmony_ci    less than or equal to
2185e5c31af7Sopenharmony_ci    sname:VkPhysicalDeviceLimits::pname:maxFramebufferWidth
2186e5c31af7Sopenharmony_ci  * [[VUID-VkImageCreateInfo-format-02537]]
2187e5c31af7Sopenharmony_ci    If pname:format is a depth-stencil format and the pname:pNext chain
2188e5c31af7Sopenharmony_ci    includes a slink:VkImageStencilUsageCreateInfo structure with its
2189e5c31af7Sopenharmony_ci    pname:stencilUsage member including
2190e5c31af7Sopenharmony_ci    ename:VK_IMAGE_USAGE_INPUT_ATTACHMENT_BIT, pname:extent.height must: be
2191e5c31af7Sopenharmony_ci    less than or equal to
2192e5c31af7Sopenharmony_ci    sname:VkPhysicalDeviceLimits::pname:maxFramebufferHeight
2193e5c31af7Sopenharmony_ci  * [[VUID-VkImageCreateInfo-format-02538]]
2194e5c31af7Sopenharmony_ci    If the <<features-shaderStorageImageMultisample,
2195e5c31af7Sopenharmony_ci    pname:shaderStorageImageMultisample>> feature is not enabled,
2196e5c31af7Sopenharmony_ci    pname:format is a depth-stencil format and the pname:pNext chain
2197e5c31af7Sopenharmony_ci    includes a slink:VkImageStencilUsageCreateInfo structure with its
2198e5c31af7Sopenharmony_ci    pname:stencilUsage including ename:VK_IMAGE_USAGE_STORAGE_BIT,
2199e5c31af7Sopenharmony_ci    pname:samples must: be ename:VK_SAMPLE_COUNT_1_BIT
2200e5c31af7Sopenharmony_ciendif::VK_VERSION_1_2,VK_EXT_separate_stencil_usage[]
2201e5c31af7Sopenharmony_ciifdef::VK_NV_corner_sampled_image[]
2202e5c31af7Sopenharmony_ci  * [[VUID-VkImageCreateInfo-flags-02050]]
2203e5c31af7Sopenharmony_ci    If pname:flags contains ename:VK_IMAGE_CREATE_CORNER_SAMPLED_BIT_NV,
2204e5c31af7Sopenharmony_ci    pname:imageType must: be ename:VK_IMAGE_TYPE_2D or
2205e5c31af7Sopenharmony_ci    ename:VK_IMAGE_TYPE_3D
2206e5c31af7Sopenharmony_ci  * [[VUID-VkImageCreateInfo-flags-02051]]
2207e5c31af7Sopenharmony_ci    If pname:flags contains ename:VK_IMAGE_CREATE_CORNER_SAMPLED_BIT_NV, it
2208e5c31af7Sopenharmony_ci    must: not contain ename:VK_IMAGE_CREATE_CUBE_COMPATIBLE_BIT and the
2209e5c31af7Sopenharmony_ci    pname:format must: not be a depth/stencil format
2210e5c31af7Sopenharmony_ci  * [[VUID-VkImageCreateInfo-flags-02052]]
2211e5c31af7Sopenharmony_ci    If pname:flags contains ename:VK_IMAGE_CREATE_CORNER_SAMPLED_BIT_NV and
2212e5c31af7Sopenharmony_ci    pname:imageType is ename:VK_IMAGE_TYPE_2D, pname:extent.width and
2213e5c31af7Sopenharmony_ci    pname:extent.height must: be greater than `1`
2214e5c31af7Sopenharmony_ci  * [[VUID-VkImageCreateInfo-flags-02053]]
2215e5c31af7Sopenharmony_ci    If pname:flags contains ename:VK_IMAGE_CREATE_CORNER_SAMPLED_BIT_NV and
2216e5c31af7Sopenharmony_ci    pname:imageType is ename:VK_IMAGE_TYPE_3D, pname:extent.width,
2217e5c31af7Sopenharmony_ci    pname:extent.height, and pname:extent.depth must: be greater than `1`
2218e5c31af7Sopenharmony_ciendif::VK_NV_corner_sampled_image[]
2219e5c31af7Sopenharmony_ciifdef::VK_KHR_fragment_shading_rate,VK_NV_shading_rate_image[]
2220e5c31af7Sopenharmony_ci  * [[VUID-VkImageCreateInfo-imageType-02082]]
2221e5c31af7Sopenharmony_ci    If pname:usage includes
2222e5c31af7Sopenharmony_ci    ename:VK_IMAGE_USAGE_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR,
2223e5c31af7Sopenharmony_ci    pname:imageType must: be ename:VK_IMAGE_TYPE_2D
2224e5c31af7Sopenharmony_ci  * [[VUID-VkImageCreateInfo-samples-02083]]
2225e5c31af7Sopenharmony_ci    If pname:usage includes
2226e5c31af7Sopenharmony_ci    ename:VK_IMAGE_USAGE_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR,
2227e5c31af7Sopenharmony_ci    pname:samples must: be ename:VK_SAMPLE_COUNT_1_BIT
2228e5c31af7Sopenharmony_ciendif::VK_KHR_fragment_shading_rate,VK_NV_shading_rate_image[]
2229e5c31af7Sopenharmony_ciifdef::VK_NV_shading_rate_image[]
2230e5c31af7Sopenharmony_ci  * [[VUID-VkImageCreateInfo-shadingRateImage-07727]]
2231e5c31af7Sopenharmony_ci    If the <<features-shadingRateImage, pname:shadingRateImage>> feature is
2232e5c31af7Sopenharmony_ci    enabled and pname:usage includes
2233e5c31af7Sopenharmony_ci    ename:VK_IMAGE_USAGE_SHADING_RATE_IMAGE_BIT_NV, pname:tiling must: be
2234e5c31af7Sopenharmony_ci    ename:VK_IMAGE_TILING_OPTIMAL
2235e5c31af7Sopenharmony_ciendif::VK_NV_shading_rate_image[]
2236e5c31af7Sopenharmony_ciifdef::VK_EXT_fragment_density_map[]
2237e5c31af7Sopenharmony_ci  * [[VUID-VkImageCreateInfo-flags-02565]]
2238e5c31af7Sopenharmony_ci    If pname:flags contains ename:VK_IMAGE_CREATE_SUBSAMPLED_BIT_EXT,
2239e5c31af7Sopenharmony_ci    pname:tiling must: be ename:VK_IMAGE_TILING_OPTIMAL
2240e5c31af7Sopenharmony_ci  * [[VUID-VkImageCreateInfo-flags-02566]]
2241e5c31af7Sopenharmony_ci    If pname:flags contains ename:VK_IMAGE_CREATE_SUBSAMPLED_BIT_EXT,
2242e5c31af7Sopenharmony_ci    pname:imageType must: be ename:VK_IMAGE_TYPE_2D
2243e5c31af7Sopenharmony_ci  * [[VUID-VkImageCreateInfo-flags-02567]]
2244e5c31af7Sopenharmony_ci    If pname:flags contains ename:VK_IMAGE_CREATE_SUBSAMPLED_BIT_EXT,
2245e5c31af7Sopenharmony_ci    pname:flags must: not contain ename:VK_IMAGE_CREATE_CUBE_COMPATIBLE_BIT
2246e5c31af7Sopenharmony_ci  * [[VUID-VkImageCreateInfo-flags-02568]]
2247e5c31af7Sopenharmony_ci    If pname:flags contains ename:VK_IMAGE_CREATE_SUBSAMPLED_BIT_EXT,
2248e5c31af7Sopenharmony_ci    pname:mipLevels must: be `1`
2249e5c31af7Sopenharmony_ciendif::VK_EXT_fragment_density_map[]
2250e5c31af7Sopenharmony_ciifdef::VK_HUAWEI_invocation_mask[]
2251e5c31af7Sopenharmony_ci  * [[VUID-VkImageCreateInfo-usage-04992]]
2252e5c31af7Sopenharmony_ci    If pname:usage includes ename:VK_IMAGE_USAGE_INVOCATION_MASK_BIT_HUAWEI,
2253e5c31af7Sopenharmony_ci    pname:tiling must: be ename:VK_IMAGE_TILING_LINEAR
2254e5c31af7Sopenharmony_ciendif::VK_HUAWEI_invocation_mask[]
2255e5c31af7Sopenharmony_ciifdef::VK_KHR_portability_subset[]
2256e5c31af7Sopenharmony_ci  * [[VUID-VkImageCreateInfo-imageView2DOn3DImage-04459]]
2257e5c31af7Sopenharmony_ci    If the `apiext:VK_KHR_portability_subset` extension is enabled, and
2258e5c31af7Sopenharmony_ci    slink:VkPhysicalDevicePortabilitySubsetFeaturesKHR::pname:imageView2DOn3DImage
2259e5c31af7Sopenharmony_ci    is ename:VK_FALSE, pname:flags must: not contain
2260e5c31af7Sopenharmony_ci    ename:VK_IMAGE_CREATE_2D_ARRAY_COMPATIBLE_BIT
2261e5c31af7Sopenharmony_ci  * [[VUID-VkImageCreateInfo-multisampleArrayImage-04460]]
2262e5c31af7Sopenharmony_ci    If the `apiext:VK_KHR_portability_subset` extension is enabled, and
2263e5c31af7Sopenharmony_ci    slink:VkPhysicalDevicePortabilitySubsetFeaturesKHR::pname:multisampleArrayImage
2264e5c31af7Sopenharmony_ci    is ename:VK_FALSE, and pname:samples is not ename:VK_SAMPLE_COUNT_1_BIT,
2265e5c31af7Sopenharmony_ci    then pname:arrayLayers must: be `1`
2266e5c31af7Sopenharmony_ciendif::VK_KHR_portability_subset[]
2267e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_2,VK_KHR_image_format_list[]
2268e5c31af7Sopenharmony_ci  * [[VUID-VkImageCreateInfo-pNext-06722]]
2269e5c31af7Sopenharmony_ci    If a slink:VkImageFormatListCreateInfo structure was included in the
2270e5c31af7Sopenharmony_ci    pname:pNext chain and
2271e5c31af7Sopenharmony_ci    slink:VkImageFormatListCreateInfo::pname:viewFormatCount is not zero,
2272e5c31af7Sopenharmony_ci    then each format in
2273e5c31af7Sopenharmony_ci    slink:VkImageFormatListCreateInfo::pname:pViewFormats must: either be
2274e5c31af7Sopenharmony_ci    compatible with the pname:format as described in the
2275e5c31af7Sopenharmony_ci    <<formats-compatibility,compatibility table>> or, if pname:flags
2276e5c31af7Sopenharmony_ci    contains ename:VK_IMAGE_CREATE_BLOCK_TEXEL_VIEW_COMPATIBLE_BIT, be an
2277e5c31af7Sopenharmony_ci    uncompressed format that is size-compatible with pname:format
2278e5c31af7Sopenharmony_ci  * [[VUID-VkImageCreateInfo-flags-04738]]
2279e5c31af7Sopenharmony_ci    If pname:flags does not contain ename:VK_IMAGE_CREATE_MUTABLE_FORMAT_BIT
2280e5c31af7Sopenharmony_ci    and the pname:pNext chain includes a slink:VkImageFormatListCreateInfo
2281e5c31af7Sopenharmony_ci    structure, then slink:VkImageFormatListCreateInfo::pname:viewFormatCount
2282e5c31af7Sopenharmony_ci    must: be `0` or `1`
2283e5c31af7Sopenharmony_ciendif::VK_VERSION_1_2,VK_KHR_image_format_list[]
2284e5c31af7Sopenharmony_ciifdef::VK_KHR_video_decode_queue[]
2285e5c31af7Sopenharmony_ci  * [[VUID-VkImageCreateInfo-usage-04815]]
2286e5c31af7Sopenharmony_ci    If pname:usage includes ename:VK_IMAGE_USAGE_VIDEO_DECODE_SRC_BIT_KHR,
2287e5c31af7Sopenharmony_ci    ename:VK_IMAGE_USAGE_VIDEO_DECODE_DST_BIT_KHR, or
2288e5c31af7Sopenharmony_ci    ename:VK_IMAGE_USAGE_VIDEO_DECODE_DPB_BIT_KHR,
2289e5c31af7Sopenharmony_ciifdef::VK_KHR_video_maintenance1[]
2290e5c31af7Sopenharmony_ci    and pname:flags does not include
2291e5c31af7Sopenharmony_ci    ename:VK_IMAGE_CREATE_VIDEO_PROFILE_INDEPENDENT_BIT_KHR,
2292e5c31af7Sopenharmony_ciendif::VK_KHR_video_maintenance1[]
2293e5c31af7Sopenharmony_ci    then the pname:pNext chain must: include a
2294e5c31af7Sopenharmony_ci    slink:VkVideoProfileListInfoKHR structure with pname:profileCount
2295e5c31af7Sopenharmony_ci    greater than `0` and pname:pProfiles including at least one
2296e5c31af7Sopenharmony_ci    slink:VkVideoProfileInfoKHR structure with a pname:videoCodecOperation
2297e5c31af7Sopenharmony_ci    member specifying a decode operation
2298e5c31af7Sopenharmony_ciendif::VK_KHR_video_decode_queue[]
2299e5c31af7Sopenharmony_ciifdef::VK_KHR_video_encode_queue[]
2300e5c31af7Sopenharmony_ci  * [[VUID-VkImageCreateInfo-usage-04816]]
2301e5c31af7Sopenharmony_ci    If pname:usage includes ename:VK_IMAGE_USAGE_VIDEO_ENCODE_SRC_BIT_KHR,
2302e5c31af7Sopenharmony_ci    ename:VK_IMAGE_USAGE_VIDEO_ENCODE_DST_BIT_KHR, or
2303e5c31af7Sopenharmony_ci    ename:VK_IMAGE_USAGE_VIDEO_ENCODE_DPB_BIT_KHR,
2304e5c31af7Sopenharmony_ciifdef::VK_KHR_video_maintenance1[]
2305e5c31af7Sopenharmony_ci    and pname:flags does not include
2306e5c31af7Sopenharmony_ci    ename:VK_IMAGE_CREATE_VIDEO_PROFILE_INDEPENDENT_BIT_KHR,
2307e5c31af7Sopenharmony_ciendif::VK_KHR_video_maintenance1[]
2308e5c31af7Sopenharmony_ci    then the pname:pNext chain must: include a
2309e5c31af7Sopenharmony_ci    slink:VkVideoProfileListInfoKHR structure with pname:profileCount
2310e5c31af7Sopenharmony_ci    greater than `0` and pname:pProfiles including at least one
2311e5c31af7Sopenharmony_ci    slink:VkVideoProfileInfoKHR structure with a pname:videoCodecOperation
2312e5c31af7Sopenharmony_ci    member specifying an encode operation
2313e5c31af7Sopenharmony_ciendif::VK_KHR_video_encode_queue[]
2314e5c31af7Sopenharmony_ciifdef::VK_KHR_video_maintenance1[]
2315e5c31af7Sopenharmony_ci  * [[VUID-VkImageCreateInfo-flags-08328]]
2316e5c31af7Sopenharmony_ci    If pname:flags includes
2317e5c31af7Sopenharmony_ci    ename:VK_IMAGE_CREATE_VIDEO_PROFILE_INDEPENDENT_BIT_KHR, then
2318e5c31af7Sopenharmony_ci    <<features-videoMaintenance1,pname:videoMaintenance1>> must: be enabled
2319e5c31af7Sopenharmony_ciifdef::VK_KHR_video_decode_queue[]
2320e5c31af7Sopenharmony_ci  * [[VUID-VkImageCreateInfo-flags-08329]]
2321e5c31af7Sopenharmony_ci    If pname:flags includes
2322e5c31af7Sopenharmony_ci    ename:VK_IMAGE_CREATE_VIDEO_PROFILE_INDEPENDENT_BIT_KHR and pname:usage
2323e5c31af7Sopenharmony_ci    does not include ename:VK_IMAGE_USAGE_VIDEO_DECODE_DST_BIT_KHR, then
2324e5c31af7Sopenharmony_ci    pname:usage must: not include
2325e5c31af7Sopenharmony_ci    ename:VK_IMAGE_USAGE_VIDEO_DECODE_DPB_BIT_KHR
2326e5c31af7Sopenharmony_ciendif::VK_KHR_video_decode_queue[]
2327e5c31af7Sopenharmony_ciifdef::VK_KHR_video_encode_queue[]
2328e5c31af7Sopenharmony_ci  * [[VUID-VkImageCreateInfo-flags-08331]]
2329e5c31af7Sopenharmony_ci    If pname:flags includes
2330e5c31af7Sopenharmony_ci    ename:VK_IMAGE_CREATE_VIDEO_PROFILE_INDEPENDENT_BIT_KHR, then
2331e5c31af7Sopenharmony_ci    pname:usage must: not include
2332e5c31af7Sopenharmony_ci    ename:VK_IMAGE_USAGE_VIDEO_ENCODE_DPB_BIT_KHR
2333e5c31af7Sopenharmony_ciendif::VK_KHR_video_encode_queue[]
2334e5c31af7Sopenharmony_ciendif::VK_KHR_video_maintenance1[]
2335e5c31af7Sopenharmony_ciifdef::VK_KHR_video_queue[]
2336e5c31af7Sopenharmony_ci  * [[VUID-VkImageCreateInfo-pNext-06811]]
2337e5c31af7Sopenharmony_ci    If the pname:pNext chain includes a slink:VkVideoProfileListInfoKHR
2338e5c31af7Sopenharmony_ci    structure with pname:profileCount greater than `0`, then
2339e5c31af7Sopenharmony_ci    pname:supportedVideoFormat must: be ename:VK_TRUE
2340e5c31af7Sopenharmony_ciendif::VK_KHR_video_queue[]
2341e5c31af7Sopenharmony_ciifdef::VK_FUCHSIA_buffer_collection[]
2342e5c31af7Sopenharmony_ci  * [[VUID-VkImageCreateInfo-pNext-06390]]
2343e5c31af7Sopenharmony_ci    If the slink:VkImage is to be used to import memory from a
2344e5c31af7Sopenharmony_ci    slink:VkBufferCollectionFUCHSIA, a
2345e5c31af7Sopenharmony_ci    slink:VkBufferCollectionImageCreateInfoFUCHSIA structure must: be
2346e5c31af7Sopenharmony_ci    chained to pname:pNext
2347e5c31af7Sopenharmony_ciendif::VK_FUCHSIA_buffer_collection[]
2348e5c31af7Sopenharmony_ciifdef::VK_EXT_multisampled_render_to_single_sampled[]
2349e5c31af7Sopenharmony_ci  * [[VUID-VkImageCreateInfo-multisampledRenderToSingleSampled-06882]]
2350e5c31af7Sopenharmony_ci    If the <<features-multisampledRenderToSingleSampled,
2351e5c31af7Sopenharmony_ci    pname:multisampledRenderToSingleSampled>> feature is not enabled,
2352e5c31af7Sopenharmony_ci    pname:flags must: not contain
2353e5c31af7Sopenharmony_ci    ename:VK_IMAGE_CREATE_MULTISAMPLED_RENDER_TO_SINGLE_SAMPLED_BIT_EXT
2354e5c31af7Sopenharmony_ci  * [[VUID-VkImageCreateInfo-flags-06883]]
2355e5c31af7Sopenharmony_ci    If pname:flags contains
2356e5c31af7Sopenharmony_ci    ename:VK_IMAGE_CREATE_MULTISAMPLED_RENDER_TO_SINGLE_SAMPLED_BIT_EXT,
2357e5c31af7Sopenharmony_ci    pname:samples must: be ename:VK_SAMPLE_COUNT_1_BIT
2358e5c31af7Sopenharmony_ciendif::VK_EXT_multisampled_render_to_single_sampled[]
2359e5c31af7Sopenharmony_ciifdef::VK_EXT_image_compression_control[]
2360e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_1,VK_KHR_sampler_ycbcr_conversion[]
2361e5c31af7Sopenharmony_ci  * [[VUID-VkImageCreateInfo-pNext-06743]]
2362e5c31af7Sopenharmony_ci    If the pname:pNext chain includes a slink:VkImageCompressionControlEXT
2363e5c31af7Sopenharmony_ci    structure, pname:format is a
2364e5c31af7Sopenharmony_ci    <<formats-requiring-sampler-ycbcr-conversion,multi-planar>> format, and
2365e5c31af7Sopenharmony_ci    slink:VkImageCompressionControlEXT::pname:flags includes
2366e5c31af7Sopenharmony_ci    ename:VK_IMAGE_COMPRESSION_FIXED_RATE_EXPLICIT_EXT, then
2367e5c31af7Sopenharmony_ci    slink:VkImageCompressionControlEXT::pname:compressionControlPlaneCount
2368e5c31af7Sopenharmony_ci    must: be equal to the number of planes in pname:format
2369e5c31af7Sopenharmony_ci  * [[VUID-VkImageCreateInfo-pNext-06744]]
2370e5c31af7Sopenharmony_ci    If the pname:pNext chain includes a slink:VkImageCompressionControlEXT
2371e5c31af7Sopenharmony_ci    structure, pname:format is not a
2372e5c31af7Sopenharmony_ci    <<formats-requiring-sampler-ycbcr-conversion,multi-planar>> format, and
2373e5c31af7Sopenharmony_ci    slink:VkImageCompressionControlEXT::pname:flags includes
2374e5c31af7Sopenharmony_ci    ename:VK_IMAGE_COMPRESSION_FIXED_RATE_EXPLICIT_EXT, then
2375e5c31af7Sopenharmony_ci    slink:VkImageCompressionControlEXT::pname:compressionControlPlaneCount
2376e5c31af7Sopenharmony_ci    must: be 1
2377e5c31af7Sopenharmony_ciendif::VK_VERSION_1_1,VK_KHR_sampler_ycbcr_conversion[]
2378e5c31af7Sopenharmony_ciifndef::VK_VERSION_1_1,VK_KHR_sampler_ycbcr_conversion[]
2379e5c31af7Sopenharmony_ci  * [[VUID-VkImageCreateInfo-pNext-06745]]
2380e5c31af7Sopenharmony_ci    If the pname:pNext chain includes a slink:VkImageCompressionControlEXT
2381e5c31af7Sopenharmony_ci    structure, and slink:VkImageCompressionControlEXT::pname:flags includes
2382e5c31af7Sopenharmony_ci    ename:VK_IMAGE_COMPRESSION_FIXED_RATE_EXPLICIT_EXT, then
2383e5c31af7Sopenharmony_ci    slink:VkImageCompressionControlEXT::pname:compressionControlPlaneCount
2384e5c31af7Sopenharmony_ci    must: be 1
2385e5c31af7Sopenharmony_ciendif::VK_VERSION_1_1,VK_KHR_sampler_ycbcr_conversion[]
2386e5c31af7Sopenharmony_ciifdef::VK_EXT_image_drm_format_modifier[]
2387e5c31af7Sopenharmony_ci  * [[VUID-VkImageCreateInfo-pNext-06746]]
2388e5c31af7Sopenharmony_ci    If the pname:pNext chain includes a slink:VkImageCompressionControlEXT
2389e5c31af7Sopenharmony_ci    structure, it must: not contain a
2390e5c31af7Sopenharmony_ci    slink:VkImageDrmFormatModifierExplicitCreateInfoEXT structure
2391e5c31af7Sopenharmony_ciendif::VK_EXT_image_drm_format_modifier[]
2392e5c31af7Sopenharmony_ciendif::VK_EXT_image_compression_control[]
2393e5c31af7Sopenharmony_ciifdef::VK_EXT_descriptor_buffer[]
2394e5c31af7Sopenharmony_ci  * [[VUID-VkImageCreateInfo-flags-08104]]
2395e5c31af7Sopenharmony_ci    If pname:flags includes
2396e5c31af7Sopenharmony_ci    ename:VK_IMAGE_CREATE_DESCRIPTOR_BUFFER_CAPTURE_REPLAY_BIT_EXT, the
2397e5c31af7Sopenharmony_ci    <<features-descriptorBufferCaptureReplay,
2398e5c31af7Sopenharmony_ci    pname:descriptorBufferCaptureReplay>> feature must: be enabled
2399e5c31af7Sopenharmony_ci  * [[VUID-VkImageCreateInfo-pNext-08105]]
2400e5c31af7Sopenharmony_ci    If the pname:pNext chain includes a
2401e5c31af7Sopenharmony_ci    slink:VkOpaqueCaptureDescriptorDataCreateInfoEXT structure, pname:flags
2402e5c31af7Sopenharmony_ci    must: contain
2403e5c31af7Sopenharmony_ci    ename:VK_IMAGE_CREATE_DESCRIPTOR_BUFFER_CAPTURE_REPLAY_BIT_EXT
2404e5c31af7Sopenharmony_ciendif::VK_EXT_descriptor_buffer[]
2405e5c31af7Sopenharmony_ciifdef::VK_EXT_metal_objects[]
2406e5c31af7Sopenharmony_ci  * [[VUID-VkImageCreateInfo-pNext-06783]]
2407e5c31af7Sopenharmony_ci    If the pname:pNext chain includes a
2408e5c31af7Sopenharmony_ci    slink:VkExportMetalObjectCreateInfoEXT structure, its
2409e5c31af7Sopenharmony_ci    pname:exportObjectType member must: be either
2410e5c31af7Sopenharmony_ci    ename:VK_EXPORT_METAL_OBJECT_TYPE_METAL_TEXTURE_BIT_EXT or
2411e5c31af7Sopenharmony_ci    ename:VK_EXPORT_METAL_OBJECT_TYPE_METAL_IOSURFACE_BIT_EXT
2412e5c31af7Sopenharmony_ci  * [[VUID-VkImageCreateInfo-pNext-06784]]
2413e5c31af7Sopenharmony_ci    If the pname:pNext chain includes a slink:VkImportMetalTextureInfoEXT
2414e5c31af7Sopenharmony_ci    structure its pname:plane member must: be
2415e5c31af7Sopenharmony_ci    ename:VK_IMAGE_ASPECT_PLANE_0_BIT, ename:VK_IMAGE_ASPECT_PLANE_1_BIT, or
2416e5c31af7Sopenharmony_ci    ename:VK_IMAGE_ASPECT_PLANE_2_BIT
2417e5c31af7Sopenharmony_ci  * [[VUID-VkImageCreateInfo-pNext-06785]]
2418e5c31af7Sopenharmony_ci    If the pname:pNext chain includes a slink:VkImportMetalTextureInfoEXT
2419e5c31af7Sopenharmony_ci    structure and the image does not have a multi-planar format, then
2420e5c31af7Sopenharmony_ci    slink:VkImportMetalTextureInfoEXT::pname:plane must: be
2421e5c31af7Sopenharmony_ci    ename:VK_IMAGE_ASPECT_PLANE_0_BIT
2422e5c31af7Sopenharmony_ci  * [[VUID-VkImageCreateInfo-pNext-06786]]
2423e5c31af7Sopenharmony_ci    If the pname:pNext chain includes a slink:VkImportMetalTextureInfoEXT
2424e5c31af7Sopenharmony_ci    structure and the image has a multi-planar format with only two planes,
2425e5c31af7Sopenharmony_ci    then slink:VkImportMetalTextureInfoEXT::pname:plane must: not be
2426e5c31af7Sopenharmony_ci    ename:VK_IMAGE_ASPECT_PLANE_2_BIT
2427e5c31af7Sopenharmony_ciendif::VK_EXT_metal_objects[]
2428e5c31af7Sopenharmony_ciifdef::VK_EXT_host_image_copy[]
2429e5c31af7Sopenharmony_ci  * [[VUID-VkImageCreateInfo-imageCreateFormatFeatures-09048]]
2430e5c31af7Sopenharmony_ci    If pname:imageCreateFormatFeatures (as defined in
2431e5c31af7Sopenharmony_ci    <<resources-image-creation-limits,Image Creation Limits>>) does not
2432e5c31af7Sopenharmony_ci    contain ename:VK_FORMAT_FEATURE_2_HOST_IMAGE_TRANSFER_BIT_EXT, then
2433e5c31af7Sopenharmony_ci    pname:usage must: not contain ename:VK_IMAGE_USAGE_HOST_TRANSFER_BIT_EXT
2434e5c31af7Sopenharmony_ciendif::VK_EXT_host_image_copy[]
2435e5c31af7Sopenharmony_ci****
2436e5c31af7Sopenharmony_ciifdef::VKSC_VERSION_1_0[]
2437e5c31af7Sopenharmony_ciifdef::hidden[]
2438e5c31af7Sopenharmony_ci// tag::scdeviation[]
2439e5c31af7Sopenharmony_ci  * slink:VkImageCreateInfo::pname:flags must: not contain any of the
2440e5c31af7Sopenharmony_ci    ename:VK_IMAGE_CREATE_SPARSE_BINDING_BIT,
2441e5c31af7Sopenharmony_ci    ename:VK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT,
2442e5c31af7Sopenharmony_ci    ename:VK_IMAGE_CREATE_SPARSE_ALIASED_BIT, or
2443e5c31af7Sopenharmony_ci    ename:VK_IMAGE_CREATE_SPLIT_INSTANCE_BIND_REGIONS_BIT flags <<SCID-8>>.
2444e5c31af7Sopenharmony_ci// end::scdeviation[]
2445e5c31af7Sopenharmony_ciendif::hidden[]
2446e5c31af7Sopenharmony_ciendif::VKSC_VERSION_1_0[]
2447e5c31af7Sopenharmony_ci
2448e5c31af7Sopenharmony_ciinclude::{generated}/validity/structs/VkImageCreateInfo.adoc[]
2449e5c31af7Sopenharmony_ci--
2450e5c31af7Sopenharmony_ci
2451e5c31af7Sopenharmony_ciifdef::VK_FUCHSIA_buffer_collection[]
2452e5c31af7Sopenharmony_ci[open,refpage='VkBufferCollectionImageCreateInfoFUCHSIA',desc='Create a VkBufferCollectionFUCHSIA-compatible VkImage',type='structs']
2453e5c31af7Sopenharmony_ci--
2454e5c31af7Sopenharmony_ciThe sname:VkBufferCollectionImageCreateInfoFUCHSIA structure is defined as:
2455e5c31af7Sopenharmony_ci
2456e5c31af7Sopenharmony_ciinclude::{generated}/api/structs/VkBufferCollectionImageCreateInfoFUCHSIA.adoc[]
2457e5c31af7Sopenharmony_ci
2458e5c31af7Sopenharmony_ci  * pname:sType is a elink:VkStructureType value identifying this structure.
2459e5c31af7Sopenharmony_ci  * pname:pNext is `NULL` or a pointer to a structure extending this
2460e5c31af7Sopenharmony_ci    structure
2461e5c31af7Sopenharmony_ci  * pname:collection is the slink:VkBufferCollectionFUCHSIA handle
2462e5c31af7Sopenharmony_ci  * pname:index is the index of the buffer in the buffer collection from
2463e5c31af7Sopenharmony_ci    which the memory will be imported
2464e5c31af7Sopenharmony_ci
2465e5c31af7Sopenharmony_ci.Valid Usage
2466e5c31af7Sopenharmony_ci****
2467e5c31af7Sopenharmony_ci  * [[VUID-VkBufferCollectionImageCreateInfoFUCHSIA-index-06391]]
2468e5c31af7Sopenharmony_ci    pname:index must: be less than
2469e5c31af7Sopenharmony_ci    slink:VkBufferCollectionPropertiesFUCHSIA::pname:bufferCount
2470e5c31af7Sopenharmony_ci****
2471e5c31af7Sopenharmony_ci
2472e5c31af7Sopenharmony_ciinclude::{generated}/validity/structs/VkBufferCollectionImageCreateInfoFUCHSIA.adoc[]
2473e5c31af7Sopenharmony_ci--
2474e5c31af7Sopenharmony_ciendif::VK_FUCHSIA_buffer_collection[]
2475e5c31af7Sopenharmony_ci
2476e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_2,VK_EXT_separate_stencil_usage[]
2477e5c31af7Sopenharmony_ci[open,refpage='VkImageStencilUsageCreateInfo',desc='Specify separate usage flags for the stencil aspect of a depth-stencil image',type='structs',alias='VkImageStencilUsageCreateInfoEXT']
2478e5c31af7Sopenharmony_ci--
2479e5c31af7Sopenharmony_ciThe sname:VkImageStencilUsageCreateInfo structure is defined as:
2480e5c31af7Sopenharmony_ci
2481e5c31af7Sopenharmony_ciinclude::{generated}/api/structs/VkImageStencilUsageCreateInfo.adoc[]
2482e5c31af7Sopenharmony_ci
2483e5c31af7Sopenharmony_ciifdef::VK_EXT_separate_stencil_usage[]
2484e5c31af7Sopenharmony_cior the equivalent
2485e5c31af7Sopenharmony_ci
2486e5c31af7Sopenharmony_ciinclude::{generated}/api/structs/VkImageStencilUsageCreateInfoEXT.adoc[]
2487e5c31af7Sopenharmony_ciendif::VK_EXT_separate_stencil_usage[]
2488e5c31af7Sopenharmony_ci
2489e5c31af7Sopenharmony_ci  * pname:sType is a elink:VkStructureType value identifying this structure.
2490e5c31af7Sopenharmony_ci  * pname:pNext is `NULL` or a pointer to a structure extending this
2491e5c31af7Sopenharmony_ci    structure.
2492e5c31af7Sopenharmony_ci  * pname:stencilUsage is a bitmask of elink:VkImageUsageFlagBits describing
2493e5c31af7Sopenharmony_ci    the intended usage of the stencil aspect of the image.
2494e5c31af7Sopenharmony_ci
2495e5c31af7Sopenharmony_ciIf the pname:pNext chain of slink:VkImageCreateInfo includes a
2496e5c31af7Sopenharmony_cisname:VkImageStencilUsageCreateInfo structure, then that structure includes
2497e5c31af7Sopenharmony_cithe usage flags specific to the stencil aspect of the image for an image
2498e5c31af7Sopenharmony_ciwith a depth-stencil format.
2499e5c31af7Sopenharmony_ci
2500e5c31af7Sopenharmony_ciThis structure specifies image usages which only apply to the stencil aspect
2501e5c31af7Sopenharmony_ciof a depth/stencil format image.
2502e5c31af7Sopenharmony_ciWhen this structure is included in the pname:pNext chain of
2503e5c31af7Sopenharmony_cislink:VkImageCreateInfo, the stencil aspect of the image must: only be used
2504e5c31af7Sopenharmony_cias specified by pname:stencilUsage.
2505e5c31af7Sopenharmony_ciWhen this structure is not included in the pname:pNext chain of
2506e5c31af7Sopenharmony_cislink:VkImageCreateInfo, the stencil aspect of an image must: only be used
2507e5c31af7Sopenharmony_cias specified by slink:VkImageCreateInfo::pname:usage.
2508e5c31af7Sopenharmony_ciUse of other aspects of an image are unaffected by this structure.
2509e5c31af7Sopenharmony_ci
2510e5c31af7Sopenharmony_ciThis structure can: also be included in the pname:pNext chain of
2511e5c31af7Sopenharmony_cislink:VkPhysicalDeviceImageFormatInfo2 to query additional capabilities
2512e5c31af7Sopenharmony_cispecific to image creation parameter combinations including a separate set
2513e5c31af7Sopenharmony_ciof usage flags for the stencil aspect of the image using
2514e5c31af7Sopenharmony_ciflink:vkGetPhysicalDeviceImageFormatProperties2.
2515e5c31af7Sopenharmony_ciWhen this structure is not included in the pname:pNext chain of
2516e5c31af7Sopenharmony_cisname:VkPhysicalDeviceImageFormatInfo2 then the implicit value of
2517e5c31af7Sopenharmony_cipname:stencilUsage matches that of
2518e5c31af7Sopenharmony_cisname:VkPhysicalDeviceImageFormatInfo2::pname:usage.
2519e5c31af7Sopenharmony_ci
2520e5c31af7Sopenharmony_ci.Valid Usage
2521e5c31af7Sopenharmony_ci****
2522e5c31af7Sopenharmony_ci  * [[VUID-VkImageStencilUsageCreateInfo-stencilUsage-02539]]
2523e5c31af7Sopenharmony_ci    If pname:stencilUsage includes
2524e5c31af7Sopenharmony_ci    ename:VK_IMAGE_USAGE_TRANSIENT_ATTACHMENT_BIT, it must: not include bits
2525e5c31af7Sopenharmony_ci    other than ename:VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT or
2526e5c31af7Sopenharmony_ci    ename:VK_IMAGE_USAGE_INPUT_ATTACHMENT_BIT
2527e5c31af7Sopenharmony_ci****
2528e5c31af7Sopenharmony_ci
2529e5c31af7Sopenharmony_ciinclude::{generated}/validity/structs/VkImageStencilUsageCreateInfo.adoc[]
2530e5c31af7Sopenharmony_ci--
2531e5c31af7Sopenharmony_ciendif::VK_VERSION_1_2,VK_EXT_separate_stencil_usage[]
2532e5c31af7Sopenharmony_ci
2533e5c31af7Sopenharmony_ciifdef::VK_NV_dedicated_allocation[]
2534e5c31af7Sopenharmony_ci[open,refpage='VkDedicatedAllocationImageCreateInfoNV',desc='Specify that an image is bound to a dedicated memory resource',type='structs']
2535e5c31af7Sopenharmony_ci--
2536e5c31af7Sopenharmony_ciIf the pname:pNext chain includes a
2537e5c31af7Sopenharmony_cisname:VkDedicatedAllocationImageCreateInfoNV structure, then that structure
2538e5c31af7Sopenharmony_ciincludes an enable controlling whether the image will have a dedicated
2539e5c31af7Sopenharmony_cimemory allocation bound to it.
2540e5c31af7Sopenharmony_ci
2541e5c31af7Sopenharmony_ciThe sname:VkDedicatedAllocationImageCreateInfoNV structure is defined as:
2542e5c31af7Sopenharmony_ci
2543e5c31af7Sopenharmony_ciinclude::{generated}/api/structs/VkDedicatedAllocationImageCreateInfoNV.adoc[]
2544e5c31af7Sopenharmony_ci
2545e5c31af7Sopenharmony_ci  * pname:sType is a elink:VkStructureType value identifying this structure.
2546e5c31af7Sopenharmony_ci  * pname:pNext is `NULL` or a pointer to a structure extending this
2547e5c31af7Sopenharmony_ci    structure.
2548e5c31af7Sopenharmony_ci  * pname:dedicatedAllocation specifies whether the image will have a
2549e5c31af7Sopenharmony_ci    dedicated allocation bound to it.
2550e5c31af7Sopenharmony_ci
2551e5c31af7Sopenharmony_ci[NOTE]
2552e5c31af7Sopenharmony_ci.Note
2553e5c31af7Sopenharmony_ci====
2554e5c31af7Sopenharmony_ciUsing a dedicated allocation for color and depth/stencil attachments or
2555e5c31af7Sopenharmony_ciother large images may: improve performance on some devices.
2556e5c31af7Sopenharmony_ci====
2557e5c31af7Sopenharmony_ci
2558e5c31af7Sopenharmony_ci.Valid Usage
2559e5c31af7Sopenharmony_ci****
2560e5c31af7Sopenharmony_ci  * [[VUID-VkDedicatedAllocationImageCreateInfoNV-dedicatedAllocation-00994]]
2561e5c31af7Sopenharmony_ci    If pname:dedicatedAllocation is ename:VK_TRUE,
2562e5c31af7Sopenharmony_ci    slink:VkImageCreateInfo::pname:flags must: not include
2563e5c31af7Sopenharmony_ci    ename:VK_IMAGE_CREATE_SPARSE_BINDING_BIT,
2564e5c31af7Sopenharmony_ci    ename:VK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT, or
2565e5c31af7Sopenharmony_ci    ename:VK_IMAGE_CREATE_SPARSE_ALIASED_BIT
2566e5c31af7Sopenharmony_ci****
2567e5c31af7Sopenharmony_ci
2568e5c31af7Sopenharmony_ciinclude::{generated}/validity/structs/VkDedicatedAllocationImageCreateInfoNV.adoc[]
2569e5c31af7Sopenharmony_ci--
2570e5c31af7Sopenharmony_ciendif::VK_NV_dedicated_allocation[]
2571e5c31af7Sopenharmony_ci
2572e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_1,VK_KHR_external_memory[]
2573e5c31af7Sopenharmony_ci[open,refpage='VkExternalMemoryImageCreateInfo',desc='Specify that an image may be backed by external memory',type='structs']
2574e5c31af7Sopenharmony_ci--
2575e5c31af7Sopenharmony_ciTo define a set of external memory handle types that may: be used as backing
2576e5c31af7Sopenharmony_cistore for an image, add a slink:VkExternalMemoryImageCreateInfo structure to
2577e5c31af7Sopenharmony_cithe pname:pNext chain of the slink:VkImageCreateInfo structure.
2578e5c31af7Sopenharmony_ciThe sname:VkExternalMemoryImageCreateInfo structure is defined as:
2579e5c31af7Sopenharmony_ci
2580e5c31af7Sopenharmony_ciinclude::{generated}/api/structs/VkExternalMemoryImageCreateInfo.adoc[]
2581e5c31af7Sopenharmony_ci
2582e5c31af7Sopenharmony_ciifdef::VK_KHR_external_memory[]
2583e5c31af7Sopenharmony_cior the equivalent
2584e5c31af7Sopenharmony_ci
2585e5c31af7Sopenharmony_ciinclude::{generated}/api/structs/VkExternalMemoryImageCreateInfoKHR.adoc[]
2586e5c31af7Sopenharmony_ciendif::VK_KHR_external_memory[]
2587e5c31af7Sopenharmony_ci
2588e5c31af7Sopenharmony_ci[NOTE]
2589e5c31af7Sopenharmony_ci.Note
2590e5c31af7Sopenharmony_ci====
2591e5c31af7Sopenharmony_ciA sname:VkExternalMemoryImageCreateInfo structure with a non-zero
2592e5c31af7Sopenharmony_cipname:handleTypes field must be included in the creation parameters for an
2593e5c31af7Sopenharmony_ciimage that will be bound to memory that is either exported or imported.
2594e5c31af7Sopenharmony_ci====
2595e5c31af7Sopenharmony_ci
2596e5c31af7Sopenharmony_ci  * pname:sType is a elink:VkStructureType value identifying this structure.
2597e5c31af7Sopenharmony_ci  * pname:pNext is `NULL` or a pointer to a structure extending this
2598e5c31af7Sopenharmony_ci    structure.
2599e5c31af7Sopenharmony_ci  * pname:handleTypes is zero or a bitmask of
2600e5c31af7Sopenharmony_ci    elink:VkExternalMemoryHandleTypeFlagBits specifying one or more external
2601e5c31af7Sopenharmony_ci    memory handle types.
2602e5c31af7Sopenharmony_ci
2603e5c31af7Sopenharmony_ciinclude::{generated}/validity/structs/VkExternalMemoryImageCreateInfo.adoc[]
2604e5c31af7Sopenharmony_ci--
2605e5c31af7Sopenharmony_ciendif::VK_VERSION_1_1,VK_KHR_external_memory[]
2606e5c31af7Sopenharmony_ci
2607e5c31af7Sopenharmony_ciifdef::VK_NV_external_memory[]
2608e5c31af7Sopenharmony_ci[open,refpage='VkExternalMemoryImageCreateInfoNV',desc='Specify that an image may be backed by external memory',type='structs']
2609e5c31af7Sopenharmony_ci--
2610e5c31af7Sopenharmony_ciIf the pname:pNext chain includes a sname:VkExternalMemoryImageCreateInfoNV
2611e5c31af7Sopenharmony_cistructure, then that structure defines a set of external memory handle types
2612e5c31af7Sopenharmony_cithat may: be used as backing store for the image.
2613e5c31af7Sopenharmony_ci
2614e5c31af7Sopenharmony_ciThe sname:VkExternalMemoryImageCreateInfoNV structure is defined as:
2615e5c31af7Sopenharmony_ci
2616e5c31af7Sopenharmony_ciinclude::{generated}/api/structs/VkExternalMemoryImageCreateInfoNV.adoc[]
2617e5c31af7Sopenharmony_ci
2618e5c31af7Sopenharmony_ci  * pname:sType is a elink:VkStructureType value identifying this structure.
2619e5c31af7Sopenharmony_ci  * pname:pNext is `NULL` or a pointer to a structure extending this
2620e5c31af7Sopenharmony_ci    structure.
2621e5c31af7Sopenharmony_ci  * pname:handleTypes is zero or a bitmask of
2622e5c31af7Sopenharmony_ci    elink:VkExternalMemoryHandleTypeFlagBitsNV specifying one or more
2623e5c31af7Sopenharmony_ci    external memory handle types.
2624e5c31af7Sopenharmony_ci
2625e5c31af7Sopenharmony_ciinclude::{generated}/validity/structs/VkExternalMemoryImageCreateInfoNV.adoc[]
2626e5c31af7Sopenharmony_ci--
2627e5c31af7Sopenharmony_ciendif::VK_NV_external_memory[]
2628e5c31af7Sopenharmony_ci
2629e5c31af7Sopenharmony_ciifdef::VK_ANDROID_external_memory_android_hardware_buffer[]
2630e5c31af7Sopenharmony_ci[open,refpage='VkExternalFormatANDROID',desc='Structure containing an Android hardware buffer external format',type='structs']
2631e5c31af7Sopenharmony_ci--
2632e5c31af7Sopenharmony_cisname:VkExternalFormatANDROID is defined as:
2633e5c31af7Sopenharmony_ci
2634e5c31af7Sopenharmony_ciinclude::{generated}/api/structs/VkExternalFormatANDROID.adoc[]
2635e5c31af7Sopenharmony_ci
2636e5c31af7Sopenharmony_ci  * pname:sType is a elink:VkStructureType value identifying this structure.
2637e5c31af7Sopenharmony_ci  * pname:pNext is `NULL` or a pointer to a structure extending this
2638e5c31af7Sopenharmony_ci    structure.
2639e5c31af7Sopenharmony_ci  * pname:externalFormat is an implementation-defined identifier for the
2640e5c31af7Sopenharmony_ci    external format
2641e5c31af7Sopenharmony_ci
2642e5c31af7Sopenharmony_ciWhen included in the pname:pNext chain of another structure, it indicates
2643e5c31af7Sopenharmony_ci<<memory-external-android-hardware-buffer-external-formats, additional
2644e5c31af7Sopenharmony_ciformat information>> beyond what is provided by ename:VkFormat values for an
2645e5c31af7Sopenharmony_ciAndroid hardware buffer.
2646e5c31af7Sopenharmony_ciIf pname:externalFormat is zero, it indicates that no external format is
2647e5c31af7Sopenharmony_ciused, and implementations should rely only on other format information.
2648e5c31af7Sopenharmony_ciIf this structure is not present, it is equivalent to setting
2649e5c31af7Sopenharmony_cipname:externalFormat to zero.
2650e5c31af7Sopenharmony_ci
2651e5c31af7Sopenharmony_ci.Valid Usage
2652e5c31af7Sopenharmony_ci****
2653e5c31af7Sopenharmony_ci  * [[VUID-VkExternalFormatANDROID-externalFormat-01894]]
2654e5c31af7Sopenharmony_ci    pname:externalFormat must: be `0` or a value returned in the
2655e5c31af7Sopenharmony_ci    pname:externalFormat member of
2656e5c31af7Sopenharmony_ci    slink:VkAndroidHardwareBufferFormatPropertiesANDROID by an earlier call
2657e5c31af7Sopenharmony_ci    to flink:vkGetAndroidHardwareBufferPropertiesANDROID
2658e5c31af7Sopenharmony_ci****
2659e5c31af7Sopenharmony_ci
2660e5c31af7Sopenharmony_ciinclude::{generated}/validity/structs/VkExternalFormatANDROID.adoc[]
2661e5c31af7Sopenharmony_ci--
2662e5c31af7Sopenharmony_ciendif::VK_ANDROID_external_memory_android_hardware_buffer[]
2663e5c31af7Sopenharmony_ci
2664e5c31af7Sopenharmony_ciifdef::VK_QNX_external_memory_screen_buffer[]
2665e5c31af7Sopenharmony_ci[open,refpage='VkExternalFormatQNX',desc='Structure containing a QNX Screen buffer external format',type='structs']
2666e5c31af7Sopenharmony_ci--
2667e5c31af7Sopenharmony_ciTo create an image with an
2668e5c31af7Sopenharmony_ci<<memory-external-screen-buffer-external-formats,QNX Screen external
2669e5c31af7Sopenharmony_ciformat>>, add a sname:VkExternalFormatQNX structure in the pname:pNext chain
2670e5c31af7Sopenharmony_ciof slink:VkImageCreateInfo.
2671e5c31af7Sopenharmony_cisname:VkExternalFormatQNX is defined as:
2672e5c31af7Sopenharmony_ci
2673e5c31af7Sopenharmony_ciinclude::{generated}/api/structs/VkExternalFormatQNX.adoc[]
2674e5c31af7Sopenharmony_ci
2675e5c31af7Sopenharmony_ci  * pname:sType is a elink:VkStructureType value identifying this structure.
2676e5c31af7Sopenharmony_ci  * pname:pNext is `NULL` or a pointer to a structure extending this
2677e5c31af7Sopenharmony_ci    structure.
2678e5c31af7Sopenharmony_ci  * pname:externalFormat is an implementation-defined identifier for the
2679e5c31af7Sopenharmony_ci    external format
2680e5c31af7Sopenharmony_ci
2681e5c31af7Sopenharmony_ciIf pname:externalFormat is zero, the effect is as if the
2682e5c31af7Sopenharmony_cisname:VkExternalFormatQNX structure was not present.
2683e5c31af7Sopenharmony_ciOtherwise, the pname:image will have the specified external format.
2684e5c31af7Sopenharmony_ci
2685e5c31af7Sopenharmony_ci.Valid Usage
2686e5c31af7Sopenharmony_ci****
2687e5c31af7Sopenharmony_ci  * [[VUID-VkExternalFormatQNX-externalFormat-08956]]
2688e5c31af7Sopenharmony_ci    pname:externalFormat must: be `0` or a value returned in the
2689e5c31af7Sopenharmony_ci    pname:externalFormat member of slink:VkScreenBufferFormatPropertiesQNX
2690e5c31af7Sopenharmony_ci    by an earlier call to flink:vkGetScreenBufferPropertiesQNX
2691e5c31af7Sopenharmony_ci****
2692e5c31af7Sopenharmony_ci
2693e5c31af7Sopenharmony_ciinclude::{generated}/validity/structs/VkExternalFormatQNX.adoc[]
2694e5c31af7Sopenharmony_ci--
2695e5c31af7Sopenharmony_ciendif::VK_QNX_external_memory_screen_buffer[]
2696e5c31af7Sopenharmony_ci
2697e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_1,VK_KHR_device_group[]
2698e5c31af7Sopenharmony_ciifdef::VK_KHR_swapchain[]
2699e5c31af7Sopenharmony_ci[open,refpage='VkImageSwapchainCreateInfoKHR',desc='Specify that an image will be bound to swapchain memory',type='structs']
2700e5c31af7Sopenharmony_ci--
2701e5c31af7Sopenharmony_ciIf the pname:pNext chain of slink:VkImageCreateInfo includes a
2702e5c31af7Sopenharmony_cisname:VkImageSwapchainCreateInfoKHR structure, then that structure includes
2703e5c31af7Sopenharmony_cia swapchain handle indicating that the image will be bound to memory from
2704e5c31af7Sopenharmony_cithat swapchain.
2705e5c31af7Sopenharmony_ci
2706e5c31af7Sopenharmony_ciThe sname:VkImageSwapchainCreateInfoKHR structure is defined as:
2707e5c31af7Sopenharmony_ci
2708e5c31af7Sopenharmony_ciinclude::{generated}/api/structs/VkImageSwapchainCreateInfoKHR.adoc[]
2709e5c31af7Sopenharmony_ci
2710e5c31af7Sopenharmony_ci  * pname:sType is a elink:VkStructureType value identifying this structure.
2711e5c31af7Sopenharmony_ci  * pname:pNext is `NULL` or a pointer to a structure extending this
2712e5c31af7Sopenharmony_ci    structure.
2713e5c31af7Sopenharmony_ci  * pname:swapchain is dlink:VK_NULL_HANDLE or a handle of a swapchain that
2714e5c31af7Sopenharmony_ci    the image will be bound to.
2715e5c31af7Sopenharmony_ci
2716e5c31af7Sopenharmony_ci.Valid Usage
2717e5c31af7Sopenharmony_ci****
2718e5c31af7Sopenharmony_ci  * [[VUID-VkImageSwapchainCreateInfoKHR-swapchain-00995]]
2719e5c31af7Sopenharmony_ci    If pname:swapchain is not dlink:VK_NULL_HANDLE, the fields of
2720e5c31af7Sopenharmony_ci    slink:VkImageCreateInfo must: match the
2721e5c31af7Sopenharmony_ci    <<swapchain-wsi-image-create-info, implied image creation parameters>>
2722e5c31af7Sopenharmony_ci    of the swapchain
2723e5c31af7Sopenharmony_ci****
2724e5c31af7Sopenharmony_ci
2725e5c31af7Sopenharmony_ciinclude::{generated}/validity/structs/VkImageSwapchainCreateInfoKHR.adoc[]
2726e5c31af7Sopenharmony_ci--
2727e5c31af7Sopenharmony_ciendif::VK_KHR_swapchain[]
2728e5c31af7Sopenharmony_ciendif::VK_VERSION_1_1,VK_KHR_device_group[]
2729e5c31af7Sopenharmony_ci
2730e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_2,VK_KHR_image_format_list[]
2731e5c31af7Sopenharmony_ci[open,refpage='VkImageFormatListCreateInfo',desc='Specify that an image can: be used with a particular set of formats',type='structs',alias='VkImageFormatListCreateInfoKHR']
2732e5c31af7Sopenharmony_ci--
2733e5c31af7Sopenharmony_ciIf the pname:pNext chain of slink:VkImageCreateInfo includes a
2734e5c31af7Sopenharmony_cisname:VkImageFormatListCreateInfo structure, then that structure contains a
2735e5c31af7Sopenharmony_cilist of all formats that can: be used when creating views of this image.
2736e5c31af7Sopenharmony_ci
2737e5c31af7Sopenharmony_ciThe sname:VkImageFormatListCreateInfo structure is defined as:
2738e5c31af7Sopenharmony_ci
2739e5c31af7Sopenharmony_ciinclude::{generated}/api/structs/VkImageFormatListCreateInfo.adoc[]
2740e5c31af7Sopenharmony_ci
2741e5c31af7Sopenharmony_ciifdef::VK_KHR_image_format_list[]
2742e5c31af7Sopenharmony_cior the equivalent
2743e5c31af7Sopenharmony_ci
2744e5c31af7Sopenharmony_ciinclude::{generated}/api/structs/VkImageFormatListCreateInfoKHR.adoc[]
2745e5c31af7Sopenharmony_ciendif::VK_KHR_image_format_list[]
2746e5c31af7Sopenharmony_ci
2747e5c31af7Sopenharmony_ci  * pname:sType is a elink:VkStructureType value identifying this structure.
2748e5c31af7Sopenharmony_ci  * pname:pNext is `NULL` or a pointer to a structure extending this
2749e5c31af7Sopenharmony_ci    structure.
2750e5c31af7Sopenharmony_ci  * pname:viewFormatCount is the number of entries in the pname:pViewFormats
2751e5c31af7Sopenharmony_ci    array.
2752e5c31af7Sopenharmony_ci  * pname:pViewFormats is a pointer to an array of elink:VkFormat values
2753e5c31af7Sopenharmony_ci    specifying all formats which can: be used when creating views of this
2754e5c31af7Sopenharmony_ci    image.
2755e5c31af7Sopenharmony_ci
2756e5c31af7Sopenharmony_ciIf pname:viewFormatCount is zero, pname:pViewFormats is ignored and the
2757e5c31af7Sopenharmony_ciimage is created as if the sname:VkImageFormatListCreateInfo structure were
2758e5c31af7Sopenharmony_cinot included in the pname:pNext chain of slink:VkImageCreateInfo.
2759e5c31af7Sopenharmony_ci
2760e5c31af7Sopenharmony_ciinclude::{generated}/validity/structs/VkImageFormatListCreateInfo.adoc[]
2761e5c31af7Sopenharmony_ci--
2762e5c31af7Sopenharmony_ciendif::VK_VERSION_1_2,VK_KHR_image_format_list[]
2763e5c31af7Sopenharmony_ci
2764e5c31af7Sopenharmony_ciifdef::VK_EXT_image_drm_format_modifier[]
2765e5c31af7Sopenharmony_ci[open,refpage='VkImageDrmFormatModifierListCreateInfoEXT',desc='Specify that an image must be created with a DRM format modifier from the provided list',type='structs']
2766e5c31af7Sopenharmony_ci--
2767e5c31af7Sopenharmony_ciIf the pname:pNext chain of slink:VkImageCreateInfo includes a
2768e5c31af7Sopenharmony_cislink:VkImageDrmFormatModifierListCreateInfoEXT structure, then the image
2769e5c31af7Sopenharmony_ciwill be created with one of the <<glossary-drm-format-modifier,Linux DRM
2770e5c31af7Sopenharmony_ciformat modifiers>> listed in the structure.
2771e5c31af7Sopenharmony_ciThe choice of modifier is implementation-dependent.
2772e5c31af7Sopenharmony_ci
2773e5c31af7Sopenharmony_ciThe slink:VkImageDrmFormatModifierListCreateInfoEXT structure is defined as:
2774e5c31af7Sopenharmony_ci
2775e5c31af7Sopenharmony_ciinclude::{generated}/api/structs/VkImageDrmFormatModifierListCreateInfoEXT.adoc[]
2776e5c31af7Sopenharmony_ci
2777e5c31af7Sopenharmony_ci  * pname:sType is a elink:VkStructureType value identifying this structure.
2778e5c31af7Sopenharmony_ci  * pname:pNext is `NULL` or a pointer to a structure extending this
2779e5c31af7Sopenharmony_ci    structure.
2780e5c31af7Sopenharmony_ci  * pname:drmFormatModifierCount is the length of the
2781e5c31af7Sopenharmony_ci    pname:pDrmFormatModifiers array.
2782e5c31af7Sopenharmony_ci  * pname:pDrmFormatModifiers is a pointer to an array of _Linux DRM format
2783e5c31af7Sopenharmony_ci    modifiers_.
2784e5c31af7Sopenharmony_ci
2785e5c31af7Sopenharmony_ci.Valid Usage
2786e5c31af7Sopenharmony_ci****
2787e5c31af7Sopenharmony_ci  * [[VUID-VkImageDrmFormatModifierListCreateInfoEXT-pDrmFormatModifiers-02263]]
2788e5c31af7Sopenharmony_ci    Each _modifier_ in pname:pDrmFormatModifiers must: be compatible with
2789e5c31af7Sopenharmony_ci    the parameters in slink:VkImageCreateInfo and its pname:pNext chain, as
2790e5c31af7Sopenharmony_ci    determined by querying slink:VkPhysicalDeviceImageFormatInfo2 extended
2791e5c31af7Sopenharmony_ci    with slink:VkPhysicalDeviceImageDrmFormatModifierInfoEXT
2792e5c31af7Sopenharmony_ci****
2793e5c31af7Sopenharmony_ci
2794e5c31af7Sopenharmony_ciinclude::{generated}/validity/structs/VkImageDrmFormatModifierListCreateInfoEXT.adoc[]
2795e5c31af7Sopenharmony_ci--
2796e5c31af7Sopenharmony_ci
2797e5c31af7Sopenharmony_ci[open,refpage='VkImageDrmFormatModifierExplicitCreateInfoEXT',desc='Specify that an image be created with the provided DRM format modifier and explicit memory layout',type='structs']
2798e5c31af7Sopenharmony_ci--
2799e5c31af7Sopenharmony_ciIf the pname:pNext chain of slink:VkImageCreateInfo includes a
2800e5c31af7Sopenharmony_cislink:VkImageDrmFormatModifierExplicitCreateInfoEXT structure, then the
2801e5c31af7Sopenharmony_ciimage will be created with the <<glossary-drm-format-modifier,Linux DRM
2802e5c31af7Sopenharmony_ciformat modifier>> and memory layout defined by the structure.
2803e5c31af7Sopenharmony_ci
2804e5c31af7Sopenharmony_ciThe slink:VkImageDrmFormatModifierExplicitCreateInfoEXT structure is defined
2805e5c31af7Sopenharmony_cias:
2806e5c31af7Sopenharmony_ci
2807e5c31af7Sopenharmony_ciinclude::{generated}/api/structs/VkImageDrmFormatModifierExplicitCreateInfoEXT.adoc[]
2808e5c31af7Sopenharmony_ci
2809e5c31af7Sopenharmony_ci  * pname:sType is a elink:VkStructureType value identifying this structure.
2810e5c31af7Sopenharmony_ci  * pname:pNext is `NULL` or a pointer to a structure extending this
2811e5c31af7Sopenharmony_ci    structure.
2812e5c31af7Sopenharmony_ci  * pname:drmFormatModifier is the _Linux DRM format modifier_ with which
2813e5c31af7Sopenharmony_ci    the image will be created.
2814e5c31af7Sopenharmony_ci  * pname:drmFormatModifierPlaneCount is the number of _memory planes_ in
2815e5c31af7Sopenharmony_ci    the image (as reported by slink:VkDrmFormatModifierPropertiesEXT) as
2816e5c31af7Sopenharmony_ci    well as the length of the pname:pPlaneLayouts array.
2817e5c31af7Sopenharmony_ci  * pname:pPlaneLayouts is a pointer to an array of
2818e5c31af7Sopenharmony_ci    slink:VkSubresourceLayout structures describing the image's _memory
2819e5c31af7Sopenharmony_ci    planes_.
2820e5c31af7Sopenharmony_ci
2821e5c31af7Sopenharmony_ciThe etext:i^th^ member of pname:pPlaneLayouts describes the layout of the
2822e5c31af7Sopenharmony_ciimage's etext:i^th^ _memory plane_ (that is,
2823e5c31af7Sopenharmony_ci`VK_IMAGE_ASPECT_MEMORY_PLANE__{ibit}__BIT_EXT`).
2824e5c31af7Sopenharmony_ciIn each element of pname:pPlaneLayouts, the implementation must: ignore
2825e5c31af7Sopenharmony_cipname:size.
2826e5c31af7Sopenharmony_ciThe implementation calculates the size of each plane, which the application
2827e5c31af7Sopenharmony_cican: query with flink:vkGetImageSubresourceLayout.
2828e5c31af7Sopenharmony_ci
2829e5c31af7Sopenharmony_ciWhen creating an image with
2830e5c31af7Sopenharmony_cislink:VkImageDrmFormatModifierExplicitCreateInfoEXT, it is the application's
2831e5c31af7Sopenharmony_ciresponsibility to satisfy all valid usage requirements.
2832e5c31af7Sopenharmony_ciHowever, the implementation must: validate that the provided
2833e5c31af7Sopenharmony_cipname:pPlaneLayouts, when combined with the provided pname:drmFormatModifier
2834e5c31af7Sopenharmony_ciand other creation parameters in slink:VkImageCreateInfo and its pname:pNext
2835e5c31af7Sopenharmony_cichain, produce a valid image.
2836e5c31af7Sopenharmony_ci(This validation is necessarily implementation-dependent and outside the
2837e5c31af7Sopenharmony_ciscope of Vulkan, and therefore not described by valid usage requirements).
2838e5c31af7Sopenharmony_ciIf this validation fails, then flink:vkCreateImage returns
2839e5c31af7Sopenharmony_ciename:VK_ERROR_INVALID_DRM_FORMAT_MODIFIER_PLANE_LAYOUT_EXT.
2840e5c31af7Sopenharmony_ci
2841e5c31af7Sopenharmony_ci.Valid Usage
2842e5c31af7Sopenharmony_ci****
2843e5c31af7Sopenharmony_ci  * [[VUID-VkImageDrmFormatModifierExplicitCreateInfoEXT-drmFormatModifier-02264]]
2844e5c31af7Sopenharmony_ci    pname:drmFormatModifier must: be compatible with the parameters in
2845e5c31af7Sopenharmony_ci    slink:VkImageCreateInfo and its pname:pNext chain, as determined by
2846e5c31af7Sopenharmony_ci    querying slink:VkPhysicalDeviceImageFormatInfo2 extended with
2847e5c31af7Sopenharmony_ci    slink:VkPhysicalDeviceImageDrmFormatModifierInfoEXT
2848e5c31af7Sopenharmony_ci  * [[VUID-VkImageDrmFormatModifierExplicitCreateInfoEXT-drmFormatModifierPlaneCount-02265]]
2849e5c31af7Sopenharmony_ci    pname:drmFormatModifierPlaneCount must: be equal to the
2850e5c31af7Sopenharmony_ci    slink:VkDrmFormatModifierPropertiesEXT::pname:drmFormatModifierPlaneCount
2851e5c31af7Sopenharmony_ci    associated with slink:VkImageCreateInfo::pname:format and
2852e5c31af7Sopenharmony_ci    pname:drmFormatModifier, as found by querying
2853e5c31af7Sopenharmony_ci    slink:VkDrmFormatModifierPropertiesListEXT
2854e5c31af7Sopenharmony_ci  * [[VUID-VkImageDrmFormatModifierExplicitCreateInfoEXT-size-02267]]
2855e5c31af7Sopenharmony_ci    For each element of pname:pPlaneLayouts, pname:size must: be 0
2856e5c31af7Sopenharmony_ci  * [[VUID-VkImageDrmFormatModifierExplicitCreateInfoEXT-arrayPitch-02268]]
2857e5c31af7Sopenharmony_ci    For each element of pname:pPlaneLayouts, pname:arrayPitch must: be 0 if
2858e5c31af7Sopenharmony_ci    slink:VkImageCreateInfo::pname:arrayLayers is 1
2859e5c31af7Sopenharmony_ci  * [[VUID-VkImageDrmFormatModifierExplicitCreateInfoEXT-depthPitch-02269]]
2860e5c31af7Sopenharmony_ci    For each element of pname:pPlaneLayouts, pname:depthPitch must: be 0 if
2861e5c31af7Sopenharmony_ci    slink:VkImageCreateInfo::pname:extent.depth is 1
2862e5c31af7Sopenharmony_ci****
2863e5c31af7Sopenharmony_ci
2864e5c31af7Sopenharmony_ciinclude::{generated}/validity/structs/VkImageDrmFormatModifierExplicitCreateInfoEXT.adoc[]
2865e5c31af7Sopenharmony_ci--
2866e5c31af7Sopenharmony_ciendif::VK_EXT_image_drm_format_modifier[]
2867e5c31af7Sopenharmony_ci
2868e5c31af7Sopenharmony_ciifdef::VK_EXT_image_compression_control[]
2869e5c31af7Sopenharmony_ci[open,refpage='VkImageCompressionControlEXT',desc='Specify image compression properties',type='structs']
2870e5c31af7Sopenharmony_ci--
2871e5c31af7Sopenharmony_ciIf the pname:pNext list of slink:VkImageCreateInfo includes a
2872e5c31af7Sopenharmony_cisname:VkImageCompressionControlEXT structure, then that structure describes
2873e5c31af7Sopenharmony_cicompression controls for this image.
2874e5c31af7Sopenharmony_ci
2875e5c31af7Sopenharmony_ciThe sname:VkImageCompressionControlEXT structure is defined as:
2876e5c31af7Sopenharmony_ci
2877e5c31af7Sopenharmony_ciinclude::{generated}/api/structs/VkImageCompressionControlEXT.adoc[]
2878e5c31af7Sopenharmony_ci
2879e5c31af7Sopenharmony_ci  * pname:sType is a elink:VkStructureType value identifying this structure.
2880e5c31af7Sopenharmony_ci  * pname:pNext is `NULL` or a pointer to a structure extending this
2881e5c31af7Sopenharmony_ci    structure.
2882e5c31af7Sopenharmony_ci  * pname:flags is a bitmask of elink:VkImageCompressionFlagBitsEXT
2883e5c31af7Sopenharmony_ci    describing compression controls for the image.
2884e5c31af7Sopenharmony_ci  * pname:compressionControlPlaneCount is the number of entries in the
2885e5c31af7Sopenharmony_ci    pname:pFixedRateFlags array.
2886e5c31af7Sopenharmony_ci  * pname:pFixedRateFlags is `NULL` or a pointer to an array of
2887e5c31af7Sopenharmony_ci    tlink:VkImageCompressionFixedRateFlagsEXT bitfields describing allowed
2888e5c31af7Sopenharmony_ci    fixed-rate compression rates of each image plane.
2889e5c31af7Sopenharmony_ci    It is ignored if pname:flags does not include
2890e5c31af7Sopenharmony_ci    ename:VK_IMAGE_COMPRESSION_FIXED_RATE_EXPLICIT_EXT.
2891e5c31af7Sopenharmony_ci
2892e5c31af7Sopenharmony_ciIf enabled, fixed-rate compression is done in an implementation-defined
2893e5c31af7Sopenharmony_cimanner and may: be applied at block granularity.
2894e5c31af7Sopenharmony_ciIn that case, a write to an individual texel may: modify the value of other
2895e5c31af7Sopenharmony_citexels in the same block.
2896e5c31af7Sopenharmony_ci
2897e5c31af7Sopenharmony_ci.Valid Usage
2898e5c31af7Sopenharmony_ci****
2899e5c31af7Sopenharmony_ci  * [[VUID-VkImageCompressionControlEXT-flags-06747]]
2900e5c31af7Sopenharmony_ci    pname:flags must: be one of ename:VK_IMAGE_COMPRESSION_DEFAULT_EXT,
2901e5c31af7Sopenharmony_ci    ename:VK_IMAGE_COMPRESSION_FIXED_RATE_DEFAULT_EXT,
2902e5c31af7Sopenharmony_ci    ename:VK_IMAGE_COMPRESSION_FIXED_RATE_EXPLICIT_EXT, or
2903e5c31af7Sopenharmony_ci    ename:VK_IMAGE_COMPRESSION_DISABLED_EXT
2904e5c31af7Sopenharmony_ci  * [[VUID-VkImageCompressionControlEXT-flags-06748]]
2905e5c31af7Sopenharmony_ci    If pname:flags includes
2906e5c31af7Sopenharmony_ci    ename:VK_IMAGE_COMPRESSION_FIXED_RATE_EXPLICIT_EXT,
2907e5c31af7Sopenharmony_ci    pname:pFixedRateFlags must: not be `NULL`
2908e5c31af7Sopenharmony_ci****
2909e5c31af7Sopenharmony_ci
2910e5c31af7Sopenharmony_ciinclude::{generated}/validity/structs/VkImageCompressionControlEXT.adoc[]
2911e5c31af7Sopenharmony_ci
2912e5c31af7Sopenharmony_ci[NOTE]
2913e5c31af7Sopenharmony_ci.Note
2914e5c31af7Sopenharmony_ci====
2915e5c31af7Sopenharmony_ciSome combinations of compression properties may not be supported.
2916e5c31af7Sopenharmony_ciFor example, some implementations may not support different fixed-rate
2917e5c31af7Sopenharmony_cicompression rates per plane of a multi-planar format and will not be able to
2918e5c31af7Sopenharmony_cienable fixed-rate compression for any plane if the requested rates differ.
2919e5c31af7Sopenharmony_ci====
2920e5c31af7Sopenharmony_ci--
2921e5c31af7Sopenharmony_ci
2922e5c31af7Sopenharmony_ci[open,refpage='VkImageCompressionFlagBitsEXT',desc='Bitmask specifying image compression controls',type='enums']
2923e5c31af7Sopenharmony_ci--
2924e5c31af7Sopenharmony_ciPossible values of slink:VkImageCompressionControlEXT::pname:flags,
2925e5c31af7Sopenharmony_cispecifying compression controls for an image, are:
2926e5c31af7Sopenharmony_ci
2927e5c31af7Sopenharmony_ciinclude::{generated}/api/enums/VkImageCompressionFlagBitsEXT.adoc[]
2928e5c31af7Sopenharmony_ci
2929e5c31af7Sopenharmony_ci  * ename:VK_IMAGE_COMPRESSION_DEFAULT_EXT specifies that the default image
2930e5c31af7Sopenharmony_ci    compression setting is used.
2931e5c31af7Sopenharmony_ci    Implementations must: not apply fixed-rate compression.
2932e5c31af7Sopenharmony_ci  * ename:VK_IMAGE_COMPRESSION_FIXED_RATE_DEFAULT_EXT specifies that the
2933e5c31af7Sopenharmony_ci    implementation may: choose any supported fixed-rate compression setting
2934e5c31af7Sopenharmony_ci    in an implementation-defined manner based on the properties of the
2935e5c31af7Sopenharmony_ci    image.
2936e5c31af7Sopenharmony_ci  * ename:VK_IMAGE_COMPRESSION_FIXED_RATE_EXPLICIT_EXT specifies that
2937e5c31af7Sopenharmony_ci    fixed-rate compression may: be used and that the allowed compression
2938e5c31af7Sopenharmony_ci    rates are specified by
2939e5c31af7Sopenharmony_ci    slink:VkImageCompressionControlEXT::pname:pFixedRateFlags.
2940e5c31af7Sopenharmony_ci  * ename:VK_IMAGE_COMPRESSION_DISABLED_EXT specifies that all lossless and
2941e5c31af7Sopenharmony_ci    fixed-rate compression should: be disabled.
2942e5c31af7Sopenharmony_ci
2943e5c31af7Sopenharmony_ciIf slink:VkImageCompressionControlEXT::pname:flags is
2944e5c31af7Sopenharmony_ciename:VK_IMAGE_COMPRESSION_FIXED_RATE_EXPLICIT_EXT, then the etext:i^th^
2945e5c31af7Sopenharmony_cimember of the pname:pFixedRateFlags array specifies the allowed compression
2946e5c31af7Sopenharmony_cirates for the image's etext:i^th^ plane.
2947e5c31af7Sopenharmony_ci
2948e5c31af7Sopenharmony_ci[NOTE]
2949e5c31af7Sopenharmony_ci.Note
2950e5c31af7Sopenharmony_ci====
2951e5c31af7Sopenharmony_ciIf ename:VK_IMAGE_COMPRESSION_DISABLED_EXT is included in
2952e5c31af7Sopenharmony_cislink:VkImageCompressionControlEXT::pname:flags, both lossless and
2953e5c31af7Sopenharmony_cifixed-rate compression will be disabled.
2954e5c31af7Sopenharmony_ciThis is likely to have a negative impact on performance and is only intended
2955e5c31af7Sopenharmony_cito be used for debugging purposes.
2956e5c31af7Sopenharmony_ci====
2957e5c31af7Sopenharmony_ci--
2958e5c31af7Sopenharmony_ci
2959e5c31af7Sopenharmony_ci[open,refpage='VkImageCompressionFlagsEXT',desc='Bitmask of VkImageCompressionFlagBitsEXT', type='flags']
2960e5c31af7Sopenharmony_ci--
2961e5c31af7Sopenharmony_ciinclude::{generated}/api/flags/VkImageCompressionFlagsEXT.adoc[]
2962e5c31af7Sopenharmony_ci
2963e5c31af7Sopenharmony_citname:VkImageCompressionFlagsEXT is a bitmask type for setting a mask of
2964e5c31af7Sopenharmony_cizero or more elink:VkImageCompressionFlagBitsEXT.
2965e5c31af7Sopenharmony_ci--
2966e5c31af7Sopenharmony_ci
2967e5c31af7Sopenharmony_ci[open,refpage='VkImageCompressionFixedRateFlagsEXT',desc='Bitmask of VkImageCompressionFixedRateFlagBitsEXT',type='flags']
2968e5c31af7Sopenharmony_ci--
2969e5c31af7Sopenharmony_ciinclude::{generated}/api/flags/VkImageCompressionFixedRateFlagsEXT.adoc[]
2970e5c31af7Sopenharmony_ci
2971e5c31af7Sopenharmony_citname:VkImageCompressionFixedRateFlagsEXT is a bitmask type for setting a
2972e5c31af7Sopenharmony_cimask of zero or more elink:VkImageCompressionFixedRateFlagBitsEXT.
2973e5c31af7Sopenharmony_ci--
2974e5c31af7Sopenharmony_ci
2975e5c31af7Sopenharmony_ci[open,refpage='VkImageCompressionFixedRateFlagBitsEXT',desc='Bitmask specifying fixed rate image compression rates',type='enums']
2976e5c31af7Sopenharmony_ci--
2977e5c31af7Sopenharmony_ciBits which can: be set in
2978e5c31af7Sopenharmony_cislink:VkImageCompressionControlEXT::pname:pFixedRateFlags, specifying
2979e5c31af7Sopenharmony_ciallowed compression rates for an image plane, are:
2980e5c31af7Sopenharmony_ci
2981e5c31af7Sopenharmony_ciinclude::{generated}/api/enums/VkImageCompressionFixedRateFlagBitsEXT.adoc[]
2982e5c31af7Sopenharmony_ci
2983e5c31af7Sopenharmony_ci  * ename:VK_IMAGE_COMPRESSION_FIXED_RATE_NONE_EXT specifies that fixed-rate
2984e5c31af7Sopenharmony_ci    compression must: not be used.
2985e5c31af7Sopenharmony_ci  * ename:VK_IMAGE_COMPRESSION_FIXED_RATE_1BPC_BIT_EXT specifies that
2986e5c31af7Sopenharmony_ci    fixed-rate compression with a bitrate of [eq]#[1,2)# bits per component
2987e5c31af7Sopenharmony_ci    may: be used.
2988e5c31af7Sopenharmony_ci  * ename:VK_IMAGE_COMPRESSION_FIXED_RATE_2BPC_BIT_EXT specifies that
2989e5c31af7Sopenharmony_ci    fixed-rate compression with a bitrate of [eq]#[2,3)# bits per component
2990e5c31af7Sopenharmony_ci    may: be used.
2991e5c31af7Sopenharmony_ci  * ename:VK_IMAGE_COMPRESSION_FIXED_RATE_3BPC_BIT_EXT specifies that
2992e5c31af7Sopenharmony_ci    fixed-rate compression with a bitrate of [eq]#[3,4)# bits per component
2993e5c31af7Sopenharmony_ci    may: be used.
2994e5c31af7Sopenharmony_ci  * ename:VK_IMAGE_COMPRESSION_FIXED_RATE_4BPC_BIT_EXT specifies that
2995e5c31af7Sopenharmony_ci    fixed-rate compression with a bitrate of [eq]#[4,5)# bits per component
2996e5c31af7Sopenharmony_ci    may: be used.
2997e5c31af7Sopenharmony_ci  * ename:VK_IMAGE_COMPRESSION_FIXED_RATE_5BPC_BIT_EXT specifies that
2998e5c31af7Sopenharmony_ci    fixed-rate compression with a bitrate of [eq]#[5,6)# bits per component
2999e5c31af7Sopenharmony_ci    may: be used.
3000e5c31af7Sopenharmony_ci  * ename:VK_IMAGE_COMPRESSION_FIXED_RATE_6BPC_BIT_EXT specifies that
3001e5c31af7Sopenharmony_ci    fixed-rate compression with a bitrate of [eq]#[6,7)# bits per component
3002e5c31af7Sopenharmony_ci    may: be used.
3003e5c31af7Sopenharmony_ci  * ename:VK_IMAGE_COMPRESSION_FIXED_RATE_7BPC_BIT_EXT specifies that
3004e5c31af7Sopenharmony_ci    fixed-rate compression with a bitrate of [eq]#[7,8)# bits per component
3005e5c31af7Sopenharmony_ci    may: be used.
3006e5c31af7Sopenharmony_ci  * ename:VK_IMAGE_COMPRESSION_FIXED_RATE_8BPC_BIT_EXT specifies that
3007e5c31af7Sopenharmony_ci    fixed-rate compression with a bitrate of [eq]#[8,9)# bits per component
3008e5c31af7Sopenharmony_ci    may: be used.
3009e5c31af7Sopenharmony_ci  * ename:VK_IMAGE_COMPRESSION_FIXED_RATE_9BPC_BIT_EXT specifies that
3010e5c31af7Sopenharmony_ci    fixed-rate compression with a bitrate of [eq]#[9,10)# bits per component
3011e5c31af7Sopenharmony_ci    may: be used.
3012e5c31af7Sopenharmony_ci  * ename:VK_IMAGE_COMPRESSION_FIXED_RATE_10BPC_BIT_EXT specifies that
3013e5c31af7Sopenharmony_ci    fixed-rate compression with a bitrate of [eq]#[10,11)# bits per
3014e5c31af7Sopenharmony_ci    component may: be used.
3015e5c31af7Sopenharmony_ci  * ename:VK_IMAGE_COMPRESSION_FIXED_RATE_11BPC_BIT_EXT specifies that
3016e5c31af7Sopenharmony_ci    fixed-rate compression with a bitrate of [eq]#[11,12)# bits per
3017e5c31af7Sopenharmony_ci    component may: be used.
3018e5c31af7Sopenharmony_ci  * ename:VK_IMAGE_COMPRESSION_FIXED_RATE_12BPC_BIT_EXT specifies that
3019e5c31af7Sopenharmony_ci    fixed-rate compression with a bitrate of at least 12 bits per component
3020e5c31af7Sopenharmony_ci    may: be used.
3021e5c31af7Sopenharmony_ci
3022e5c31af7Sopenharmony_ciIf the format has a different bit rate for different components,
3023e5c31af7Sopenharmony_cislink:VkImageCompressionControlEXT::pname:pFixedRateFlags describes the rate
3024e5c31af7Sopenharmony_ciof the component with the largest number of bits assigned to it, scaled pro
3025e5c31af7Sopenharmony_cirata.
3026e5c31af7Sopenharmony_ciFor example, to request that a ename:VK_FORMAT_A2R10G10B10_UNORM_PACK32
3027e5c31af7Sopenharmony_ciformat be stored at a rate of 8 bits per pixel, use
3028e5c31af7Sopenharmony_ciename:VK_IMAGE_COMPRESSION_FIXED_RATE_2BPC_BIT_EXT (10 bits for the largest
3029e5c31af7Sopenharmony_cicomponent, stored at quarter the original size, 2.5 bits, rounded down).
3030e5c31af7Sopenharmony_ci
3031e5c31af7Sopenharmony_ciIf pname:flags includes ename:VK_IMAGE_COMPRESSION_FIXED_RATE_EXPLICIT_EXT,
3032e5c31af7Sopenharmony_ciand multiple bits are set in
3033e5c31af7Sopenharmony_cislink:VkImageCompressionControlEXT::pname:pFixedRateFlags for a plane,
3034e5c31af7Sopenharmony_ciimplementations should: apply the lowest allowed bitrate that is supported.
3035e5c31af7Sopenharmony_ci
3036e5c31af7Sopenharmony_ci[NOTE]
3037e5c31af7Sopenharmony_ci.Note
3038e5c31af7Sopenharmony_ci====
3039e5c31af7Sopenharmony_ciThe choice of "`bits per component`" terminology was chosen so that the same
3040e5c31af7Sopenharmony_cicompression rate describes the same degree of compression applied to formats
3041e5c31af7Sopenharmony_cithat differ only in the number of components.
3042e5c31af7Sopenharmony_ciFor example, ename:VK_FORMAT_R8G8_UNORM compressed to half its original size
3043e5c31af7Sopenharmony_ciis a rate of 4 bits per component, 8 bits per pixel.
3044e5c31af7Sopenharmony_ciename:VK_FORMAT_R8G8B8A8_UNORM compressed to half _its_ original size is 4
3045e5c31af7Sopenharmony_cibits per component, 16 bits per pixel.
3046e5c31af7Sopenharmony_ciBoth of these cases can be requested with
3047e5c31af7Sopenharmony_ciename:VK_IMAGE_COMPRESSION_FIXED_RATE_4BPC_BIT_EXT.
3048e5c31af7Sopenharmony_ci====
3049e5c31af7Sopenharmony_ci--
3050e5c31af7Sopenharmony_ci
3051e5c31af7Sopenharmony_ci[open,refpage='VkImageCompressionPropertiesEXT',desc='Compression properties of an image',type='structs']
3052e5c31af7Sopenharmony_ci--
3053e5c31af7Sopenharmony_ciTo query the compression properties of an image, add a
3054e5c31af7Sopenharmony_cislink:VkImageCompressionPropertiesEXT structure to the pname:pNext chain of
3055e5c31af7Sopenharmony_cithe slink:VkSubresourceLayout2EXT structure in a call to
3056e5c31af7Sopenharmony_ciifdef::VK_KHR_maintenance5[flink:vkGetImageSubresourceLayout2KHR or]
3057e5c31af7Sopenharmony_ciflink:vkGetImageSubresourceLayout2EXT.
3058e5c31af7Sopenharmony_ci
3059e5c31af7Sopenharmony_ciTo determine the compression rates that are supported for a given image
3060e5c31af7Sopenharmony_ciformat, add a slink:VkImageCompressionPropertiesEXT structure to the
3061e5c31af7Sopenharmony_cipname:pNext chain of the slink:VkImageFormatProperties2 structure in a call
3062e5c31af7Sopenharmony_cito flink:vkGetPhysicalDeviceImageFormatProperties2.
3063e5c31af7Sopenharmony_ci
3064e5c31af7Sopenharmony_ci[NOTE]
3065e5c31af7Sopenharmony_ci.Note
3066e5c31af7Sopenharmony_ci====
3067e5c31af7Sopenharmony_ciSince fixed-rate compression is disabled by default, the
3068e5c31af7Sopenharmony_cislink:VkImageCompressionPropertiesEXT structure passed to
3069e5c31af7Sopenharmony_ciflink:vkGetPhysicalDeviceImageFormatProperties2 will not indicate any
3070e5c31af7Sopenharmony_cifixed-rate compression support unless a slink:VkImageCompressionControlEXT
3071e5c31af7Sopenharmony_cistructure is also included in the pname:pNext chain of the
3072e5c31af7Sopenharmony_cislink:VkPhysicalDeviceImageFormatInfo2 structure passed to the same command.
3073e5c31af7Sopenharmony_ci====
3074e5c31af7Sopenharmony_ci
3075e5c31af7Sopenharmony_ciThe sname:VkImageCompressionPropertiesEXT structure is defined as:
3076e5c31af7Sopenharmony_ci
3077e5c31af7Sopenharmony_ciinclude::{generated}/api/structs/VkImageCompressionPropertiesEXT.adoc[]
3078e5c31af7Sopenharmony_ci
3079e5c31af7Sopenharmony_ci  * pname:sType is a elink:VkStructureType value identifying this structure.
3080e5c31af7Sopenharmony_ci  * pname:pNext is `NULL` or a pointer to a structure extending this
3081e5c31af7Sopenharmony_ci    structure.
3082e5c31af7Sopenharmony_ci  * pname:imageCompressionFlags returns a value describing the compression
3083e5c31af7Sopenharmony_ci    controls that apply to the image.
3084e5c31af7Sopenharmony_ci    The value will be either ename:VK_IMAGE_COMPRESSION_DEFAULT_EXT to
3085e5c31af7Sopenharmony_ci    indicate no fixed-rate compression,
3086e5c31af7Sopenharmony_ci    ename:VK_IMAGE_COMPRESSION_FIXED_RATE_EXPLICIT_EXT to indicate
3087e5c31af7Sopenharmony_ci    fixed-rate compression, or ename:VK_IMAGE_COMPRESSION_DISABLED_EXT to
3088e5c31af7Sopenharmony_ci    indicate no compression.
3089e5c31af7Sopenharmony_ci  * pname:imageCompressionFixedRateFlags returns a
3090e5c31af7Sopenharmony_ci    tlink:VkImageCompressionFixedRateFlagsEXT value describing the
3091e5c31af7Sopenharmony_ci    compression rates that apply to the specified aspect of the image.
3092e5c31af7Sopenharmony_ci
3093e5c31af7Sopenharmony_ciinclude::{generated}/validity/structs/VkImageCompressionPropertiesEXT.adoc[]
3094e5c31af7Sopenharmony_ci--
3095e5c31af7Sopenharmony_ciendif::VK_EXT_image_compression_control[]
3096e5c31af7Sopenharmony_ci
3097e5c31af7Sopenharmony_ci[open,refpage='VkImageUsageFlagBits',desc='Bitmask specifying intended usage of an image',type='enums']
3098e5c31af7Sopenharmony_ci--
3099e5c31af7Sopenharmony_ciBits which can: be set in
3100e5c31af7Sopenharmony_ci
3101e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_1,VK_KHR_maintenance2[]
3102e5c31af7Sopenharmony_ci  * slink:VkImageViewUsageCreateInfo::pname:usage
3103e5c31af7Sopenharmony_ciendif::VK_VERSION_1_1,VK_KHR_maintenance2[]
3104e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_2,VK_EXT_separate_stencil_usage[]
3105e5c31af7Sopenharmony_ci  * slink:VkImageStencilUsageCreateInfo::pname:stencilUsage
3106e5c31af7Sopenharmony_ciendif::VK_VERSION_1_2,VK_EXT_separate_stencil_usage[]
3107e5c31af7Sopenharmony_ci  * slink:VkImageCreateInfo::pname:usage
3108e5c31af7Sopenharmony_ci
3109e5c31af7Sopenharmony_cispecify intended usage of an image, and are:
3110e5c31af7Sopenharmony_ci
3111e5c31af7Sopenharmony_ciinclude::{generated}/api/enums/VkImageUsageFlagBits.adoc[]
3112e5c31af7Sopenharmony_ci
3113e5c31af7Sopenharmony_ci  * ename:VK_IMAGE_USAGE_TRANSFER_SRC_BIT specifies that the image can: be
3114e5c31af7Sopenharmony_ci    used as the source of a transfer command.
3115e5c31af7Sopenharmony_ci  * ename:VK_IMAGE_USAGE_TRANSFER_DST_BIT specifies that the image can: be
3116e5c31af7Sopenharmony_ci    used as the destination of a transfer command.
3117e5c31af7Sopenharmony_ci  * ename:VK_IMAGE_USAGE_SAMPLED_BIT specifies that the image can: be used
3118e5c31af7Sopenharmony_ci    to create a sname:VkImageView suitable for occupying a
3119e5c31af7Sopenharmony_ci    sname:VkDescriptorSet slot either of type
3120e5c31af7Sopenharmony_ci    ename:VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE or
3121e5c31af7Sopenharmony_ci    ename:VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER, and be sampled by a
3122e5c31af7Sopenharmony_ci    shader.
3123e5c31af7Sopenharmony_ci  * ename:VK_IMAGE_USAGE_STORAGE_BIT specifies that the image can: be used
3124e5c31af7Sopenharmony_ci    to create a sname:VkImageView suitable for occupying a
3125e5c31af7Sopenharmony_ci    sname:VkDescriptorSet slot of type
3126e5c31af7Sopenharmony_ci    ename:VK_DESCRIPTOR_TYPE_STORAGE_IMAGE.
3127e5c31af7Sopenharmony_ci  * ename:VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT specifies that the image can:
3128e5c31af7Sopenharmony_ci    be used to create a sname:VkImageView suitable for use as a color or
3129e5c31af7Sopenharmony_ci    resolve attachment in a sname:VkFramebuffer.
3130e5c31af7Sopenharmony_ci  * ename:VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT specifies that the
3131e5c31af7Sopenharmony_ci    image can: be used to create a sname:VkImageView suitable for use as a
3132e5c31af7Sopenharmony_ci    depth/stencil
3133e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_2,VK_KHR_depth_stencil_resolve[]
3134e5c31af7Sopenharmony_ci    or depth/stencil resolve
3135e5c31af7Sopenharmony_ciendif::VK_VERSION_1_2,VK_KHR_depth_stencil_resolve[]
3136e5c31af7Sopenharmony_ci    attachment in a sname:VkFramebuffer.
3137e5c31af7Sopenharmony_ci  * ename:VK_IMAGE_USAGE_TRANSIENT_ATTACHMENT_BIT specifies that
3138e5c31af7Sopenharmony_ci    implementations may: support using <<memory, memory allocations>> with
3139e5c31af7Sopenharmony_ci    the ename:VK_MEMORY_PROPERTY_LAZILY_ALLOCATED_BIT to back an image with
3140e5c31af7Sopenharmony_ci    this usage.
3141e5c31af7Sopenharmony_ci    This bit can: be set for any image that can: be used to create a
3142e5c31af7Sopenharmony_ci    sname:VkImageView suitable for use as a color, resolve, depth/stencil,
3143e5c31af7Sopenharmony_ci    or input attachment.
3144e5c31af7Sopenharmony_ci  * ename:VK_IMAGE_USAGE_INPUT_ATTACHMENT_BIT specifies that the image can:
3145e5c31af7Sopenharmony_ci    be used to create a sname:VkImageView suitable for occupying
3146e5c31af7Sopenharmony_ci    sname:VkDescriptorSet slot of type
3147e5c31af7Sopenharmony_ci    ename:VK_DESCRIPTOR_TYPE_INPUT_ATTACHMENT; be read from a shader as an
3148e5c31af7Sopenharmony_ci    input attachment; and be used as an input attachment in a framebuffer.
3149e5c31af7Sopenharmony_ciifdef::VK_EXT_fragment_density_map[]
3150e5c31af7Sopenharmony_ci  * ename:VK_IMAGE_USAGE_FRAGMENT_DENSITY_MAP_BIT_EXT specifies that the
3151e5c31af7Sopenharmony_ci    image can: be used to create a sname:VkImageView suitable for use as a
3152e5c31af7Sopenharmony_ci    <<fragmentdensitymapops, fragment density map image>>.
3153e5c31af7Sopenharmony_ciendif::VK_EXT_fragment_density_map[]
3154e5c31af7Sopenharmony_ciifdef::VK_KHR_fragment_shading_rate,VK_NV_shading_rate_image[]
3155e5c31af7Sopenharmony_ci  * ename:VK_IMAGE_USAGE_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR specifies
3156e5c31af7Sopenharmony_ci    that the image can: be used to create a sname:VkImageView suitable for
3157e5c31af7Sopenharmony_ci    use as a
3158e5c31af7Sopenharmony_ciifdef::VK_KHR_fragment_shading_rate[]
3159e5c31af7Sopenharmony_ci    <<primsrast-fragment-shading-rate-attachment, fragment shading rate
3160e5c31af7Sopenharmony_ci    attachment>>
3161e5c31af7Sopenharmony_ciendif::VK_KHR_fragment_shading_rate[]
3162e5c31af7Sopenharmony_ciifdef::VK_KHR_fragment_shading_rate+VK_NV_shading_rate_image[or]
3163e5c31af7Sopenharmony_ciifdef::VK_NV_shading_rate_image[]
3164e5c31af7Sopenharmony_ci    <<primsrast-shading-rate-image, shading rate image>>
3165e5c31af7Sopenharmony_ciendif::VK_NV_shading_rate_image[]
3166e5c31af7Sopenharmony_ciendif::VK_KHR_fragment_shading_rate,VK_NV_shading_rate_image[]
3167e5c31af7Sopenharmony_ciifdef::VK_KHR_video_decode_queue[]
3168e5c31af7Sopenharmony_ci  * ename:VK_IMAGE_USAGE_VIDEO_DECODE_DST_BIT_KHR specifies that the image
3169e5c31af7Sopenharmony_ci    can: be used as a <<decode-output-picture,decode output picture>> in a
3170e5c31af7Sopenharmony_ci    <<video-decode-operations,video decode operation>>.
3171e5c31af7Sopenharmony_ci  * ename:VK_IMAGE_USAGE_VIDEO_DECODE_SRC_BIT_KHR is reserved for future
3172e5c31af7Sopenharmony_ci    use.
3173e5c31af7Sopenharmony_ci  * ename:VK_IMAGE_USAGE_VIDEO_DECODE_DPB_BIT_KHR specifies that the image
3174e5c31af7Sopenharmony_ci    can: be used as an output <<reconstructed-picture,reconstructed
3175e5c31af7Sopenharmony_ci    picture>> or an input <<reference-picture,reference picture>> in a
3176e5c31af7Sopenharmony_ci    <<video-decode-operations,video decode operation>>.
3177e5c31af7Sopenharmony_ciendif::VK_KHR_video_decode_queue[]
3178e5c31af7Sopenharmony_ciifdef::VK_KHR_video_encode_queue[]
3179e5c31af7Sopenharmony_ci  * ename:VK_IMAGE_USAGE_VIDEO_ENCODE_DST_BIT_KHR is reserved for future
3180e5c31af7Sopenharmony_ci    use.
3181e5c31af7Sopenharmony_ci  * ename:VK_IMAGE_USAGE_VIDEO_ENCODE_SRC_BIT_KHR specifies that the image
3182e5c31af7Sopenharmony_ci    can: be used as an <<encode-input-picture,encode input picture>> in a
3183e5c31af7Sopenharmony_ci    <<video-encode-operations,video encode operation>>.
3184e5c31af7Sopenharmony_ci  * ename:VK_IMAGE_USAGE_VIDEO_ENCODE_DPB_BIT_KHR specifies that the image
3185e5c31af7Sopenharmony_ci    can: be used as an output <<reconstructed-picture,reconstructed
3186e5c31af7Sopenharmony_ci    picture>> or an input <<reference-picture,reference picture>> in a
3187e5c31af7Sopenharmony_ci    <<video-encode-operations,video encode operation>>.
3188e5c31af7Sopenharmony_ciendif::VK_KHR_video_encode_queue[]
3189e5c31af7Sopenharmony_ciifdef::VK_EXT_attachment_feedback_loop_layout[]
3190e5c31af7Sopenharmony_ci  * ename:VK_IMAGE_USAGE_ATTACHMENT_FEEDBACK_LOOP_BIT_EXT specifies that the
3191e5c31af7Sopenharmony_ci    image can: be transitioned to the
3192e5c31af7Sopenharmony_ci    ename:VK_IMAGE_LAYOUT_ATTACHMENT_FEEDBACK_LOOP_OPTIMAL_EXT layout to be
3193e5c31af7Sopenharmony_ci    used as a color or depth/stencil attachment in a sname:VkFramebuffer
3194e5c31af7Sopenharmony_ci    and/or as a read-only input resource in a shader (sampled image,
3195e5c31af7Sopenharmony_ci    combined image sampler or input attachment) in the same render pass.
3196e5c31af7Sopenharmony_ciendif::VK_EXT_attachment_feedback_loop_layout[]
3197e5c31af7Sopenharmony_ciifdef::VK_EXT_host_image_copy[]
3198e5c31af7Sopenharmony_ci  * ename:VK_IMAGE_USAGE_HOST_TRANSFER_BIT_EXT specifies that the image can:
3199e5c31af7Sopenharmony_ci    be used with host copy commands and host layout transitions.
3200e5c31af7Sopenharmony_ciendif::VK_EXT_host_image_copy[]
3201e5c31af7Sopenharmony_ci--
3202e5c31af7Sopenharmony_ci
3203e5c31af7Sopenharmony_ci[open,refpage='VkImageUsageFlags',desc='Bitmask of VkImageUsageFlagBits',type='flags']
3204e5c31af7Sopenharmony_ci--
3205e5c31af7Sopenharmony_ciinclude::{generated}/api/flags/VkImageUsageFlags.adoc[]
3206e5c31af7Sopenharmony_ci
3207e5c31af7Sopenharmony_citname:VkImageUsageFlags is a bitmask type for setting a mask of zero or more
3208e5c31af7Sopenharmony_cielink:VkImageUsageFlagBits.
3209e5c31af7Sopenharmony_ci
3210e5c31af7Sopenharmony_ci[[valid-imageview-imageusage]]
3211e5c31af7Sopenharmony_ciWhen creating a sname:VkImageView one of the following
3212e5c31af7Sopenharmony_cielink:VkImageUsageFlagBits must: be set:
3213e5c31af7Sopenharmony_ci
3214e5c31af7Sopenharmony_ci  * ename:VK_IMAGE_USAGE_SAMPLED_BIT
3215e5c31af7Sopenharmony_ci  * ename:VK_IMAGE_USAGE_STORAGE_BIT
3216e5c31af7Sopenharmony_ci  * ename:VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT
3217e5c31af7Sopenharmony_ci  * ename:VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT
3218e5c31af7Sopenharmony_ci  * ename:VK_IMAGE_USAGE_INPUT_ATTACHMENT_BIT
3219e5c31af7Sopenharmony_ci  * ename:VK_IMAGE_USAGE_TRANSIENT_ATTACHMENT_BIT
3220e5c31af7Sopenharmony_ciifdef::VK_NV_shading_rate_image,VK_KHR_fragment_shading_rate[]
3221e5c31af7Sopenharmony_ci  * ename:VK_IMAGE_USAGE_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR
3222e5c31af7Sopenharmony_ciendif::VK_NV_shading_rate_image,VK_KHR_fragment_shading_rate[]
3223e5c31af7Sopenharmony_ciifdef::VK_EXT_fragment_density_map[]
3224e5c31af7Sopenharmony_ci  * ename:VK_IMAGE_USAGE_FRAGMENT_DENSITY_MAP_BIT_EXT
3225e5c31af7Sopenharmony_ciendif::VK_EXT_fragment_density_map[]
3226e5c31af7Sopenharmony_ciifdef::VK_KHR_video_decode_queue[]
3227e5c31af7Sopenharmony_ci  * ename:VK_IMAGE_USAGE_VIDEO_DECODE_DST_BIT_KHR
3228e5c31af7Sopenharmony_ci  * ename:VK_IMAGE_USAGE_VIDEO_DECODE_DPB_BIT_KHR
3229e5c31af7Sopenharmony_ciendif::VK_KHR_video_decode_queue[]
3230e5c31af7Sopenharmony_ciifdef::VK_KHR_video_encode_queue[]
3231e5c31af7Sopenharmony_ci  * ename:VK_IMAGE_USAGE_VIDEO_ENCODE_SRC_BIT_KHR
3232e5c31af7Sopenharmony_ci  * ename:VK_IMAGE_USAGE_VIDEO_ENCODE_DPB_BIT_KHR
3233e5c31af7Sopenharmony_ciendif::VK_KHR_video_encode_queue[]
3234e5c31af7Sopenharmony_ciifdef::VK_QCOM_image_processing[]
3235e5c31af7Sopenharmony_ci  * ename:VK_IMAGE_USAGE_SAMPLE_WEIGHT_BIT_QCOM
3236e5c31af7Sopenharmony_ci  * ename:VK_IMAGE_USAGE_SAMPLE_BLOCK_MATCH_BIT_QCOM
3237e5c31af7Sopenharmony_ciendif::VK_QCOM_image_processing[]
3238e5c31af7Sopenharmony_ci--
3239e5c31af7Sopenharmony_ci
3240e5c31af7Sopenharmony_ci[open,refpage='VkImageCreateFlagBits',desc='Bitmask specifying additional parameters of an image',type='enums']
3241e5c31af7Sopenharmony_ci--
3242e5c31af7Sopenharmony_ciBits which can: be set in slink:VkImageCreateInfo::pname:flags, specifying
3243e5c31af7Sopenharmony_ciadditional parameters of an image, are:
3244e5c31af7Sopenharmony_ci
3245e5c31af7Sopenharmony_ciinclude::{generated}/api/enums/VkImageCreateFlagBits.adoc[]
3246e5c31af7Sopenharmony_ci
3247e5c31af7Sopenharmony_ci  * ename:VK_IMAGE_CREATE_SPARSE_BINDING_BIT specifies that the image will
3248e5c31af7Sopenharmony_ci    be backed using sparse memory binding.
3249e5c31af7Sopenharmony_ciifdef::VKSC_VERSION_1_0[]
3250e5c31af7Sopenharmony_ci    This flag is not supported in Vulkan SC <<SCID-8>>.
3251e5c31af7Sopenharmony_ciendif::VKSC_VERSION_1_0[]
3252e5c31af7Sopenharmony_ci  * ename:VK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT specifies that the image can:
3253e5c31af7Sopenharmony_ci    be partially backed using sparse memory binding.
3254e5c31af7Sopenharmony_ci    Images created with this flag must: also be created with the
3255e5c31af7Sopenharmony_ci    ename:VK_IMAGE_CREATE_SPARSE_BINDING_BIT flag.
3256e5c31af7Sopenharmony_ciifdef::VKSC_VERSION_1_0[]
3257e5c31af7Sopenharmony_ci    This flag is not supported in Vulkan SC <<SCID-8>>.
3258e5c31af7Sopenharmony_ciendif::VKSC_VERSION_1_0[]
3259e5c31af7Sopenharmony_ci  * ename:VK_IMAGE_CREATE_SPARSE_ALIASED_BIT specifies that the image will
3260e5c31af7Sopenharmony_ci    be backed using sparse memory binding with memory ranges that might also
3261e5c31af7Sopenharmony_ci    simultaneously be backing another image (or another portion of the same
3262e5c31af7Sopenharmony_ci    image).
3263e5c31af7Sopenharmony_ci    Images created with this flag must: also be created with the
3264e5c31af7Sopenharmony_ci    ename:VK_IMAGE_CREATE_SPARSE_BINDING_BIT flag.
3265e5c31af7Sopenharmony_ciifdef::VKSC_VERSION_1_0[]
3266e5c31af7Sopenharmony_ci    This flag is not supported in Vulkan SC <<SCID-8>>.
3267e5c31af7Sopenharmony_ciendif::VKSC_VERSION_1_0[]
3268e5c31af7Sopenharmony_ci  * ename:VK_IMAGE_CREATE_MUTABLE_FORMAT_BIT specifies that the image can:
3269e5c31af7Sopenharmony_ci    be used to create a sname:VkImageView with a different format from the
3270e5c31af7Sopenharmony_ci    image.
3271e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_1,VK_KHR_sampler_ycbcr_conversion[]
3272e5c31af7Sopenharmony_ci    For <<formats-requiring-sampler-ycbcr-conversion,multi-planar>> formats,
3273e5c31af7Sopenharmony_ci    ename:VK_IMAGE_CREATE_MUTABLE_FORMAT_BIT specifies that a
3274e5c31af7Sopenharmony_ci    sname:VkImageView can be created of a _plane_ of the image.
3275e5c31af7Sopenharmony_ciendif::VK_VERSION_1_1,VK_KHR_sampler_ycbcr_conversion[]
3276e5c31af7Sopenharmony_ci  * ename:VK_IMAGE_CREATE_CUBE_COMPATIBLE_BIT specifies that the image can:
3277e5c31af7Sopenharmony_ci    be used to create a sname:VkImageView of type
3278e5c31af7Sopenharmony_ci    ename:VK_IMAGE_VIEW_TYPE_CUBE or ename:VK_IMAGE_VIEW_TYPE_CUBE_ARRAY.
3279e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_1,VK_KHR_maintenance1[]
3280e5c31af7Sopenharmony_ci  * ename:VK_IMAGE_CREATE_2D_ARRAY_COMPATIBLE_BIT specifies that the image
3281e5c31af7Sopenharmony_ci    can: be used to create a sname:VkImageView of type
3282e5c31af7Sopenharmony_ci    ename:VK_IMAGE_VIEW_TYPE_2D or ename:VK_IMAGE_VIEW_TYPE_2D_ARRAY.
3283e5c31af7Sopenharmony_ciendif::VK_VERSION_1_1,VK_KHR_maintenance1[]
3284e5c31af7Sopenharmony_ciifdef::VK_EXT_image_2d_view_of_3d[]
3285e5c31af7Sopenharmony_ci  * ename:VK_IMAGE_CREATE_2D_VIEW_COMPATIBLE_BIT_EXT specifies that the
3286e5c31af7Sopenharmony_ci    image can: be used to create a sname:VkImageView of type
3287e5c31af7Sopenharmony_ci    ename:VK_IMAGE_VIEW_TYPE_2D.
3288e5c31af7Sopenharmony_ciendif::VK_EXT_image_2d_view_of_3d[]
3289e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_1[]
3290e5c31af7Sopenharmony_ci  * ename:VK_IMAGE_CREATE_PROTECTED_BIT specifies that the image is a
3291e5c31af7Sopenharmony_ci    protected image.
3292e5c31af7Sopenharmony_ciendif::VK_VERSION_1_1[]
3293e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_1,VK_KHR_device_group[]
3294e5c31af7Sopenharmony_ci  * ename:VK_IMAGE_CREATE_SPLIT_INSTANCE_BIND_REGIONS_BIT specifies that the
3295e5c31af7Sopenharmony_ci    image can: be used with a non-zero value of the
3296e5c31af7Sopenharmony_ci    pname:splitInstanceBindRegionCount member of a
3297e5c31af7Sopenharmony_ci    slink:VkBindImageMemoryDeviceGroupInfo structure passed into
3298e5c31af7Sopenharmony_ci    flink:vkBindImageMemory2.
3299e5c31af7Sopenharmony_ci    This flag also has the effect of making the image use the standard
3300e5c31af7Sopenharmony_ci    sparse image block dimensions.
3301e5c31af7Sopenharmony_ciifdef::VKSC_VERSION_1_0[]
3302e5c31af7Sopenharmony_ci    This flag is not supported in Vulkan SC <<SCID-8>>.
3303e5c31af7Sopenharmony_ciendif::VKSC_VERSION_1_0[]
3304e5c31af7Sopenharmony_ciendif::VK_VERSION_1_1,VK_KHR_device_group[]
3305e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_1,VK_KHR_maintenance2[]
3306e5c31af7Sopenharmony_ci  * ename:VK_IMAGE_CREATE_BLOCK_TEXEL_VIEW_COMPATIBLE_BIT specifies that the
3307e5c31af7Sopenharmony_ci    image having a compressed format can: be used to create a
3308e5c31af7Sopenharmony_ci    sname:VkImageView with an uncompressed format where each texel in the
3309e5c31af7Sopenharmony_ci    image view corresponds to a compressed texel block of the image.
3310e5c31af7Sopenharmony_ci  * ename:VK_IMAGE_CREATE_EXTENDED_USAGE_BIT specifies that the image can:
3311e5c31af7Sopenharmony_ci    be created with usage flags that are not supported for the format the
3312e5c31af7Sopenharmony_ci    image is created with but are supported for at least one format a
3313e5c31af7Sopenharmony_ci    sname:VkImageView created from the image can: have.
3314e5c31af7Sopenharmony_ciendif::VK_VERSION_1_1,VK_KHR_maintenance2[]
3315e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_1,VK_KHR_sampler_ycbcr_conversion[]
3316e5c31af7Sopenharmony_ci  * ename:VK_IMAGE_CREATE_DISJOINT_BIT specifies that an image with a
3317e5c31af7Sopenharmony_ci    <<formats-requiring-sampler-ycbcr-conversion,multi-planar format>> must:
3318e5c31af7Sopenharmony_ci    have each plane separately bound to memory, rather than having a single
3319e5c31af7Sopenharmony_ci    memory binding for the whole image; the presence of this bit
3320e5c31af7Sopenharmony_ci    distinguishes a _disjoint image_ from an image without this bit set.
3321e5c31af7Sopenharmony_ciendif::VK_VERSION_1_1,VK_KHR_sampler_ycbcr_conversion[]
3322e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_1,VK_KHR_bind_memory2[]
3323e5c31af7Sopenharmony_ci  * ename:VK_IMAGE_CREATE_ALIAS_BIT specifies that two images created with
3324e5c31af7Sopenharmony_ci    the same creation parameters and aliased to the same memory can:
3325e5c31af7Sopenharmony_ci    interpret the contents of the memory consistently with each other,
3326e5c31af7Sopenharmony_ci    subject to the rules described in the <<resources-memory-aliasing,Memory
3327e5c31af7Sopenharmony_ci    Aliasing>> section.
3328e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_1,VK_KHR_sampler_ycbcr_conversion[]
3329e5c31af7Sopenharmony_ci    This flag further specifies that each plane of a _disjoint_ image can:
3330e5c31af7Sopenharmony_ci    share an in-memory non-linear representation with single-plane images,
3331e5c31af7Sopenharmony_ci    and that a single-plane image can: share an in-memory non-linear
3332e5c31af7Sopenharmony_ci    representation with a plane of a multi-planar disjoint image, according
3333e5c31af7Sopenharmony_ci    to the rules in <<formats-compatible-planes>>.
3334e5c31af7Sopenharmony_ciendif::VK_VERSION_1_1,VK_KHR_sampler_ycbcr_conversion[]
3335e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_1,VK_KHR_external_memory,VK_NV_external_memory[]
3336e5c31af7Sopenharmony_ci    If the pname:pNext chain includes a
3337e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_1,VK_KHR_external_memory[slink:VkExternalMemoryImageCreateInfo]
3338e5c31af7Sopenharmony_ci// Jon: logic needs to incorporate VK_VERSION_1_1
3339e5c31af7Sopenharmony_ciifdef::VK_KHR_external_memory+VK_NV_external_memory[or]
3340e5c31af7Sopenharmony_ciifdef::VK_NV_external_memory[slink:VkExternalMemoryImageCreateInfoNV]
3341e5c31af7Sopenharmony_ci    structure whose pname:handleTypes member is not `0`, it is as if
3342e5c31af7Sopenharmony_ci    ename:VK_IMAGE_CREATE_ALIAS_BIT is set.
3343e5c31af7Sopenharmony_ciendif::VK_VERSION_1_1,VK_KHR_external_memory,VK_NV_external_memory[]
3344e5c31af7Sopenharmony_ciendif::VK_VERSION_1_1,VK_KHR_bind_memory2[]
3345e5c31af7Sopenharmony_ciifdef::VK_EXT_sample_locations[]
3346e5c31af7Sopenharmony_ci  * ename:VK_IMAGE_CREATE_SAMPLE_LOCATIONS_COMPATIBLE_DEPTH_BIT_EXT
3347e5c31af7Sopenharmony_ci    specifies that an image with a depth or depth/stencil format can: be
3348e5c31af7Sopenharmony_ci    used with custom sample locations when used as a depth/stencil
3349e5c31af7Sopenharmony_ci    attachment.
3350e5c31af7Sopenharmony_ciendif::VK_EXT_sample_locations[]
3351e5c31af7Sopenharmony_ciifdef::VK_NV_corner_sampled_image[]
3352e5c31af7Sopenharmony_ci  * ename:VK_IMAGE_CREATE_CORNER_SAMPLED_BIT_NV specifies that the image is
3353e5c31af7Sopenharmony_ci    a <<resources-images-corner-sampled,corner-sampled image>>.
3354e5c31af7Sopenharmony_ciendif::VK_NV_corner_sampled_image[]
3355e5c31af7Sopenharmony_ciifdef::VK_EXT_fragment_density_map[]
3356e5c31af7Sopenharmony_ci  * ename:VK_IMAGE_CREATE_SUBSAMPLED_BIT_EXT specifies that an image can: be
3357e5c31af7Sopenharmony_ci    in a subsampled format which may: be more optimal when written as an
3358e5c31af7Sopenharmony_ci    attachment by a render pass that has a fragment density map attachment.
3359e5c31af7Sopenharmony_ci    Accessing a subsampled image has additional considerations:
3360e5c31af7Sopenharmony_ci  ** Image data read as an image sampler will have undefined: values if the
3361e5c31af7Sopenharmony_ci     sampler was not created with pname:flags containing
3362e5c31af7Sopenharmony_ci     ename:VK_SAMPLER_CREATE_SUBSAMPLED_BIT_EXT or was not sampled through
3363e5c31af7Sopenharmony_ci     the use of a combined image sampler with an immutable sampler in
3364e5c31af7Sopenharmony_ci     sname:VkDescriptorSetLayoutBinding.
3365e5c31af7Sopenharmony_ci  ** Image data read with an input attachment will have undefined: values if
3366e5c31af7Sopenharmony_ci     the contents were not written as an attachment in an earlier subpass of
3367e5c31af7Sopenharmony_ci     the same render pass.
3368e5c31af7Sopenharmony_ciifdef::VK_EXT_fragment_density_map2[]
3369e5c31af7Sopenharmony_ci  ** Image data read as an image sampler in the fragment shader will be
3370e5c31af7Sopenharmony_ci     additionally be read by the device during
3371e5c31af7Sopenharmony_ci     ename:VK_PIPELINE_STAGE_VERTEX_SHADER_BIT if
3372e5c31af7Sopenharmony_ci     <<limits-subsampledCoarseReconstructionEarlyAccess,
3373e5c31af7Sopenharmony_ci     sname:VkPhysicalDeviceFragmentDensityMap2PropertiesEXT::pname:subsampledCoarseReconstructionEarlyAccess>>
3374e5c31af7Sopenharmony_ci     is ename:VK_TRUE and the sampler was created with pname:flags
3375e5c31af7Sopenharmony_ci     containing
3376e5c31af7Sopenharmony_ci     ename:VK_SAMPLER_CREATE_SUBSAMPLED_COARSE_RECONSTRUCTION_BIT_EXT.
3377e5c31af7Sopenharmony_ci  ** Image data read with load operations are resampled to the fragment
3378e5c31af7Sopenharmony_ci     density of the render pass if <<limits-subsampledLoads,
3379e5c31af7Sopenharmony_ci     sname:VkPhysicalDeviceFragmentDensityMap2PropertiesEXT::pname:subsampledLoads>>
3380e5c31af7Sopenharmony_ci     is ename:VK_TRUE.
3381e5c31af7Sopenharmony_ci     Otherwise, values of image data are undefined:.
3382e5c31af7Sopenharmony_ciendif::VK_EXT_fragment_density_map2[]
3383e5c31af7Sopenharmony_ciifndef::VK_EXT_fragment_density_map2[]
3384e5c31af7Sopenharmony_ci  ** Image data read with load operations may: be resampled to the fragment
3385e5c31af7Sopenharmony_ci     density of the render pass.
3386e5c31af7Sopenharmony_ciendif::VK_EXT_fragment_density_map2[]
3387e5c31af7Sopenharmony_ci  ** Image contents outside of the render area take on undefined: values if
3388e5c31af7Sopenharmony_ci     the image is stored as a render pass attachment.
3389e5c31af7Sopenharmony_ciifdef::VK_QCOM_fragment_density_map_offset[]
3390e5c31af7Sopenharmony_ci  * ename:VK_IMAGE_CREATE_FRAGMENT_DENSITY_MAP_OFFSET_BIT_QCOM specifies
3391e5c31af7Sopenharmony_ci    that an image can: be used in a render pass with non-zero
3392e5c31af7Sopenharmony_ci    <<renderpass-fragmentdensitymapoffsets,fragment density map offsets>>.
3393e5c31af7Sopenharmony_ci    In a render pass with non-zero offsets, fragment density map
3394e5c31af7Sopenharmony_ci    attachments, input attachments, color attachments, depth/stencil
3395e5c31af7Sopenharmony_ci    attachment, resolve attachments, and preserve attachments must: be
3396e5c31af7Sopenharmony_ci    created with ename:VK_IMAGE_CREATE_FRAGMENT_DENSITY_MAP_OFFSET_BIT_QCOM.
3397e5c31af7Sopenharmony_ciendif::VK_QCOM_fragment_density_map_offset[]
3398e5c31af7Sopenharmony_ciendif::VK_EXT_fragment_density_map[]
3399e5c31af7Sopenharmony_ciifdef::VK_EXT_descriptor_buffer[]
3400e5c31af7Sopenharmony_ci  * ename:VK_IMAGE_CREATE_DESCRIPTOR_BUFFER_CAPTURE_REPLAY_BIT_EXT specifies
3401e5c31af7Sopenharmony_ci    that the image can: be used with descriptor buffers when capturing and
3402e5c31af7Sopenharmony_ci    replaying (e.g. for trace capture and replay), see
3403e5c31af7Sopenharmony_ci    slink:VkOpaqueCaptureDescriptorDataCreateInfoEXT for more detail.
3404e5c31af7Sopenharmony_ciendif::VK_EXT_descriptor_buffer[]
3405e5c31af7Sopenharmony_ciifdef::VK_EXT_multisampled_render_to_single_sampled[]
3406e5c31af7Sopenharmony_ci  * ename:VK_IMAGE_CREATE_MULTISAMPLED_RENDER_TO_SINGLE_SAMPLED_BIT_EXT
3407e5c31af7Sopenharmony_ci    specifies that an image can: be used with
3408e5c31af7Sopenharmony_ci    <<multisampled-render-to-single-sampled,multisampled rendering as a
3409e5c31af7Sopenharmony_ci    single-sampled framebuffer attachment>>
3410e5c31af7Sopenharmony_ciendif::VK_EXT_multisampled_render_to_single_sampled[]
3411e5c31af7Sopenharmony_ciifdef::VK_KHR_video_maintenance1[]
3412e5c31af7Sopenharmony_ci  * ename:VK_IMAGE_CREATE_VIDEO_PROFILE_INDEPENDENT_BIT_KHR specifies that
3413e5c31af7Sopenharmony_ci    the image can: be used in <<video-coding,video coding operations>>
3414e5c31af7Sopenharmony_ci    without having to specify at image creation time the set of video
3415e5c31af7Sopenharmony_ci    profiles the image will be used with, except for images used only as
3416e5c31af7Sopenharmony_ci    <<dpb,DPB>> pictures, as long as the image is otherwise
3417e5c31af7Sopenharmony_ci    <<video-profile-compatibility,compatible>> with the video profile in
3418e5c31af7Sopenharmony_ci    question.
3419e5c31af7Sopenharmony_ci+
3420e5c31af7Sopenharmony_ci[NOTE]
3421e5c31af7Sopenharmony_ci.Note
3422e5c31af7Sopenharmony_ci====
3423e5c31af7Sopenharmony_ciThis enables exchanging video picture data without additional copies or
3424e5c31af7Sopenharmony_ciconversions when used as:
3425e5c31af7Sopenharmony_ci
3426e5c31af7Sopenharmony_ciifdef::VK_KHR_video_decode_queue[]
3427e5c31af7Sopenharmony_ci  * <<decode-output-picture,Decode output pictures>>, indifferent of the
3428e5c31af7Sopenharmony_ci    video profile used to produce them.
3429e5c31af7Sopenharmony_ciendif::VK_KHR_video_decode_queue[]
3430e5c31af7Sopenharmony_ciifdef::VK_KHR_video_encode_queue[]
3431e5c31af7Sopenharmony_ci  * <<encode-input-picture,Encode input pictures>>, indifferent of the video
3432e5c31af7Sopenharmony_ci    profile used to consume them.
3433e5c31af7Sopenharmony_ciendif::VK_KHR_video_encode_queue[]
3434e5c31af7Sopenharmony_ci
3435e5c31af7Sopenharmony_ciifdef::VK_KHR_video_decode_queue[]
3436e5c31af7Sopenharmony_ciThis includes images created with both
3437e5c31af7Sopenharmony_ciename:VK_IMAGE_USAGE_VIDEO_DECODE_DST_BIT_KHR and
3438e5c31af7Sopenharmony_ciename:VK_IMAGE_USAGE_VIDEO_DECODE_DPB_BIT_KHR, which is necessary to use the
3439e5c31af7Sopenharmony_cisame video picture as the <<reconstructed-picture,reconstructed picture>>
3440e5c31af7Sopenharmony_ciand <<decode-output-picture,decode output picture>> in a video decode
3441e5c31af7Sopenharmony_cioperation on implementations supporting
3442e5c31af7Sopenharmony_ciename:VK_VIDEO_DECODE_CAPABILITY_DPB_AND_OUTPUT_COINCIDE_BIT_KHR.
3443e5c31af7Sopenharmony_ciendif::VK_KHR_video_decode_queue[]
3444e5c31af7Sopenharmony_ci
3445e5c31af7Sopenharmony_ciHowever, images with only DPB usage remain tied to the video profiles the
3446e5c31af7Sopenharmony_ciimage was created with, as the data layout of such DPB-only images may: be
3447e5c31af7Sopenharmony_ciimplementation- and codec-dependent.
3448e5c31af7Sopenharmony_ci
3449e5c31af7Sopenharmony_ciIf an application would like to share or reuse the device memory backing
3450e5c31af7Sopenharmony_cisuch images (e.g. for the purposes of temporal aliasing), then it should:
3451e5c31af7Sopenharmony_cicreate separate image objects for each video profile and bind them to the
3452e5c31af7Sopenharmony_cisame underlying device memory range, similar to how memory resources can: be
3453e5c31af7Sopenharmony_cishared across separate video sessions or any other memory-backed resource.
3454e5c31af7Sopenharmony_ci====
3455e5c31af7Sopenharmony_ciendif::VK_KHR_video_maintenance1[]
3456e5c31af7Sopenharmony_ci
3457e5c31af7Sopenharmony_ciSee <<sparsememory-sparseresourcefeatures,Sparse Resource Features>> and
3458e5c31af7Sopenharmony_ci<<sparsememory-physicalfeatures,Sparse Physical Device Features>> for more
3459e5c31af7Sopenharmony_cidetails.
3460e5c31af7Sopenharmony_ci--
3461e5c31af7Sopenharmony_ci
3462e5c31af7Sopenharmony_ci[open,refpage='VkImageCreateFlags',desc='Bitmask of VkImageCreateFlagBits',type='flags']
3463e5c31af7Sopenharmony_ci--
3464e5c31af7Sopenharmony_ciinclude::{generated}/api/flags/VkImageCreateFlags.adoc[]
3465e5c31af7Sopenharmony_ci
3466e5c31af7Sopenharmony_citname:VkImageCreateFlags is a bitmask type for setting a mask of zero or
3467e5c31af7Sopenharmony_cimore elink:VkImageCreateFlagBits.
3468e5c31af7Sopenharmony_ci--
3469e5c31af7Sopenharmony_ci
3470e5c31af7Sopenharmony_ci[open,refpage='VkImageType',desc='Specifies the type of an image object',type='enums']
3471e5c31af7Sopenharmony_ci--
3472e5c31af7Sopenharmony_ciPossible values of slink:VkImageCreateInfo::pname:imageType, specifying the
3473e5c31af7Sopenharmony_cibasic dimensionality of an image, are:
3474e5c31af7Sopenharmony_ci
3475e5c31af7Sopenharmony_ciinclude::{generated}/api/enums/VkImageType.adoc[]
3476e5c31af7Sopenharmony_ci
3477e5c31af7Sopenharmony_ci  * ename:VK_IMAGE_TYPE_1D specifies a one-dimensional image.
3478e5c31af7Sopenharmony_ci  * ename:VK_IMAGE_TYPE_2D specifies a two-dimensional image.
3479e5c31af7Sopenharmony_ci  * ename:VK_IMAGE_TYPE_3D specifies a three-dimensional image.
3480e5c31af7Sopenharmony_ci--
3481e5c31af7Sopenharmony_ci
3482e5c31af7Sopenharmony_ci[open,refpage='VkImageTiling',desc='Specifies the tiling arrangement of data in an image',type='enums']
3483e5c31af7Sopenharmony_ci--
3484e5c31af7Sopenharmony_ciPossible values of slink:VkImageCreateInfo::pname:tiling, specifying the
3485e5c31af7Sopenharmony_citiling arrangement of texel blocks in an image, are:
3486e5c31af7Sopenharmony_ci
3487e5c31af7Sopenharmony_ciinclude::{generated}/api/enums/VkImageTiling.adoc[]
3488e5c31af7Sopenharmony_ci
3489e5c31af7Sopenharmony_ci  * ename:VK_IMAGE_TILING_OPTIMAL specifies optimal tiling (texels are laid
3490e5c31af7Sopenharmony_ci    out in an implementation-dependent arrangement, for more efficient
3491e5c31af7Sopenharmony_ci    memory access).
3492e5c31af7Sopenharmony_ci  * ename:VK_IMAGE_TILING_LINEAR specifies linear tiling (texels are laid
3493e5c31af7Sopenharmony_ci    out in memory in row-major order, possibly with some padding on each
3494e5c31af7Sopenharmony_ci    row).
3495e5c31af7Sopenharmony_ciifdef::VK_EXT_image_drm_format_modifier[]
3496e5c31af7Sopenharmony_ci  * ename:VK_IMAGE_TILING_DRM_FORMAT_MODIFIER_EXT indicates that the image's
3497e5c31af7Sopenharmony_ci    tiling is defined by a <<glossary-drm-format-modifier,Linux DRM format
3498e5c31af7Sopenharmony_ci    modifier>>.
3499e5c31af7Sopenharmony_ci    The modifier is specified at image creation with
3500e5c31af7Sopenharmony_ci    slink:VkImageDrmFormatModifierListCreateInfoEXT or
3501e5c31af7Sopenharmony_ci    slink:VkImageDrmFormatModifierExplicitCreateInfoEXT, and can: be queried
3502e5c31af7Sopenharmony_ci    with flink:vkGetImageDrmFormatModifierPropertiesEXT.
3503e5c31af7Sopenharmony_ciendif::VK_EXT_image_drm_format_modifier[]
3504e5c31af7Sopenharmony_ci--
3505e5c31af7Sopenharmony_ci
3506e5c31af7Sopenharmony_ci[open,refpage='vkGetImageSubresourceLayout',desc='Retrieve information about an image subresource',type='protos']
3507e5c31af7Sopenharmony_ci--
3508e5c31af7Sopenharmony_ci:refpage: vkGetImageSubresourceLayout
3509e5c31af7Sopenharmony_ci
3510e5c31af7Sopenharmony_ciTo query the memory layout of an image subresource, call:
3511e5c31af7Sopenharmony_ci
3512e5c31af7Sopenharmony_ciinclude::{generated}/api/protos/vkGetImageSubresourceLayout.adoc[]
3513e5c31af7Sopenharmony_ci
3514e5c31af7Sopenharmony_ci  * pname:device is the logical device that owns the image.
3515e5c31af7Sopenharmony_ci  * pname:image is the image whose layout is being queried.
3516e5c31af7Sopenharmony_ci  * pname:pSubresource is a pointer to a slink:VkImageSubresource structure
3517e5c31af7Sopenharmony_ci    selecting a specific image subresource from the image.
3518e5c31af7Sopenharmony_ci  * pname:pLayout is a pointer to a slink:VkSubresourceLayout structure in
3519e5c31af7Sopenharmony_ci    which the layout is returned.
3520e5c31af7Sopenharmony_ci
3521e5c31af7Sopenharmony_ciifndef::VK_EXT_image_drm_format_modifier[]
3522e5c31af7Sopenharmony_ciThe image must: be <<glossary-linear-resource,linear>>.
3523e5c31af7Sopenharmony_ciThe
3524e5c31af7Sopenharmony_ciendif::VK_EXT_image_drm_format_modifier[]
3525e5c31af7Sopenharmony_ciifdef::VK_EXT_image_drm_format_modifier[]
3526e5c31af7Sopenharmony_ciIf the image is <<glossary-linear-resource,linear>>, then the
3527e5c31af7Sopenharmony_ciendif::VK_EXT_image_drm_format_modifier[]
3528e5c31af7Sopenharmony_cireturned layout is valid for <<memory-device-hostaccess, host access>>.
3529e5c31af7Sopenharmony_ci
3530e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_1,VK_KHR_sampler_ycbcr_conversion[]
3531e5c31af7Sopenharmony_ciIf the image's
3532e5c31af7Sopenharmony_ciifdef::VK_EXT_image_drm_format_modifier[]
3533e5c31af7Sopenharmony_citiling is ename:VK_IMAGE_TILING_LINEAR and its
3534e5c31af7Sopenharmony_ciendif::VK_EXT_image_drm_format_modifier[]
3535e5c31af7Sopenharmony_ciformat is a <<formats-requiring-sampler-ycbcr-conversion,multi-planar
3536e5c31af7Sopenharmony_ciformat>>, then fname:vkGetImageSubresourceLayout describes one
3537e5c31af7Sopenharmony_ciifdef::VK_EXT_image_drm_format_modifier[_format plane_]
3538e5c31af7Sopenharmony_ciifndef::VK_EXT_image_drm_format_modifier[plane]
3539e5c31af7Sopenharmony_ciof the image.
3540e5c31af7Sopenharmony_ciendif::VK_VERSION_1_1,VK_KHR_sampler_ycbcr_conversion[]
3541e5c31af7Sopenharmony_ciifdef::VK_EXT_image_drm_format_modifier[]
3542e5c31af7Sopenharmony_ciIf the image's tiling is ename:VK_IMAGE_TILING_DRM_FORMAT_MODIFIER_EXT, then
3543e5c31af7Sopenharmony_cifname:vkGetImageSubresourceLayout describes one _memory plane_ of the image.
3544e5c31af7Sopenharmony_ciIf the image's tiling is ename:VK_IMAGE_TILING_DRM_FORMAT_MODIFIER_EXT and
3545e5c31af7Sopenharmony_cithe image is <<glossary-linear-resource,non-linear>>, then the returned
3546e5c31af7Sopenharmony_cilayout has an implementation-dependent meaning; the vendor of the image's
3547e5c31af7Sopenharmony_ci<<glossary-drm-format-modifier,DRM format modifier>> may: provide
3548e5c31af7Sopenharmony_cidocumentation that explains how to interpret the returned layout.
3549e5c31af7Sopenharmony_ciendif::VK_EXT_image_drm_format_modifier[]
3550e5c31af7Sopenharmony_ci
3551e5c31af7Sopenharmony_cifname:vkGetImageSubresourceLayout is invariant for the lifetime of a single
3552e5c31af7Sopenharmony_ciimage.
3553e5c31af7Sopenharmony_ciifdef::VK_ANDROID_external_memory_android_hardware_buffer,VK_QNX_external_memory_screen_buffer[]
3554e5c31af7Sopenharmony_ciHowever, the subresource layout of images in Android hardware buffer or QNX
3555e5c31af7Sopenharmony_ciScreen buffer external memory is not known until the image has been bound to
3556e5c31af7Sopenharmony_cimemory, so applications must: not call flink:vkGetImageSubresourceLayout for
3557e5c31af7Sopenharmony_cisuch an image before it has been bound.
3558e5c31af7Sopenharmony_ciendif::VK_ANDROID_external_memory_android_hardware_buffer,VK_QNX_external_memory_screen_buffer[]
3559e5c31af7Sopenharmony_ci
3560e5c31af7Sopenharmony_ci:imageparam: image
3561e5c31af7Sopenharmony_ci
3562e5c31af7Sopenharmony_ci.Valid Usage
3563e5c31af7Sopenharmony_ci****
3564e5c31af7Sopenharmony_ciifndef::VK_EXT_image_drm_format_modifier[]
3565e5c31af7Sopenharmony_ci  * [[VUID-vkGetImageSubresourceLayout-image-07789]]
3566e5c31af7Sopenharmony_ci    pname:image must: have been created with pname:tiling equal to
3567e5c31af7Sopenharmony_ci    ename:VK_IMAGE_TILING_LINEAR
3568e5c31af7Sopenharmony_ciendif::VK_EXT_image_drm_format_modifier[]
3569e5c31af7Sopenharmony_ciifdef::VK_EXT_image_drm_format_modifier[]
3570e5c31af7Sopenharmony_ci  * [[VUID-vkGetImageSubresourceLayout-image-07790]]
3571e5c31af7Sopenharmony_ci    pname:image must: have been created with pname:tiling equal to
3572e5c31af7Sopenharmony_ci    ename:VK_IMAGE_TILING_LINEAR or
3573e5c31af7Sopenharmony_ci    ename:VK_IMAGE_TILING_DRM_FORMAT_MODIFIER_EXT
3574e5c31af7Sopenharmony_ciendif::VK_EXT_image_drm_format_modifier[]
3575e5c31af7Sopenharmony_ciinclude::{chapters}/commonvalidity/get_image_subresource_layout_common.adoc[]
3576e5c31af7Sopenharmony_ciifdef::VK_ANDROID_external_memory_android_hardware_buffer[]
3577e5c31af7Sopenharmony_ci  * [[VUID-vkGetImageSubresourceLayout-image-09432]]
3578e5c31af7Sopenharmony_ci    If pname:image was created with the
3579e5c31af7Sopenharmony_ci    ename:VK_EXTERNAL_MEMORY_HANDLE_TYPE_ANDROID_HARDWARE_BUFFER_BIT_ANDROID
3580e5c31af7Sopenharmony_ci    external memory handle type, then pname:image must: be bound to memory
3581e5c31af7Sopenharmony_ciendif::VK_ANDROID_external_memory_android_hardware_buffer[]
3582e5c31af7Sopenharmony_ciifdef::VK_EXT_image_drm_format_modifier[]
3583e5c31af7Sopenharmony_ci  * [[VUID-vkGetImageSubresourceLayout-tiling-09433]]
3584e5c31af7Sopenharmony_ci    If the pname:tiling of the pname:image is
3585e5c31af7Sopenharmony_ci    ename:VK_IMAGE_TILING_DRM_FORMAT_MODIFIER_EXT, then the pname:aspectMask
3586e5c31af7Sopenharmony_ci    member of pname:pSubresource must: be
3587e5c31af7Sopenharmony_ci    `VK_IMAGE_ASPECT_MEMORY_PLANE__{ibit}__BIT_EXT` and the index _i_ must:
3588e5c31af7Sopenharmony_ci    be less than the
3589e5c31af7Sopenharmony_ci    slink:VkDrmFormatModifierPropertiesEXT::pname:drmFormatModifierPlaneCount
3590e5c31af7Sopenharmony_ci    associated with the image's pname:format and
3591e5c31af7Sopenharmony_ci    slink:VkImageDrmFormatModifierPropertiesEXT::pname:drmFormatModifier
3592e5c31af7Sopenharmony_ciendif::VK_EXT_image_drm_format_modifier[]
3593e5c31af7Sopenharmony_ci****
3594e5c31af7Sopenharmony_ci
3595e5c31af7Sopenharmony_ciinclude::{generated}/validity/protos/vkGetImageSubresourceLayout.adoc[]
3596e5c31af7Sopenharmony_ci--
3597e5c31af7Sopenharmony_ci
3598e5c31af7Sopenharmony_ci[open,refpage='VkImageSubresource',desc='Structure specifying an image subresource',type='structs']
3599e5c31af7Sopenharmony_ci--
3600e5c31af7Sopenharmony_ciThe sname:VkImageSubresource structure is defined as:
3601e5c31af7Sopenharmony_ci
3602e5c31af7Sopenharmony_ciinclude::{generated}/api/structs/VkImageSubresource.adoc[]
3603e5c31af7Sopenharmony_ci
3604e5c31af7Sopenharmony_ci  * pname:aspectMask is a tlink:VkImageAspectFlags value selecting the image
3605e5c31af7Sopenharmony_ci    _aspect_.
3606e5c31af7Sopenharmony_ci  * pname:mipLevel selects the mipmap level.
3607e5c31af7Sopenharmony_ci  * pname:arrayLayer selects the array layer.
3608e5c31af7Sopenharmony_ci
3609e5c31af7Sopenharmony_ciinclude::{generated}/validity/structs/VkImageSubresource.adoc[]
3610e5c31af7Sopenharmony_ci--
3611e5c31af7Sopenharmony_ci
3612e5c31af7Sopenharmony_ci[open,refpage='VkSubresourceLayout',desc='Structure specifying subresource layout',type='structs']
3613e5c31af7Sopenharmony_ci--
3614e5c31af7Sopenharmony_ciInformation about the layout of the image subresource is returned in a
3615e5c31af7Sopenharmony_cisname:VkSubresourceLayout structure:
3616e5c31af7Sopenharmony_ci
3617e5c31af7Sopenharmony_ciinclude::{generated}/api/structs/VkSubresourceLayout.adoc[]
3618e5c31af7Sopenharmony_ci
3619e5c31af7Sopenharmony_ci  * pname:offset is the byte offset from the start of the image
3620e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_1,VK_KHR_sampler_ycbcr_conversion[]
3621e5c31af7Sopenharmony_ci    or the plane
3622e5c31af7Sopenharmony_ciendif::VK_VERSION_1_1,VK_KHR_sampler_ycbcr_conversion[]
3623e5c31af7Sopenharmony_ci    where the image subresource begins.
3624e5c31af7Sopenharmony_ci  * pname:size is the size in bytes of the image subresource.
3625e5c31af7Sopenharmony_ci    pname:size includes any extra memory that is required based on
3626e5c31af7Sopenharmony_ci    pname:rowPitch.
3627e5c31af7Sopenharmony_ci  * pname:rowPitch describes the number of bytes between each row of texels
3628e5c31af7Sopenharmony_ci    in an image.
3629e5c31af7Sopenharmony_ci  * pname:arrayPitch describes the number of bytes between each array layer
3630e5c31af7Sopenharmony_ci    of an image.
3631e5c31af7Sopenharmony_ci  * pname:depthPitch describes the number of bytes between each slice of 3D
3632e5c31af7Sopenharmony_ci    image.
3633e5c31af7Sopenharmony_ci
3634e5c31af7Sopenharmony_ciIf the image is <<glossary-linear-resource,linear>>, then pname:rowPitch,
3635e5c31af7Sopenharmony_cipname:arrayPitch and pname:depthPitch describe the layout of the image
3636e5c31af7Sopenharmony_cisubresource in linear memory.
3637e5c31af7Sopenharmony_ciFor uncompressed formats, pname:rowPitch is the number of bytes between
3638e5c31af7Sopenharmony_citexels with the same x coordinate in adjacent rows (y coordinates differ by
3639e5c31af7Sopenharmony_cione).
3640e5c31af7Sopenharmony_cipname:arrayPitch is the number of bytes between texels with the same x and y
3641e5c31af7Sopenharmony_cicoordinate in adjacent array layers of the image (array layer values differ
3642e5c31af7Sopenharmony_ciby one).
3643e5c31af7Sopenharmony_cipname:depthPitch is the number of bytes between texels with the same x and y
3644e5c31af7Sopenharmony_cicoordinate in adjacent slices of a 3D image (z coordinates differ by one).
3645e5c31af7Sopenharmony_ciExpressed as an addressing formula, the starting byte of a texel in the
3646e5c31af7Sopenharmony_ciimage subresource has address:
3647e5c31af7Sopenharmony_ci
3648e5c31af7Sopenharmony_ci[source,c]
3649e5c31af7Sopenharmony_ci----
3650e5c31af7Sopenharmony_ci// (x,y,z,layer) are in texel coordinates
3651e5c31af7Sopenharmony_ciaddress(x,y,z,layer) = layer*arrayPitch + z*depthPitch + y*rowPitch + x*elementSize + offset
3652e5c31af7Sopenharmony_ci----
3653e5c31af7Sopenharmony_ci
3654e5c31af7Sopenharmony_ciFor compressed formats, the pname:rowPitch is the number of bytes between
3655e5c31af7Sopenharmony_cicompressed texel blocks in adjacent rows.
3656e5c31af7Sopenharmony_cipname:arrayPitch is the number of bytes between compressed texel blocks in
3657e5c31af7Sopenharmony_ciadjacent array layers.
3658e5c31af7Sopenharmony_cipname:depthPitch is the number of bytes between compressed texel blocks in
3659e5c31af7Sopenharmony_ciadjacent slices of a 3D image.
3660e5c31af7Sopenharmony_ci
3661e5c31af7Sopenharmony_ci[source,c]
3662e5c31af7Sopenharmony_ci----
3663e5c31af7Sopenharmony_ci// (x,y,z,layer) are in compressed texel block coordinates
3664e5c31af7Sopenharmony_ciaddress(x,y,z,layer) = layer*arrayPitch + z*depthPitch + y*rowPitch + x*compressedTexelBlockByteSize + offset;
3665e5c31af7Sopenharmony_ci----
3666e5c31af7Sopenharmony_ci
3667e5c31af7Sopenharmony_ciThe value of pname:arrayPitch is undefined: for images that were not created
3668e5c31af7Sopenharmony_cias arrays.
3669e5c31af7Sopenharmony_cipname:depthPitch is defined only for 3D images.
3670e5c31af7Sopenharmony_ci
3671e5c31af7Sopenharmony_ciIf the image has a
3672e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_1,VK_KHR_sampler_ycbcr_conversion[]
3673e5c31af7Sopenharmony_ci_single-plane_
3674e5c31af7Sopenharmony_ciendif::VK_VERSION_1_1,VK_KHR_sampler_ycbcr_conversion[]
3675e5c31af7Sopenharmony_cicolor format
3676e5c31af7Sopenharmony_ciifdef::VK_EXT_image_drm_format_modifier[]
3677e5c31af7Sopenharmony_ciand its tiling is ename:VK_IMAGE_TILING_LINEAR
3678e5c31af7Sopenharmony_ciendif::VK_EXT_image_drm_format_modifier[]
3679e5c31af7Sopenharmony_ci, then the pname:aspectMask member of sname:VkImageSubresource must: be
3680e5c31af7Sopenharmony_ciename:VK_IMAGE_ASPECT_COLOR_BIT.
3681e5c31af7Sopenharmony_ci
3682e5c31af7Sopenharmony_ciIf the image has a depth/stencil format
3683e5c31af7Sopenharmony_ciifdef::VK_EXT_image_drm_format_modifier[]
3684e5c31af7Sopenharmony_ciand its tiling is ename:VK_IMAGE_TILING_LINEAR
3685e5c31af7Sopenharmony_ciendif::VK_EXT_image_drm_format_modifier[]
3686e5c31af7Sopenharmony_ci, then pname:aspectMask must: be either ename:VK_IMAGE_ASPECT_DEPTH_BIT or
3687e5c31af7Sopenharmony_ciename:VK_IMAGE_ASPECT_STENCIL_BIT.
3688e5c31af7Sopenharmony_ciOn implementations that store depth and stencil aspects separately, querying
3689e5c31af7Sopenharmony_cieach of these image subresource layouts will return a different pname:offset
3690e5c31af7Sopenharmony_ciand pname:size representing the region of memory used for that aspect.
3691e5c31af7Sopenharmony_ciOn implementations that store depth and stencil aspects interleaved, the
3692e5c31af7Sopenharmony_cisame pname:offset and pname:size are returned and represent the interleaved
3693e5c31af7Sopenharmony_cimemory allocation.
3694e5c31af7Sopenharmony_ci
3695e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_1,VK_KHR_sampler_ycbcr_conversion[]
3696e5c31af7Sopenharmony_ciIf the image has a <<formats-requiring-sampler-ycbcr-conversion,multi-planar
3697e5c31af7Sopenharmony_ciformat>>
3698e5c31af7Sopenharmony_ciifdef::VK_EXT_image_drm_format_modifier[]
3699e5c31af7Sopenharmony_ciand its tiling is ename:VK_IMAGE_TILING_LINEAR
3700e5c31af7Sopenharmony_ciendif::VK_EXT_image_drm_format_modifier[]
3701e5c31af7Sopenharmony_ci, then the pname:aspectMask member of sname:VkImageSubresource must: be
3702e5c31af7Sopenharmony_ciename:VK_IMAGE_ASPECT_PLANE_0_BIT, ename:VK_IMAGE_ASPECT_PLANE_1_BIT, or
3703e5c31af7Sopenharmony_ci(for 3-plane formats only) ename:VK_IMAGE_ASPECT_PLANE_2_BIT.
3704e5c31af7Sopenharmony_ciQuerying each of these image subresource layouts will return a different
3705e5c31af7Sopenharmony_cipname:offset and pname:size representing the region of memory used for that
3706e5c31af7Sopenharmony_ciplane.
3707e5c31af7Sopenharmony_ciIf the image is _disjoint_, then the pname:offset is relative to the base
3708e5c31af7Sopenharmony_ciaddress of the plane.
3709e5c31af7Sopenharmony_ciIf the image is _non-disjoint_, then the pname:offset is relative to the
3710e5c31af7Sopenharmony_cibase address of the image.
3711e5c31af7Sopenharmony_ciendif::VK_VERSION_1_1,VK_KHR_sampler_ycbcr_conversion[]
3712e5c31af7Sopenharmony_ci
3713e5c31af7Sopenharmony_ciifdef::VK_EXT_image_drm_format_modifier[]
3714e5c31af7Sopenharmony_ciIf the image's tiling is ename:VK_IMAGE_TILING_DRM_FORMAT_MODIFIER_EXT, then
3715e5c31af7Sopenharmony_cithe pname:aspectMask member of sname:VkImageSubresource must: be one of
3716e5c31af7Sopenharmony_ci`VK_IMAGE_ASPECT_MEMORY_PLANE__{ibit}__BIT_EXT`, where the maximum allowed
3717e5c31af7Sopenharmony_ciplane index _i_ is defined by the
3718e5c31af7Sopenharmony_cislink:VkDrmFormatModifierPropertiesEXT::pname:drmFormatModifierPlaneCount
3719e5c31af7Sopenharmony_ciassociated with the image's slink:VkImageCreateInfo::pname:format and
3720e5c31af7Sopenharmony_ci<<glossary-drm-format-modifier,modifier>>.
3721e5c31af7Sopenharmony_ciThe memory range used by the subresource is described by pname:offset and
3722e5c31af7Sopenharmony_cipname:size.
3723e5c31af7Sopenharmony_ciIf the image is _disjoint_, then the pname:offset is relative to the base
3724e5c31af7Sopenharmony_ciaddress of the _memory plane_.
3725e5c31af7Sopenharmony_ciIf the image is _non-disjoint_, then the pname:offset is relative to the
3726e5c31af7Sopenharmony_cibase address of the image.
3727e5c31af7Sopenharmony_ciIf the image is <<glossary-linear-resource,non-linear>>, then
3728e5c31af7Sopenharmony_cipname:rowPitch, pname:arrayPitch, and pname:depthPitch have an
3729e5c31af7Sopenharmony_ciimplementation-dependent meaning.
3730e5c31af7Sopenharmony_ciendif::VK_EXT_image_drm_format_modifier[]
3731e5c31af7Sopenharmony_ci
3732e5c31af7Sopenharmony_ciinclude::{generated}/validity/structs/VkSubresourceLayout.adoc[]
3733e5c31af7Sopenharmony_ci--
3734e5c31af7Sopenharmony_ci
3735e5c31af7Sopenharmony_ciifdef::VK_KHR_maintenance5,VK_EXT_image_compression_control,VK_EXT_host_image_copy[]
3736e5c31af7Sopenharmony_ci[open,refpage='vkGetImageSubresourceLayout2KHR',desc='Retrieve information about an image subresource',type='protos']
3737e5c31af7Sopenharmony_ci--
3738e5c31af7Sopenharmony_ci:refpage: vkGetImageSubresourceLayout2KHR
3739e5c31af7Sopenharmony_ci
3740e5c31af7Sopenharmony_ciTo query the memory layout of an image subresource, call:
3741e5c31af7Sopenharmony_ci
3742e5c31af7Sopenharmony_ciifdef::VK_KHR_maintenance5[]
3743e5c31af7Sopenharmony_ciinclude::{generated}/api/protos/vkGetImageSubresourceLayout2KHR.adoc[]
3744e5c31af7Sopenharmony_ciendif::VK_KHR_maintenance5[]
3745e5c31af7Sopenharmony_ci
3746e5c31af7Sopenharmony_ciifdef::VK_KHR_maintenance5[]
3747e5c31af7Sopenharmony_ciifdef::VK_EXT_image_compression_control,VK_EXT_host_image_copy[or the equivalent command]
3748e5c31af7Sopenharmony_ciendif::VK_KHR_maintenance5[]
3749e5c31af7Sopenharmony_ci
3750e5c31af7Sopenharmony_ciifdef::VK_EXT_image_compression_control,VK_EXT_host_image_copy[]
3751e5c31af7Sopenharmony_ciinclude::{generated}/api/protos/vkGetImageSubresourceLayout2EXT.adoc[]
3752e5c31af7Sopenharmony_ciendif::VK_EXT_image_compression_control,VK_EXT_host_image_copy[]
3753e5c31af7Sopenharmony_ci
3754e5c31af7Sopenharmony_ci  * pname:device is the logical device that owns the image.
3755e5c31af7Sopenharmony_ci  * pname:image is the image whose layout is being queried.
3756e5c31af7Sopenharmony_ci  * pname:pSubresource is a pointer to a slink:VkImageSubresource2KHR
3757e5c31af7Sopenharmony_ci    structure selecting a specific image for the image subresource.
3758e5c31af7Sopenharmony_ci  * pname:pLayout is a pointer to a slink:VkSubresourceLayout2KHR structure
3759e5c31af7Sopenharmony_ci    in which the layout is returned.
3760e5c31af7Sopenharmony_ci
3761e5c31af7Sopenharmony_cifname:vkGetImageSubresourceLayout2KHR behaves similarly to
3762e5c31af7Sopenharmony_ciflink:vkGetImageSubresourceLayout, with the ability to specify extended
3763e5c31af7Sopenharmony_ciinputs via chained input structures, and to return extended information via
3764e5c31af7Sopenharmony_cichained output structures.
3765e5c31af7Sopenharmony_ci
3766e5c31af7Sopenharmony_ciIt is legal to call fname:vkGetImageSubresourceLayout2KHR with a pname:image
3767e5c31af7Sopenharmony_cicreated with pname:tiling equal to ename:VK_IMAGE_TILING_OPTIMAL, but the
3768e5c31af7Sopenharmony_cimembers of slink:VkSubresourceLayout2KHR::pname:subresourceLayout will have
3769e5c31af7Sopenharmony_ciundefined: values in this case.
3770e5c31af7Sopenharmony_ci
3771e5c31af7Sopenharmony_ci[NOTE]
3772e5c31af7Sopenharmony_ci.Note
3773e5c31af7Sopenharmony_ci====
3774e5c31af7Sopenharmony_ciStructures chained from slink:VkImageSubresource2KHR::pname:pNext will also
3775e5c31af7Sopenharmony_cibe updated when pname:tiling is equal to ename:VK_IMAGE_TILING_OPTIMAL.
3776e5c31af7Sopenharmony_ci====
3777e5c31af7Sopenharmony_ci
3778e5c31af7Sopenharmony_ci:imageparam: image
3779e5c31af7Sopenharmony_ci
3780e5c31af7Sopenharmony_ci.Valid Usage
3781e5c31af7Sopenharmony_ci****
3782e5c31af7Sopenharmony_ciinclude::{chapters}/commonvalidity/get_image_subresource_layout_common.adoc[]
3783e5c31af7Sopenharmony_ciifdef::VK_ANDROID_external_memory_android_hardware_buffer[]
3784e5c31af7Sopenharmony_ci  * [[VUID-vkGetImageSubresourceLayout2KHR-image-09434]]
3785e5c31af7Sopenharmony_ci    If pname:image was created with the
3786e5c31af7Sopenharmony_ci    ename:VK_EXTERNAL_MEMORY_HANDLE_TYPE_ANDROID_HARDWARE_BUFFER_BIT_ANDROID
3787e5c31af7Sopenharmony_ci    external memory handle type, then pname:image must: be bound to memory
3788e5c31af7Sopenharmony_ciendif::VK_ANDROID_external_memory_android_hardware_buffer[]
3789e5c31af7Sopenharmony_ciifdef::VK_EXT_image_drm_format_modifier[]
3790e5c31af7Sopenharmony_ci  * [[VUID-vkGetImageSubresourceLayout2KHR-tiling-09435]]
3791e5c31af7Sopenharmony_ci    If the pname:tiling of the pname:image is
3792e5c31af7Sopenharmony_ci    ename:VK_IMAGE_TILING_DRM_FORMAT_MODIFIER_EXT, then the pname:aspectMask
3793e5c31af7Sopenharmony_ci    member of pname:pSubresource must: be
3794e5c31af7Sopenharmony_ci    `VK_IMAGE_ASPECT_MEMORY_PLANE__{ibit}__BIT_EXT` and the index _i_ must:
3795e5c31af7Sopenharmony_ci    be less than the
3796e5c31af7Sopenharmony_ci    slink:VkDrmFormatModifierPropertiesEXT::pname:drmFormatModifierPlaneCount
3797e5c31af7Sopenharmony_ci    associated with the image's pname:format and
3798e5c31af7Sopenharmony_ci    slink:VkImageDrmFormatModifierPropertiesEXT::pname:drmFormatModifier
3799e5c31af7Sopenharmony_ciendif::VK_EXT_image_drm_format_modifier[]
3800e5c31af7Sopenharmony_ci****
3801e5c31af7Sopenharmony_ci
3802e5c31af7Sopenharmony_ciinclude::{generated}/validity/protos/vkGetImageSubresourceLayout2KHR.adoc[]
3803e5c31af7Sopenharmony_ci--
3804e5c31af7Sopenharmony_ci
3805e5c31af7Sopenharmony_ci[open,refpage='VkImageSubresource2KHR',desc='Structure specifying an image subresource',type='structs',alias='VkImageSubresource2EXT']
3806e5c31af7Sopenharmony_ci--
3807e5c31af7Sopenharmony_ciThe sname:VkImageSubresource2KHR structure is defined as:
3808e5c31af7Sopenharmony_ci
3809e5c31af7Sopenharmony_ciinclude::{generated}/api/structs/VkImageSubresource2KHR.adoc[]
3810e5c31af7Sopenharmony_ci
3811e5c31af7Sopenharmony_ciifdef::VK_KHR_maintenance5[]
3812e5c31af7Sopenharmony_ciifdef::VK_EXT_image_compression_control,VK_EXT_host_image_copy[or the equivalent]
3813e5c31af7Sopenharmony_ciendif::VK_KHR_maintenance5[]
3814e5c31af7Sopenharmony_ci
3815e5c31af7Sopenharmony_ciifdef::VK_EXT_image_compression_control,VK_EXT_host_image_copy[]
3816e5c31af7Sopenharmony_ciinclude::{generated}/api/structs/VkImageSubresource2EXT.adoc[]
3817e5c31af7Sopenharmony_ciendif::VK_EXT_image_compression_control,VK_EXT_host_image_copy[]
3818e5c31af7Sopenharmony_ci
3819e5c31af7Sopenharmony_ci  * pname:sType is a elink:VkStructureType value identifying this structure.
3820e5c31af7Sopenharmony_ci  * pname:pNext is `NULL` or a pointer to a structure extending this
3821e5c31af7Sopenharmony_ci    structure.
3822e5c31af7Sopenharmony_ci  * pname:imageSubresource is a slink:VkImageSubresource structure.
3823e5c31af7Sopenharmony_ci
3824e5c31af7Sopenharmony_ciinclude::{generated}/validity/structs/VkImageSubresource2KHR.adoc[]
3825e5c31af7Sopenharmony_ci--
3826e5c31af7Sopenharmony_ci
3827e5c31af7Sopenharmony_ci[open,refpage='VkSubresourceLayout2KHR',desc='Structure specifying subresource layout',type='structs',alias='VkSubresourceLayout2EXT']
3828e5c31af7Sopenharmony_ci--
3829e5c31af7Sopenharmony_ciInformation about the layout of the image subresource is returned in a
3830e5c31af7Sopenharmony_cisname:VkSubresourceLayout2KHR structure:
3831e5c31af7Sopenharmony_ci
3832e5c31af7Sopenharmony_ciifdef::VK_KHR_maintenance5[]
3833e5c31af7Sopenharmony_ciinclude::{generated}/api/structs/VkSubresourceLayout2KHR.adoc[]
3834e5c31af7Sopenharmony_ciendif::VK_KHR_maintenance5[]
3835e5c31af7Sopenharmony_ci
3836e5c31af7Sopenharmony_ciifdef::VK_KHR_maintenance5[]
3837e5c31af7Sopenharmony_ciifdef::VK_EXT_image_compression_control,VK_EXT_host_image_copy[or the equivalent]
3838e5c31af7Sopenharmony_ciendif::VK_KHR_maintenance5[]
3839e5c31af7Sopenharmony_ci
3840e5c31af7Sopenharmony_ciifdef::VK_EXT_image_compression_control,VK_EXT_host_image_copy[]
3841e5c31af7Sopenharmony_ci
3842e5c31af7Sopenharmony_ciifndef::VK_KHR_maintenance5[]
3843e5c31af7Sopenharmony_ciInformation about the layout of the image subresource is returned in a
3844e5c31af7Sopenharmony_cisname:VkSubresourceLayout2EXT structure:
3845e5c31af7Sopenharmony_ciendif::VK_KHR_maintenance5[]
3846e5c31af7Sopenharmony_ci
3847e5c31af7Sopenharmony_ciinclude::{generated}/api/structs/VkSubresourceLayout2EXT.adoc[]
3848e5c31af7Sopenharmony_ciendif::VK_EXT_image_compression_control,VK_EXT_host_image_copy[]
3849e5c31af7Sopenharmony_ci
3850e5c31af7Sopenharmony_ci  * pname:sType is a elink:VkStructureType value identifying this structure.
3851e5c31af7Sopenharmony_ci  * pname:pNext is `NULL` or a pointer to a structure extending this
3852e5c31af7Sopenharmony_ci    structure.
3853e5c31af7Sopenharmony_ci  * pname:subresourceLayout is a slink:VkSubresourceLayout structure.
3854e5c31af7Sopenharmony_ci
3855e5c31af7Sopenharmony_ciinclude::{generated}/validity/structs/VkSubresourceLayout2KHR.adoc[]
3856e5c31af7Sopenharmony_ci--
3857e5c31af7Sopenharmony_ci
3858e5c31af7Sopenharmony_ciifdef::VK_EXT_host_image_copy[]
3859e5c31af7Sopenharmony_ci[open,refpage='VkSubresourceHostMemcpySizeEXT',desc='Memory size needed to copy to or from an image on the host with VK_HOST_IMAGE_COPY_MEMCPY_EXT',type='structs']
3860e5c31af7Sopenharmony_ci--
3861e5c31af7Sopenharmony_ciTo query the memory size needed to copy to or from an image using
3862e5c31af7Sopenharmony_ciflink:vkCopyMemoryToImageEXT or flink:vkCopyImageToMemoryEXT when the
3863e5c31af7Sopenharmony_ciename:VK_HOST_IMAGE_COPY_MEMCPY_EXT flag is specified, add a
3864e5c31af7Sopenharmony_cislink:VkSubresourceHostMemcpySizeEXT structure to the pname:pNext chain of
3865e5c31af7Sopenharmony_cithe slink:VkSubresourceLayout2EXT structure in a call to
3866e5c31af7Sopenharmony_ciflink:vkGetImageSubresourceLayout2EXT.
3867e5c31af7Sopenharmony_ci
3868e5c31af7Sopenharmony_ciThe sname:VkSubresourceHostMemcpySizeEXT structure is defined as:
3869e5c31af7Sopenharmony_ci
3870e5c31af7Sopenharmony_ciinclude::{generated}/api/structs/VkSubresourceHostMemcpySizeEXT.adoc[]
3871e5c31af7Sopenharmony_ci
3872e5c31af7Sopenharmony_ci  * pname:sType is a elink:VkStructureType value identifying this structure.
3873e5c31af7Sopenharmony_ci  * pname:pNext is `NULL` or a pointer to a structure extending this
3874e5c31af7Sopenharmony_ci    structure.
3875e5c31af7Sopenharmony_ci  * pname:size is the size in bytes of the image subresource.
3876e5c31af7Sopenharmony_ci
3877e5c31af7Sopenharmony_ciinclude::{generated}/validity/structs/VkSubresourceHostMemcpySizeEXT.adoc[]
3878e5c31af7Sopenharmony_ci--
3879e5c31af7Sopenharmony_ciendif::VK_EXT_host_image_copy[]
3880e5c31af7Sopenharmony_ciendif::VK_KHR_maintenance5,VK_EXT_image_compression_control,VK_EXT_host_image_copy[]
3881e5c31af7Sopenharmony_ci
3882e5c31af7Sopenharmony_ciifdef::VK_KHR_maintenance5[]
3883e5c31af7Sopenharmony_ci[open,refpage='vkGetDeviceImageSubresourceLayoutKHR',desc='Retrieve information about an image subresource without an image object',type='protos']
3884e5c31af7Sopenharmony_ci--
3885e5c31af7Sopenharmony_ciTo query the memory layout of an image subresource, without an image object,
3886e5c31af7Sopenharmony_cicall:
3887e5c31af7Sopenharmony_ci
3888e5c31af7Sopenharmony_ciinclude::{generated}/api/protos/vkGetDeviceImageSubresourceLayoutKHR.adoc[]
3889e5c31af7Sopenharmony_ci
3890e5c31af7Sopenharmony_ci  * pname:device is the logical device that owns the image.
3891e5c31af7Sopenharmony_ci  * pname:pInfo is a pointer to a slink:VkDeviceImageSubresourceInfoKHR
3892e5c31af7Sopenharmony_ci    structure containing parameters required for the subresource layout
3893e5c31af7Sopenharmony_ci    query.
3894e5c31af7Sopenharmony_ci  * pname:pLayout is a pointer to a slink:VkSubresourceLayout2KHR structure
3895e5c31af7Sopenharmony_ci    in which the layout is returned.
3896e5c31af7Sopenharmony_ci
3897e5c31af7Sopenharmony_cifname:vkGetDeviceImageSubresourceLayoutKHR behaves similarly to
3898e5c31af7Sopenharmony_ciflink:vkGetImageSubresourceLayout2KHR, but uses a slink:VkImageCreateInfo
3899e5c31af7Sopenharmony_cistructure to specify the image rather than a slink:VkImage object.
3900e5c31af7Sopenharmony_ci
3901e5c31af7Sopenharmony_ciinclude::{generated}/validity/protos/vkGetDeviceImageSubresourceLayoutKHR.adoc[]
3902e5c31af7Sopenharmony_ci--
3903e5c31af7Sopenharmony_ci
3904e5c31af7Sopenharmony_ci[open,refpage='VkDeviceImageSubresourceInfoKHR',desc='Image creation information for querying subresource layout',type='structs']
3905e5c31af7Sopenharmony_ci--
3906e5c31af7Sopenharmony_ci:refpage: VkDeviceImageSubresourceInfoKHR
3907e5c31af7Sopenharmony_ci
3908e5c31af7Sopenharmony_ciThe sname:VkDeviceImageSubresourceInfoKHR structure is defined as:
3909e5c31af7Sopenharmony_ci
3910e5c31af7Sopenharmony_ciinclude::{generated}/api/structs/VkDeviceImageSubresourceInfoKHR.adoc[]
3911e5c31af7Sopenharmony_ci
3912e5c31af7Sopenharmony_ci  * pname:sType is a elink:VkStructureType value identifying this structure.
3913e5c31af7Sopenharmony_ci  * pname:pNext is `NULL` or a pointer to a structure extending this
3914e5c31af7Sopenharmony_ci    structure.
3915e5c31af7Sopenharmony_ci  * pname:pCreateInfo is a pointer to a slink:VkImageCreateInfo structure
3916e5c31af7Sopenharmony_ci    containing parameters affecting creation of the image to query.
3917e5c31af7Sopenharmony_ci  * pname:pSubresource pSubresource is a pointer to a
3918e5c31af7Sopenharmony_ci    slink:VkImageSubresource2KHR structure selecting a specific image
3919e5c31af7Sopenharmony_ci    subresource for the query.
3920e5c31af7Sopenharmony_ci
3921e5c31af7Sopenharmony_ci:imageparam: pCreateInfo
3922e5c31af7Sopenharmony_ci
3923e5c31af7Sopenharmony_ci.Valid Usage
3924e5c31af7Sopenharmony_ci****
3925e5c31af7Sopenharmony_ciinclude::{chapters}/commonvalidity/get_image_subresource_layout_common.adoc[]
3926e5c31af7Sopenharmony_ci****
3927e5c31af7Sopenharmony_ci
3928e5c31af7Sopenharmony_ciinclude::{generated}/validity/structs/VkDeviceImageSubresourceInfoKHR.adoc[]
3929e5c31af7Sopenharmony_ci--
3930e5c31af7Sopenharmony_ciendif::VK_KHR_maintenance5[]
3931e5c31af7Sopenharmony_ci
3932e5c31af7Sopenharmony_ciifdef::VK_EXT_image_drm_format_modifier[]
3933e5c31af7Sopenharmony_ci[open,refpage='vkGetImageDrmFormatModifierPropertiesEXT',desc='Returns an image\'s DRM format modifier',type='protos']
3934e5c31af7Sopenharmony_ci--
3935e5c31af7Sopenharmony_ci:refpage: vkGetImageDrmFormatModifierPropertiesEXT
3936e5c31af7Sopenharmony_ci
3937e5c31af7Sopenharmony_ciIf an image was created with ename:VK_IMAGE_TILING_DRM_FORMAT_MODIFIER_EXT,
3938e5c31af7Sopenharmony_cithen the image has a <<glossary-drm-format-modifier,Linux DRM format
3939e5c31af7Sopenharmony_cimodifier>>.
3940e5c31af7Sopenharmony_ciTo query the _modifier_, call:
3941e5c31af7Sopenharmony_ci
3942e5c31af7Sopenharmony_ciinclude::{generated}/api/protos/vkGetImageDrmFormatModifierPropertiesEXT.adoc[]
3943e5c31af7Sopenharmony_ci
3944e5c31af7Sopenharmony_ci  * pname:device is the logical device that owns the image.
3945e5c31af7Sopenharmony_ci  * pname:image is the queried image.
3946e5c31af7Sopenharmony_ci  * pname:pProperties is a pointer to a
3947e5c31af7Sopenharmony_ci    slink:VkImageDrmFormatModifierPropertiesEXT structure in which
3948e5c31af7Sopenharmony_ci    properties of the image's _DRM format modifier_ are returned.
3949e5c31af7Sopenharmony_ci
3950e5c31af7Sopenharmony_ciinclude::{chapters}/commonvalidity/no_dynamic_allocations_common.adoc[]
3951e5c31af7Sopenharmony_ci
3952e5c31af7Sopenharmony_ci.Valid Usage
3953e5c31af7Sopenharmony_ci****
3954e5c31af7Sopenharmony_ci  * [[VUID-vkGetImageDrmFormatModifierPropertiesEXT-image-02272]]
3955e5c31af7Sopenharmony_ci    pname:image must: have been created with <<VkImageCreateInfo,
3956e5c31af7Sopenharmony_ci    pname:tiling>> equal to ename:VK_IMAGE_TILING_DRM_FORMAT_MODIFIER_EXT
3957e5c31af7Sopenharmony_ci****
3958e5c31af7Sopenharmony_ci
3959e5c31af7Sopenharmony_ciinclude::{generated}/validity/protos/vkGetImageDrmFormatModifierPropertiesEXT.adoc[]
3960e5c31af7Sopenharmony_ci--
3961e5c31af7Sopenharmony_ci
3962e5c31af7Sopenharmony_ci[open,refpage='VkImageDrmFormatModifierPropertiesEXT',desc='Properties of an image\'s Linux DRM format modifier',type='structs']
3963e5c31af7Sopenharmony_ci--
3964e5c31af7Sopenharmony_ciThe slink:VkImageDrmFormatModifierPropertiesEXT structure is defined as:
3965e5c31af7Sopenharmony_ci
3966e5c31af7Sopenharmony_ciinclude::{generated}/api/structs/VkImageDrmFormatModifierPropertiesEXT.adoc[]
3967e5c31af7Sopenharmony_ci
3968e5c31af7Sopenharmony_ci  * pname:sType is a elink:VkStructureType value identifying this structure.
3969e5c31af7Sopenharmony_ci  * pname:pNext is `NULL` or a pointer to a structure extending this
3970e5c31af7Sopenharmony_ci    structure.
3971e5c31af7Sopenharmony_ci  * pname:drmFormatModifier returns the image's
3972e5c31af7Sopenharmony_ci    <<glossary-drm-format-modifier,Linux DRM format modifier>>.
3973e5c31af7Sopenharmony_ci
3974e5c31af7Sopenharmony_ciIf the pname:image was created with
3975e5c31af7Sopenharmony_cislink:VkImageDrmFormatModifierListCreateInfoEXT, then the returned
3976e5c31af7Sopenharmony_cipname:drmFormatModifier must: belong to the list of modifiers provided at
3977e5c31af7Sopenharmony_citime of image creation in
3978e5c31af7Sopenharmony_cislink:VkImageDrmFormatModifierListCreateInfoEXT::pname:pDrmFormatModifiers.
3979e5c31af7Sopenharmony_ciIf the pname:image was created with
3980e5c31af7Sopenharmony_cislink:VkImageDrmFormatModifierExplicitCreateInfoEXT, then the returned
3981e5c31af7Sopenharmony_cipname:drmFormatModifier must: be the modifier provided at time of image
3982e5c31af7Sopenharmony_cicreation in
3983e5c31af7Sopenharmony_cislink:VkImageDrmFormatModifierExplicitCreateInfoEXT::pname:drmFormatModifier.
3984e5c31af7Sopenharmony_ci
3985e5c31af7Sopenharmony_ciinclude::{generated}/validity/structs/VkImageDrmFormatModifierPropertiesEXT.adoc[]
3986e5c31af7Sopenharmony_ci--
3987e5c31af7Sopenharmony_ciendif::VK_EXT_image_drm_format_modifier[]
3988e5c31af7Sopenharmony_ci
3989e5c31af7Sopenharmony_ci[open,refpage='vkDestroyImage',desc='Destroy an image object',type='protos']
3990e5c31af7Sopenharmony_ci--
3991e5c31af7Sopenharmony_ciTo destroy an image, call:
3992e5c31af7Sopenharmony_ci
3993e5c31af7Sopenharmony_ciinclude::{generated}/api/protos/vkDestroyImage.adoc[]
3994e5c31af7Sopenharmony_ci
3995e5c31af7Sopenharmony_ci  * pname:device is the logical device that destroys the image.
3996e5c31af7Sopenharmony_ci  * pname:image is the image to destroy.
3997e5c31af7Sopenharmony_ci  * pname:pAllocator controls host memory allocation as described in the
3998e5c31af7Sopenharmony_ci    <<memory-allocation, Memory Allocation>> chapter.
3999e5c31af7Sopenharmony_ci
4000e5c31af7Sopenharmony_ci.Valid Usage
4001e5c31af7Sopenharmony_ci****
4002e5c31af7Sopenharmony_ci  * [[VUID-vkDestroyImage-image-01000]]
4003e5c31af7Sopenharmony_ci    All submitted commands that refer to pname:image, either directly or via
4004e5c31af7Sopenharmony_ci    a sname:VkImageView, must: have completed execution
4005e5c31af7Sopenharmony_ciifndef::VKSC_VERSION_1_0[]
4006e5c31af7Sopenharmony_ci  * [[VUID-vkDestroyImage-image-01001]]
4007e5c31af7Sopenharmony_ci    If sname:VkAllocationCallbacks were provided when pname:image was
4008e5c31af7Sopenharmony_ci    created, a compatible set of callbacks must: be provided here
4009e5c31af7Sopenharmony_ci  * [[VUID-vkDestroyImage-image-01002]]
4010e5c31af7Sopenharmony_ci    If no sname:VkAllocationCallbacks were provided when pname:image was
4011e5c31af7Sopenharmony_ci    created, pname:pAllocator must: be `NULL`
4012e5c31af7Sopenharmony_ciendif::VKSC_VERSION_1_0[]
4013e5c31af7Sopenharmony_ciifdef::VK_KHR_swapchain[]
4014e5c31af7Sopenharmony_ci  * [[VUID-vkDestroyImage-image-04882]]
4015e5c31af7Sopenharmony_ci    pname:image must: not have been acquired from
4016e5c31af7Sopenharmony_ci    flink:vkGetSwapchainImagesKHR
4017e5c31af7Sopenharmony_ciendif::VK_KHR_swapchain[]
4018e5c31af7Sopenharmony_ci****
4019e5c31af7Sopenharmony_ci
4020e5c31af7Sopenharmony_ciinclude::{generated}/validity/protos/vkDestroyImage.adoc[]
4021e5c31af7Sopenharmony_ci--
4022e5c31af7Sopenharmony_ci
4023e5c31af7Sopenharmony_ci
4024e5c31af7Sopenharmony_ci[[resources-image-format-features]]
4025e5c31af7Sopenharmony_ci=== Image Format Features
4026e5c31af7Sopenharmony_ci
4027e5c31af7Sopenharmony_ciValid uses of a slink:VkImage may: depend on the image's _format features_,
4028e5c31af7Sopenharmony_cidefined below.
4029e5c31af7Sopenharmony_ciSuch constraints are documented in the affected valid usage statement.
4030e5c31af7Sopenharmony_ci
4031e5c31af7Sopenharmony_ci  * If the image was created with ename:VK_IMAGE_TILING_LINEAR, then its set
4032e5c31af7Sopenharmony_ci    of _format features_ is the value of
4033e5c31af7Sopenharmony_ci    slink:VkFormatProperties::pname:linearTilingFeatures found by calling
4034e5c31af7Sopenharmony_ci    flink:vkGetPhysicalDeviceFormatProperties on the same pname:format as
4035e5c31af7Sopenharmony_ci    slink:VkImageCreateInfo::pname:format.
4036e5c31af7Sopenharmony_ci  * If the image was created with ename:VK_IMAGE_TILING_OPTIMAL,
4037e5c31af7Sopenharmony_ciifdef::VK_ANDROID_external_memory_android_hardware_buffer[]
4038e5c31af7Sopenharmony_ci    but without an
4039e5c31af7Sopenharmony_ci    <<memory-external-android-hardware-buffer-external-formats,Android
4040e5c31af7Sopenharmony_ci    hardware buffer external format>>,
4041e5c31af7Sopenharmony_ciendif::VK_ANDROID_external_memory_android_hardware_buffer[]
4042e5c31af7Sopenharmony_ciifdef::VK_QNX_external_memory_screen_buffer[]
4043e5c31af7Sopenharmony_ciifndef::VK_ANDROID_external_memory_android_hardware_buffer[]
4044e5c31af7Sopenharmony_ci    but without a
4045e5c31af7Sopenharmony_ciendif::VK_ANDROID_external_memory_android_hardware_buffer[]
4046e5c31af7Sopenharmony_ciifdef::VK_ANDROID_external_memory_android_hardware_buffer[]
4047e5c31af7Sopenharmony_ci    or a
4048e5c31af7Sopenharmony_ciendif::VK_ANDROID_external_memory_android_hardware_buffer[]
4049e5c31af7Sopenharmony_ci    <<memory-external-screen-buffer-external-formats,QNX Screen Buffer
4050e5c31af7Sopenharmony_ci    external format>>
4051e5c31af7Sopenharmony_ciendif::VK_QNX_external_memory_screen_buffer[]
4052e5c31af7Sopenharmony_ciifdef::VK_FUCHSIA_buffer_collection[]
4053e5c31af7Sopenharmony_ciifndef::VK_ANDROID_external_memory_android_hardware_buffer[]
4054e5c31af7Sopenharmony_ci    but without an
4055e5c31af7Sopenharmony_ciendif::VK_ANDROID_external_memory_android_hardware_buffer[]
4056e5c31af7Sopenharmony_ciifdef::VK_ANDROID_external_memory_android_hardware_buffer[]
4057e5c31af7Sopenharmony_ci    or an
4058e5c31af7Sopenharmony_ciendif::VK_ANDROID_external_memory_android_hardware_buffer[]
4059e5c31af7Sopenharmony_ci    slink:VkBufferCollectionImageCreateInfoFUCHSIA,
4060e5c31af7Sopenharmony_ciendif::VK_FUCHSIA_buffer_collection[]
4061e5c31af7Sopenharmony_ci    then its set of _format features_ is the value of
4062e5c31af7Sopenharmony_ci    slink:VkFormatProperties::pname:optimalTilingFeatures found by calling
4063e5c31af7Sopenharmony_ci    flink:vkGetPhysicalDeviceFormatProperties on the same pname:format as
4064e5c31af7Sopenharmony_ci    slink:VkImageCreateInfo::pname:format.
4065e5c31af7Sopenharmony_ciifdef::VK_ANDROID_external_memory_android_hardware_buffer[]
4066e5c31af7Sopenharmony_ci  * If the image was created with an
4067e5c31af7Sopenharmony_ci    <<memory-external-android-hardware-buffer-external-formats,Android
4068e5c31af7Sopenharmony_ci    hardware buffer external format>>, then its set of _format features_ is
4069e5c31af7Sopenharmony_ci    the value of
4070e5c31af7Sopenharmony_ci    slink:VkAndroidHardwareBufferFormatPropertiesANDROID::pname:formatFeatures
4071e5c31af7Sopenharmony_ci    found by calling flink:vkGetAndroidHardwareBufferPropertiesANDROID on
4072e5c31af7Sopenharmony_ci    the Android hardware buffer that was imported to the
4073e5c31af7Sopenharmony_ci    slink:VkDeviceMemory to which the image is bound.
4074e5c31af7Sopenharmony_ciendif::VK_ANDROID_external_memory_android_hardware_buffer[]
4075e5c31af7Sopenharmony_ciifdef::VK_QNX_external_memory_screen_buffer[]
4076e5c31af7Sopenharmony_ci  * If the image was created with an
4077e5c31af7Sopenharmony_ci    <<memory-external-screen-buffer-external-formats,QNX Screen buffer
4078e5c31af7Sopenharmony_ci    external format>>, then its set of _format features_ is the value of
4079e5c31af7Sopenharmony_ci    slink:VkScreenBufferFormatPropertiesQNX::pname:formatFeatures found by
4080e5c31af7Sopenharmony_ci    calling flink:vkGetScreenBufferPropertiesQNX on the QNX Screen buffer
4081e5c31af7Sopenharmony_ci    that was imported to the slink:VkDeviceMemory to which the image is
4082e5c31af7Sopenharmony_ci    bound.
4083e5c31af7Sopenharmony_ciendif::VK_QNX_external_memory_screen_buffer[]
4084e5c31af7Sopenharmony_ciifdef::VK_EXT_image_drm_format_modifier[]
4085e5c31af7Sopenharmony_ci  * If the image was created with
4086e5c31af7Sopenharmony_ci    ename:VK_IMAGE_TILING_DRM_FORMAT_MODIFIER_EXT, then:
4087e5c31af7Sopenharmony_ci  ** The image's DRM format modifier is the value of
4088e5c31af7Sopenharmony_ci     slink:VkImageDrmFormatModifierPropertiesEXT::pname:drmFormatModifier
4089e5c31af7Sopenharmony_ci     found by calling flink:vkGetImageDrmFormatModifierPropertiesEXT.
4090e5c31af7Sopenharmony_ci  ** Let
4091e5c31af7Sopenharmony_ci     slink:VkDrmFormatModifierPropertiesListEXT::pname:pDrmFormatModifierProperties
4092e5c31af7Sopenharmony_ci     be the array found by calling
4093e5c31af7Sopenharmony_ci     flink:vkGetPhysicalDeviceFormatProperties2 on the same pname:format as
4094e5c31af7Sopenharmony_ci     slink:VkImageCreateInfo::pname:format.
4095e5c31af7Sopenharmony_ci  ** Let `VkDrmFormatModifierPropertiesEXT prop` be the array element whose
4096e5c31af7Sopenharmony_ci     pname:drmFormatModifier member is the value of the image's DRM format
4097e5c31af7Sopenharmony_ci     modifier.
4098e5c31af7Sopenharmony_ci  ** Then the image's set of _format features_ is the value of
4099e5c31af7Sopenharmony_ci     `prop`::pname:drmFormatModifierTilingFeatures.
4100e5c31af7Sopenharmony_ciendif::VK_EXT_image_drm_format_modifier[]
4101e5c31af7Sopenharmony_ci
4102e5c31af7Sopenharmony_ci
4103e5c31af7Sopenharmony_ciifdef::VK_NV_corner_sampled_image[]
4104e5c31af7Sopenharmony_ci[[resources-images-corner-sampled]]
4105e5c31af7Sopenharmony_ci=== Corner-Sampled Images
4106e5c31af7Sopenharmony_ci
4107e5c31af7Sopenharmony_ciA _corner-sampled image_ is an image where unnormalized texel coordinates
4108e5c31af7Sopenharmony_ciare centered on integer values rather than half-integer values.
4109e5c31af7Sopenharmony_ci
4110e5c31af7Sopenharmony_ciA corner-sampled image has a number of differences compared to conventional
4111e5c31af7Sopenharmony_citexture image:
4112e5c31af7Sopenharmony_ci
4113e5c31af7Sopenharmony_ci  * Texels are centered on integer coordinates.
4114e5c31af7Sopenharmony_ci    See <<textures-unnormalized-to-integer, Unnormalized Texel Coordinate
4115e5c31af7Sopenharmony_ci    Operations>>
4116e5c31af7Sopenharmony_ci  * Normalized coordinates are scaled using [eq]#coord {times} (dim - 1)#
4117e5c31af7Sopenharmony_ci    rather than [eq]#coord {times} dim#, where dim is the size of one
4118e5c31af7Sopenharmony_ci    dimension of the image.
4119e5c31af7Sopenharmony_ci    See <<textures-normalized-to-unnormalized, normalized texel coordinate
4120e5c31af7Sopenharmony_ci    transform>>.
4121e5c31af7Sopenharmony_ci  * Partial derivatives are scaled using [eq]#coord {times} (dim - 1)#
4122e5c31af7Sopenharmony_ci    rather than [eq]#coord {times} dim#.
4123e5c31af7Sopenharmony_ci    See <<textures-scale-factor,Scale Factor Operation>>.
4124e5c31af7Sopenharmony_ci  * Calculation of the next higher LOD size goes according to
4125e5c31af7Sopenharmony_ci    [eq]#{lceil}dim / 2{rceil}# rather than [eq]#{lfloor}dim / 2{rfloor}#.
4126e5c31af7Sopenharmony_ci    See <<resources-image-mip-level-sizing,Image Mip Level Sizing>>.
4127e5c31af7Sopenharmony_ci  * The minimum level size is 2x2 for 2D images and 2x2x2 for 3D images.
4128e5c31af7Sopenharmony_ci    See <<resources-image-mip-level-sizing,Image Mip Level Sizing>>.
4129e5c31af7Sopenharmony_ci
4130e5c31af7Sopenharmony_ciCorner-sampling is only supported for 2D and 3D images.
4131e5c31af7Sopenharmony_ciWhen sampling a corner-sampled image, the sampler addressing mode must: be
4132e5c31af7Sopenharmony_ciename:VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE.
4133e5c31af7Sopenharmony_ciCorner-sampled images are not supported as cube maps or depth/stencil
4134e5c31af7Sopenharmony_ciimages.
4135e5c31af7Sopenharmony_ciendif::VK_NV_corner_sampled_image[]
4136e5c31af7Sopenharmony_ci
4137e5c31af7Sopenharmony_ci
4138e5c31af7Sopenharmony_ci[[resources-image-mip-level-sizing]]
4139e5c31af7Sopenharmony_ci=== Image Mip Level Sizing
4140e5c31af7Sopenharmony_ci
4141e5c31af7Sopenharmony_ciA _complete mipmap chain_ is the full set of mip levels, from the largest
4142e5c31af7Sopenharmony_cimip level provided, down to the _minimum mip level size_.
4143e5c31af7Sopenharmony_ci
4144e5c31af7Sopenharmony_ci
4145e5c31af7Sopenharmony_ci==== Conventional Images
4146e5c31af7Sopenharmony_ci
4147e5c31af7Sopenharmony_ciFor conventional images, the dimensions of each successive mip level,
4148e5c31af7Sopenharmony_ci[eq]#n+1#, are:
4149e5c31af7Sopenharmony_ci
4150e5c31af7Sopenharmony_ci  {empty}:: [eq]#pname:width~n+1~ = max({lfloor}pname:width~n~/2{rfloor},
4151e5c31af7Sopenharmony_ci            1)#
4152e5c31af7Sopenharmony_ci  {empty}:: [eq]#pname:height~n+1~ = max({lfloor}pname:height~n~/2{rfloor},
4153e5c31af7Sopenharmony_ci            1)#
4154e5c31af7Sopenharmony_ci  {empty}:: [eq]#pname:depth~n+1~ = max({lfloor}pname:depth~n~/2{rfloor},
4155e5c31af7Sopenharmony_ci            1)#
4156e5c31af7Sopenharmony_ci
4157e5c31af7Sopenharmony_ciwhere [eq]#pname:width~n~#, [eq]#pname:height~n~#, and [eq]#pname:depth~n~#
4158e5c31af7Sopenharmony_ciare the dimensions of the next larger mip level, [eq]#n#.
4159e5c31af7Sopenharmony_ci
4160e5c31af7Sopenharmony_ciThe minimum mip level size is:
4161e5c31af7Sopenharmony_ci
4162e5c31af7Sopenharmony_ci  * 1 for one-dimensional images,
4163e5c31af7Sopenharmony_ci  * 1x1 for two-dimensional images, and
4164e5c31af7Sopenharmony_ci  * 1x1x1 for three-dimensional images.
4165e5c31af7Sopenharmony_ci
4166e5c31af7Sopenharmony_ciThe number of levels in a complete mipmap chain is:
4167e5c31af7Sopenharmony_ci
4168e5c31af7Sopenharmony_ci  {empty}:: [eq]#{lfloor}log~2~(max(pname:width~0~, pname:height~0~,
4169e5c31af7Sopenharmony_ci            pname:depth~0~)){rfloor} {plus} 1#
4170e5c31af7Sopenharmony_ci
4171e5c31af7Sopenharmony_ciwhere [eq]#pname:width~0~#, [eq]#pname:height~0~#, and [eq]#pname:depth~0~#
4172e5c31af7Sopenharmony_ciare the dimensions of the largest (most detailed) mip level, `0`.
4173e5c31af7Sopenharmony_ci
4174e5c31af7Sopenharmony_ci
4175e5c31af7Sopenharmony_ciifdef::VK_NV_corner_sampled_image[]
4176e5c31af7Sopenharmony_ci==== Corner-Sampled Images
4177e5c31af7Sopenharmony_ci
4178e5c31af7Sopenharmony_ciFor corner-sampled images, the dimensions of each successive mip level,
4179e5c31af7Sopenharmony_ci[eq]#n+1#, are:
4180e5c31af7Sopenharmony_ci
4181e5c31af7Sopenharmony_ci  {empty}:: [eq]#pname:width~n+1~ = max({lceil}pname:width~n~/2{rceil}, 2)#
4182e5c31af7Sopenharmony_ci  {empty}:: [eq]#pname:height~n+1~ = max({lceil}pname:height~n~/2{rceil},
4183e5c31af7Sopenharmony_ci            2)#
4184e5c31af7Sopenharmony_ci  {empty}:: [eq]#pname:depth~n+1~ = max({lceil}pname:depth~n~/2{rceil}, 2)#
4185e5c31af7Sopenharmony_ci
4186e5c31af7Sopenharmony_ciwhere [eq]#pname:width~n~#, [eq]#pname:height~n~#, and [eq]#pname:depth~n~#
4187e5c31af7Sopenharmony_ciare the dimensions of the next larger mip level, [eq]#n#.
4188e5c31af7Sopenharmony_ci
4189e5c31af7Sopenharmony_ciThe minimum mip level size is:
4190e5c31af7Sopenharmony_ci
4191e5c31af7Sopenharmony_ci  * 2x2 for two-dimensional images, and
4192e5c31af7Sopenharmony_ci  * 2x2x2 for three-dimensional images.
4193e5c31af7Sopenharmony_ci
4194e5c31af7Sopenharmony_ciThe number of levels in a complete mipmap chain is:
4195e5c31af7Sopenharmony_ci
4196e5c31af7Sopenharmony_ci  {empty}:: [eq]#{lceil}log~2~(max(pname:width~0~, pname:height~0~,
4197e5c31af7Sopenharmony_ci            pname:depth~0~)){rceil}#
4198e5c31af7Sopenharmony_ci
4199e5c31af7Sopenharmony_ciwhere [eq]#pname:width~0~#, [eq]#pname:height~0~#, and [eq]#pname:depth~0~#
4200e5c31af7Sopenharmony_ciare the dimensions of the largest (most detailed) mip level, `0`.
4201e5c31af7Sopenharmony_ciendif::VK_NV_corner_sampled_image[]
4202e5c31af7Sopenharmony_ci
4203e5c31af7Sopenharmony_ci
4204e5c31af7Sopenharmony_ci[[resources-image-layouts]]
4205e5c31af7Sopenharmony_ci== Image Layouts
4206e5c31af7Sopenharmony_ci
4207e5c31af7Sopenharmony_ciImages are stored in implementation-dependent opaque layouts in memory.
4208e5c31af7Sopenharmony_ciEach layout has limitations on what kinds of operations are supported for
4209e5c31af7Sopenharmony_ciimage subresources using the layout.
4210e5c31af7Sopenharmony_ciAt any given time, the data representing an image subresource in memory
4211e5c31af7Sopenharmony_ciexists in a particular layout which is determined by the most recent layout
4212e5c31af7Sopenharmony_citransition that was performed on that image subresource.
4213e5c31af7Sopenharmony_ciApplications have control over which layout each image subresource uses, and
4214e5c31af7Sopenharmony_cican: transition an image subresource from one layout to another.
4215e5c31af7Sopenharmony_ciTransitions can: happen with an image memory barrier, included as part of a
4216e5c31af7Sopenharmony_ciflink:vkCmdPipelineBarrier or a flink:vkCmdWaitEvents command buffer command
4217e5c31af7Sopenharmony_ci(see <<synchronization-image-memory-barriers>>), or as part of a subpass
4218e5c31af7Sopenharmony_cidependency within a render pass (see sname:VkSubpassDependency).
4219e5c31af7Sopenharmony_ci
4220e5c31af7Sopenharmony_ciImage layout is per-image subresource.
4221e5c31af7Sopenharmony_ciSeparate image subresources of the same image can: be in different layouts
4222e5c31af7Sopenharmony_ciat the same time, with the exception that depth and stencil aspects of a
4223e5c31af7Sopenharmony_cigiven image subresource can: only be in different layouts if the
4224e5c31af7Sopenharmony_ci<<features-separateDepthStencilLayouts, pname:separateDepthStencilLayouts>>
4225e5c31af7Sopenharmony_cifeature is enabled.
4226e5c31af7Sopenharmony_ci
4227e5c31af7Sopenharmony_ci[NOTE]
4228e5c31af7Sopenharmony_ci.Note
4229e5c31af7Sopenharmony_ci====
4230e5c31af7Sopenharmony_ciEach layout may: offer optimal performance for a specific usage of image
4231e5c31af7Sopenharmony_cimemory.
4232e5c31af7Sopenharmony_ciFor example, an image with a layout of
4233e5c31af7Sopenharmony_ciename:VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL may: provide optimal
4234e5c31af7Sopenharmony_ciperformance for use as a color attachment, but be unsupported for use in
4235e5c31af7Sopenharmony_citransfer commands.
4236e5c31af7Sopenharmony_ciApplications can: transition an image subresource from one layout to another
4237e5c31af7Sopenharmony_ciin order to achieve optimal performance when the image subresource is used
4238e5c31af7Sopenharmony_cifor multiple kinds of operations.
4239e5c31af7Sopenharmony_ciAfter initialization, applications need not use any layout other than the
4240e5c31af7Sopenharmony_cigeneral layout, though this may: produce suboptimal performance on some
4241e5c31af7Sopenharmony_ciimplementations.
4242e5c31af7Sopenharmony_ci====
4243e5c31af7Sopenharmony_ci
4244e5c31af7Sopenharmony_ciUpon creation, all image subresources of an image are initially in the same
4245e5c31af7Sopenharmony_cilayout, where that layout is selected by the
4246e5c31af7Sopenharmony_cisname:VkImageCreateInfo::pname:initialLayout member.
4247e5c31af7Sopenharmony_ciThe pname:initialLayout must: be either ename:VK_IMAGE_LAYOUT_UNDEFINED or
4248e5c31af7Sopenharmony_ciename:VK_IMAGE_LAYOUT_PREINITIALIZED.
4249e5c31af7Sopenharmony_ciIf it is ename:VK_IMAGE_LAYOUT_PREINITIALIZED, then the image data can: be
4250e5c31af7Sopenharmony_cipreinitialized by the host while using this layout, and the transition away
4251e5c31af7Sopenharmony_cifrom this layout will preserve that data.
4252e5c31af7Sopenharmony_ciIf it is ename:VK_IMAGE_LAYOUT_UNDEFINED, then the contents of the data are
4253e5c31af7Sopenharmony_ciconsidered to be undefined:, and the transition away from this layout is not
4254e5c31af7Sopenharmony_ciguaranteed to preserve that data.
4255e5c31af7Sopenharmony_ciFor either of these initial layouts, any image subresources must: be
4256e5c31af7Sopenharmony_citransitioned to another layout before they are accessed by the device.
4257e5c31af7Sopenharmony_ci
4258e5c31af7Sopenharmony_ciHost access to image memory is only well-defined for
4259e5c31af7Sopenharmony_ci<<glossary-linear-resource,linear>> images and for image subresources of
4260e5c31af7Sopenharmony_cithose images which are currently in either the
4261e5c31af7Sopenharmony_ciename:VK_IMAGE_LAYOUT_PREINITIALIZED or ename:VK_IMAGE_LAYOUT_GENERAL
4262e5c31af7Sopenharmony_cilayout.
4263e5c31af7Sopenharmony_ciCalling flink:vkGetImageSubresourceLayout for a linear image returns a
4264e5c31af7Sopenharmony_cisubresource layout mapping that is valid for either of those image layouts.
4265e5c31af7Sopenharmony_ci
4266e5c31af7Sopenharmony_ci[open,refpage='VkImageLayout',desc='Layout of image and image subresources',type='enums']
4267e5c31af7Sopenharmony_ci--
4268e5c31af7Sopenharmony_ciThe set of image layouts consists of:
4269e5c31af7Sopenharmony_ci
4270e5c31af7Sopenharmony_ciinclude::{generated}/api/enums/VkImageLayout.adoc[]
4271e5c31af7Sopenharmony_ci
4272e5c31af7Sopenharmony_ciThe type(s) of device access supported by each layout are:
4273e5c31af7Sopenharmony_ci
4274e5c31af7Sopenharmony_ci  * ename:VK_IMAGE_LAYOUT_UNDEFINED specifies that the layout is unknown.
4275e5c31af7Sopenharmony_ci    Image memory cannot: be transitioned into this layout.
4276e5c31af7Sopenharmony_ci    This layout can: be used as the pname:initialLayout member of
4277e5c31af7Sopenharmony_ci    slink:VkImageCreateInfo.
4278e5c31af7Sopenharmony_ci    This layout can: be used in place of the current image layout in a
4279e5c31af7Sopenharmony_ci    layout transition, but doing so will cause the contents of the image's
4280e5c31af7Sopenharmony_ci    memory to be undefined:.
4281e5c31af7Sopenharmony_ci  * ename:VK_IMAGE_LAYOUT_PREINITIALIZED specifies that an image's memory is
4282e5c31af7Sopenharmony_ci    in a defined layout and can: be populated by data, but that it has not
4283e5c31af7Sopenharmony_ci    yet been initialized by the driver.
4284e5c31af7Sopenharmony_ci    Image memory cannot: be transitioned into this layout.
4285e5c31af7Sopenharmony_ci    This layout can: be used as the pname:initialLayout member of
4286e5c31af7Sopenharmony_ci    slink:VkImageCreateInfo.
4287e5c31af7Sopenharmony_ci    This layout is intended to be used as the initial layout for an image
4288e5c31af7Sopenharmony_ci    whose contents are written by the host, and hence the data can: be
4289e5c31af7Sopenharmony_ci    written to memory immediately, without first executing a layout
4290e5c31af7Sopenharmony_ci    transition.
4291e5c31af7Sopenharmony_ci    Currently, ename:VK_IMAGE_LAYOUT_PREINITIALIZED is only useful with
4292e5c31af7Sopenharmony_ci    <<glossary-linear-resource,linear>> images because there is not a
4293e5c31af7Sopenharmony_ci    standard layout defined for ename:VK_IMAGE_TILING_OPTIMAL images.
4294e5c31af7Sopenharmony_ci  * ename:VK_IMAGE_LAYOUT_GENERAL supports all types of device access.
4295e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_3,VK_KHR_synchronization2[]
4296e5c31af7Sopenharmony_ci  * ename:VK_IMAGE_LAYOUT_ATTACHMENT_OPTIMAL specifies a layout that must:
4297e5c31af7Sopenharmony_ci    only be used with attachment accesses in the graphics pipeline.
4298e5c31af7Sopenharmony_ci  * ename:VK_IMAGE_LAYOUT_READ_ONLY_OPTIMAL specifies a layout allowing read
4299e5c31af7Sopenharmony_ci    only access as an attachment, or in shaders as a sampled image, combined
4300e5c31af7Sopenharmony_ci    image/sampler, or input attachment.
4301e5c31af7Sopenharmony_ciendif::VK_VERSION_1_3,VK_KHR_synchronization2[]
4302e5c31af7Sopenharmony_ci  * ename:VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL must: only be used as a
4303e5c31af7Sopenharmony_ci    color or resolve attachment in a sname:VkFramebuffer.
4304e5c31af7Sopenharmony_ci    This layout is valid only for image subresources of images created with
4305e5c31af7Sopenharmony_ci    the ename:VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT usage bit enabled.
4306e5c31af7Sopenharmony_ci  * ename:VK_IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL specifies a
4307e5c31af7Sopenharmony_ci    layout for both the depth and stencil aspects of a depth/stencil format
4308e5c31af7Sopenharmony_ci    image allowing read and write access as a depth/stencil attachment.
4309e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_2,VK_KHR_separate_depth_stencil_layouts[]
4310e5c31af7Sopenharmony_ci    It is equivalent to ename:VK_IMAGE_LAYOUT_DEPTH_ATTACHMENT_OPTIMAL and
4311e5c31af7Sopenharmony_ci    ename:VK_IMAGE_LAYOUT_STENCIL_ATTACHMENT_OPTIMAL.
4312e5c31af7Sopenharmony_ciendif::VK_VERSION_1_2,VK_KHR_separate_depth_stencil_layouts[]
4313e5c31af7Sopenharmony_ci  * ename:VK_IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL specifies a layout
4314e5c31af7Sopenharmony_ci    for both the depth and stencil aspects of a depth/stencil format image
4315e5c31af7Sopenharmony_ci    allowing read only access as a depth/stencil attachment or in shaders as
4316e5c31af7Sopenharmony_ci    a sampled image, combined image/sampler, or input attachment.
4317e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_2,VK_KHR_separate_depth_stencil_layouts[]
4318e5c31af7Sopenharmony_ci    It is equivalent to ename:VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_OPTIMAL and
4319e5c31af7Sopenharmony_ci    ename:VK_IMAGE_LAYOUT_STENCIL_READ_ONLY_OPTIMAL.
4320e5c31af7Sopenharmony_ciendif::VK_VERSION_1_2,VK_KHR_separate_depth_stencil_layouts[]
4321e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_1,VK_KHR_maintenance2[]
4322e5c31af7Sopenharmony_ci  * ename:VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_STENCIL_ATTACHMENT_OPTIMAL
4323e5c31af7Sopenharmony_ci    specifies a layout for depth/stencil format images allowing read and
4324e5c31af7Sopenharmony_ci    write access to the stencil aspect as a stencil attachment, and read
4325e5c31af7Sopenharmony_ci    only access to the depth aspect as a depth attachment or in shaders as a
4326e5c31af7Sopenharmony_ci    sampled image, combined image/sampler, or input attachment.
4327e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_2,VK_KHR_separate_depth_stencil_layouts[]
4328e5c31af7Sopenharmony_ci    It is equivalent to ename:VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_OPTIMAL and
4329e5c31af7Sopenharmony_ci    ename:VK_IMAGE_LAYOUT_STENCIL_ATTACHMENT_OPTIMAL.
4330e5c31af7Sopenharmony_ciendif::VK_VERSION_1_2,VK_KHR_separate_depth_stencil_layouts[]
4331e5c31af7Sopenharmony_ci  * ename:VK_IMAGE_LAYOUT_DEPTH_ATTACHMENT_STENCIL_READ_ONLY_OPTIMAL
4332e5c31af7Sopenharmony_ci    specifies a layout for depth/stencil format images allowing read and
4333e5c31af7Sopenharmony_ci    write access to the depth aspect as a depth attachment, and read only
4334e5c31af7Sopenharmony_ci    access to the stencil aspect as a stencil attachment or in shaders as a
4335e5c31af7Sopenharmony_ci    sampled image, combined image/sampler, or input attachment.
4336e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_2,VK_KHR_separate_depth_stencil_layouts[]
4337e5c31af7Sopenharmony_ci    It is equivalent to ename:VK_IMAGE_LAYOUT_DEPTH_ATTACHMENT_OPTIMAL and
4338e5c31af7Sopenharmony_ci    ename:VK_IMAGE_LAYOUT_STENCIL_READ_ONLY_OPTIMAL.
4339e5c31af7Sopenharmony_ciendif::VK_VERSION_1_2,VK_KHR_separate_depth_stencil_layouts[]
4340e5c31af7Sopenharmony_ciendif::VK_VERSION_1_1,VK_KHR_maintenance2[]
4341e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_2,VK_KHR_separate_depth_stencil_layouts[]
4342e5c31af7Sopenharmony_ci  * ename:VK_IMAGE_LAYOUT_DEPTH_ATTACHMENT_OPTIMAL specifies a layout for
4343e5c31af7Sopenharmony_ci    the depth aspect of a depth/stencil format image allowing read and write
4344e5c31af7Sopenharmony_ci    access as a depth attachment.
4345e5c31af7Sopenharmony_ci  * ename:VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_OPTIMAL specifies a layout for the
4346e5c31af7Sopenharmony_ci    depth aspect of a depth/stencil format image allowing read-only access
4347e5c31af7Sopenharmony_ci    as a depth attachment or in shaders as a sampled image, combined
4348e5c31af7Sopenharmony_ci    image/sampler, or input attachment.
4349e5c31af7Sopenharmony_ci  * ename:VK_IMAGE_LAYOUT_STENCIL_ATTACHMENT_OPTIMAL specifies a layout for
4350e5c31af7Sopenharmony_ci    the stencil aspect of a depth/stencil format image allowing read and
4351e5c31af7Sopenharmony_ci    write access as a stencil attachment.
4352e5c31af7Sopenharmony_ci  * ename:VK_IMAGE_LAYOUT_STENCIL_READ_ONLY_OPTIMAL specifies a layout for
4353e5c31af7Sopenharmony_ci    the stencil aspect of a depth/stencil format image allowing read-only
4354e5c31af7Sopenharmony_ci    access as a stencil attachment or in shaders as a sampled image,
4355e5c31af7Sopenharmony_ci    combined image/sampler, or input attachment.
4356e5c31af7Sopenharmony_ciendif::VK_VERSION_1_2,VK_KHR_separate_depth_stencil_layouts[]
4357e5c31af7Sopenharmony_ci  * ename:VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL specifies a layout
4358e5c31af7Sopenharmony_ci    allowing read-only access in a shader as a sampled image, combined
4359e5c31af7Sopenharmony_ci    image/sampler, or input attachment.
4360e5c31af7Sopenharmony_ci    This layout is valid only for image subresources of images created with
4361e5c31af7Sopenharmony_ci    the ename:VK_IMAGE_USAGE_SAMPLED_BIT or
4362e5c31af7Sopenharmony_ci    ename:VK_IMAGE_USAGE_INPUT_ATTACHMENT_BIT usage bits enabled.
4363e5c31af7Sopenharmony_ci  * ename:VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL must: only be used as a
4364e5c31af7Sopenharmony_ci    source image of a transfer command (see the definition of
4365e5c31af7Sopenharmony_ci    <<synchronization-pipeline-stages-transfer,
4366e5c31af7Sopenharmony_ci    ename:VK_PIPELINE_STAGE_TRANSFER_BIT>>).
4367e5c31af7Sopenharmony_ci    This layout is valid only for image subresources of images created with
4368e5c31af7Sopenharmony_ci    the ename:VK_IMAGE_USAGE_TRANSFER_SRC_BIT usage bit enabled.
4369e5c31af7Sopenharmony_ci  * ename:VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL must: only be used as a
4370e5c31af7Sopenharmony_ci    destination image of a transfer command.
4371e5c31af7Sopenharmony_ci    This layout is valid only for image subresources of images created with
4372e5c31af7Sopenharmony_ci    the ename:VK_IMAGE_USAGE_TRANSFER_DST_BIT usage bit enabled.
4373e5c31af7Sopenharmony_ciifdef::VK_KHR_swapchain[]
4374e5c31af7Sopenharmony_ci  * ename:VK_IMAGE_LAYOUT_PRESENT_SRC_KHR must: only be used for presenting
4375e5c31af7Sopenharmony_ci    a presentable image for display.
4376e5c31af7Sopenharmony_ciifdef::VK_KHR_shared_presentable_image[]
4377e5c31af7Sopenharmony_ci  * ename:VK_IMAGE_LAYOUT_SHARED_PRESENT_KHR is valid only for shared
4378e5c31af7Sopenharmony_ci    presentable images, and must: be used for any usage the image supports.
4379e5c31af7Sopenharmony_ciendif::VK_KHR_shared_presentable_image[]
4380e5c31af7Sopenharmony_ciendif::VK_KHR_swapchain[]
4381e5c31af7Sopenharmony_ciifdef::VK_KHR_fragment_shading_rate,VK_NV_shading_rate_image[]
4382e5c31af7Sopenharmony_ci  * ename:VK_IMAGE_LAYOUT_FRAGMENT_SHADING_RATE_ATTACHMENT_OPTIMAL_KHR must:
4383e5c31af7Sopenharmony_ci    only be used as a
4384e5c31af7Sopenharmony_ciifdef::VK_KHR_fragment_shading_rate[]
4385e5c31af7Sopenharmony_ci    <<primsrast-fragment-shading-rate-attachment, fragment shading rate
4386e5c31af7Sopenharmony_ci    attachment>>
4387e5c31af7Sopenharmony_ciendif::VK_KHR_fragment_shading_rate[]
4388e5c31af7Sopenharmony_ciifdef::VK_KHR_fragment_shading_rate,VK_NV_shading_rate_image[or]
4389e5c31af7Sopenharmony_ciifdef::VK_NV_shading_rate_image[]
4390e5c31af7Sopenharmony_ci    <<primsrast-shading-rate-image, shading rate image>>.
4391e5c31af7Sopenharmony_ciendif::VK_NV_shading_rate_image[]
4392e5c31af7Sopenharmony_ci    This layout is valid only for image subresources of images created with
4393e5c31af7Sopenharmony_ci    the ename:VK_IMAGE_USAGE_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR usage
4394e5c31af7Sopenharmony_ci    bit enabled.
4395e5c31af7Sopenharmony_ciendif::VK_KHR_fragment_shading_rate,VK_NV_shading_rate_image[]
4396e5c31af7Sopenharmony_ciifdef::VK_EXT_fragment_density_map[]
4397e5c31af7Sopenharmony_ci  * ename:VK_IMAGE_LAYOUT_FRAGMENT_DENSITY_MAP_OPTIMAL_EXT must: only be
4398e5c31af7Sopenharmony_ci    used as a fragment density map attachment in a sname:VkRenderPass.
4399e5c31af7Sopenharmony_ci    This layout is valid only for image subresources of images created with
4400e5c31af7Sopenharmony_ci    the ename:VK_IMAGE_USAGE_FRAGMENT_DENSITY_MAP_BIT_EXT usage bit enabled.
4401e5c31af7Sopenharmony_ciendif::VK_EXT_fragment_density_map[]
4402e5c31af7Sopenharmony_ciifdef::VK_KHR_video_decode_queue[]
4403e5c31af7Sopenharmony_ci  * ename:VK_IMAGE_LAYOUT_VIDEO_DECODE_DST_KHR must: only be used as a
4404e5c31af7Sopenharmony_ci    <<decode-output-picture,decode output picture>> in a
4405e5c31af7Sopenharmony_ci    <<video-decode-operations,video decode operation>>.
4406e5c31af7Sopenharmony_ci    This layout is valid only for image subresources of images created with
4407e5c31af7Sopenharmony_ci    the ename:VK_IMAGE_USAGE_VIDEO_DECODE_DST_BIT_KHR usage bit enabled.
4408e5c31af7Sopenharmony_ci  * ename:VK_IMAGE_LAYOUT_VIDEO_DECODE_SRC_KHR is reserved for future use.
4409e5c31af7Sopenharmony_ci  * ename:VK_IMAGE_LAYOUT_VIDEO_DECODE_DPB_KHR must: only be used as an
4410e5c31af7Sopenharmony_ci    output <<reconstructed-picture,reconstructed picture>> or an input
4411e5c31af7Sopenharmony_ci    <<reference-picture,reference picture>> in a <<video-decode-operations,
4412e5c31af7Sopenharmony_ci    video decode operation>>.
4413e5c31af7Sopenharmony_ci    This layout is valid only for image subresources of images created with
4414e5c31af7Sopenharmony_ci    the ename:VK_IMAGE_USAGE_VIDEO_DECODE_DPB_BIT_KHR usage bit enabled.
4415e5c31af7Sopenharmony_ciendif::VK_KHR_video_decode_queue[]
4416e5c31af7Sopenharmony_ciifdef::VK_KHR_video_encode_queue[]
4417e5c31af7Sopenharmony_ci  * ename:VK_IMAGE_LAYOUT_VIDEO_ENCODE_DST_KHR is reserved for future use.
4418e5c31af7Sopenharmony_ci  * ename:VK_IMAGE_LAYOUT_VIDEO_ENCODE_SRC_KHR must: only be used as an
4419e5c31af7Sopenharmony_ci    <<encode-input-picture,encode input picture>> in a
4420e5c31af7Sopenharmony_ci    <<video-encode-operations,video encode operation>>.
4421e5c31af7Sopenharmony_ci    This layout is valid only for image subresources of images created with
4422e5c31af7Sopenharmony_ci    the ename:VK_IMAGE_USAGE_VIDEO_ENCODE_SRC_BIT_KHR usage bit enabled.
4423e5c31af7Sopenharmony_ci  * ename:VK_IMAGE_LAYOUT_VIDEO_ENCODE_DPB_KHR must: only be used as an
4424e5c31af7Sopenharmony_ci    output <<reconstructed-picture,reconstructed picture>> or an input
4425e5c31af7Sopenharmony_ci    <<reference-picture,reference picture>> in a <<video-encode-operations,
4426e5c31af7Sopenharmony_ci    video encode operation>>.
4427e5c31af7Sopenharmony_ci    This layout is valid only for image subresources of images created with
4428e5c31af7Sopenharmony_ci    the ename:VK_IMAGE_USAGE_VIDEO_ENCODE_DPB_BIT_KHR usage bit enabled.
4429e5c31af7Sopenharmony_ciendif::VK_KHR_video_encode_queue[]
4430e5c31af7Sopenharmony_ciifdef::VK_EXT_attachment_feedback_loop_layout[]
4431e5c31af7Sopenharmony_ci  * ename:VK_IMAGE_LAYOUT_ATTACHMENT_FEEDBACK_LOOP_OPTIMAL_EXT must: only be
4432e5c31af7Sopenharmony_ci    used as either a color attachment or depth/stencil attachment in a
4433e5c31af7Sopenharmony_ci    sname:VkFramebuffer and/or read-only access in a shader as a sampled
4434e5c31af7Sopenharmony_ci    image, combined image/sampler, or input attachment.
4435e5c31af7Sopenharmony_ci    This layout is valid only for image subresources of images created with
4436e5c31af7Sopenharmony_ci    the ename:VK_IMAGE_USAGE_ATTACHMENT_FEEDBACK_LOOP_BIT_EXT usage bit
4437e5c31af7Sopenharmony_ci    enabled and either the ename:VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT or
4438e5c31af7Sopenharmony_ci    ename:VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT and either the
4439e5c31af7Sopenharmony_ci    ename:VK_IMAGE_USAGE_INPUT_ATTACHMENT_BIT or
4440e5c31af7Sopenharmony_ci    ename:VK_IMAGE_USAGE_SAMPLED_BIT usage bits enabled.
4441e5c31af7Sopenharmony_ciendif::VK_EXT_attachment_feedback_loop_layout[]
4442e5c31af7Sopenharmony_ci
4443e5c31af7Sopenharmony_ciThe layout of each image subresource is not a state of the image subresource
4444e5c31af7Sopenharmony_ciitself, but is rather a property of how the data in memory is organized, and
4445e5c31af7Sopenharmony_cithus for each mechanism of accessing an image in the API the application
4446e5c31af7Sopenharmony_cimust: specify a parameter or structure member that indicates which image
4447e5c31af7Sopenharmony_cilayout the image subresource(s) are considered to be in when the image will
4448e5c31af7Sopenharmony_cibe accessed.
4449e5c31af7Sopenharmony_ciFor transfer commands, this is a parameter to the command (see <<clears>>
4450e5c31af7Sopenharmony_ciand <<copies>>).
4451e5c31af7Sopenharmony_ciFor use as a framebuffer attachment, this is a member in the substructures
4452e5c31af7Sopenharmony_ciof the slink:VkRenderPassCreateInfo (see <<renderpass,Render Pass>>).
4453e5c31af7Sopenharmony_ciFor use in a descriptor set, this is a member in the
4454e5c31af7Sopenharmony_cisname:VkDescriptorImageInfo structure (see <<descriptorsets-updates>>).
4455e5c31af7Sopenharmony_ci--
4456e5c31af7Sopenharmony_ci
4457e5c31af7Sopenharmony_ci
4458e5c31af7Sopenharmony_ci[[resources-image-layouts-matching-rule]]
4459e5c31af7Sopenharmony_ci=== Image Layout Matching Rules
4460e5c31af7Sopenharmony_ci
4461e5c31af7Sopenharmony_ciAt the time that any command buffer command accessing an image executes on
4462e5c31af7Sopenharmony_ciany queue, the layouts of the image subresources that are accessed must: all
4463e5c31af7Sopenharmony_cimatch exactly the layout specified via the API controlling those
4464e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_1,VK_KHR_maintenance2[accesses,]
4465e5c31af7Sopenharmony_ciifndef::VK_VERSION_1_1,VK_KHR_maintenance2[accesses.]
4466e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_1,VK_KHR_maintenance2[]
4467e5c31af7Sopenharmony_ciexcept in case of accesses to an image with a depth/stencil format performed
4468e5c31af7Sopenharmony_cithrough descriptors referring to only a single aspect of the image, where
4469e5c31af7Sopenharmony_cithe following relaxed matching rules apply:
4470e5c31af7Sopenharmony_ci
4471e5c31af7Sopenharmony_ci  * Descriptors referring just to the depth aspect of a depth/stencil image
4472e5c31af7Sopenharmony_ci    only need to match in the image layout of the depth aspect, thus
4473e5c31af7Sopenharmony_ci    ename:VK_IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL and
4474e5c31af7Sopenharmony_ci    ename:VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_STENCIL_ATTACHMENT_OPTIMAL are
4475e5c31af7Sopenharmony_ci    considered to match.
4476e5c31af7Sopenharmony_ci  * Descriptors referring just to the stencil aspect of a depth/stencil
4477e5c31af7Sopenharmony_ci    image only need to match in the image layout of the stencil aspect, thus
4478e5c31af7Sopenharmony_ci    ename:VK_IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL and
4479e5c31af7Sopenharmony_ci    ename:VK_IMAGE_LAYOUT_DEPTH_ATTACHMENT_STENCIL_READ_ONLY_OPTIMAL are
4480e5c31af7Sopenharmony_ci    considered to match.
4481e5c31af7Sopenharmony_ciendif::VK_VERSION_1_1,VK_KHR_maintenance2[]
4482e5c31af7Sopenharmony_ci
4483e5c31af7Sopenharmony_ciWhen performing a layout transition on an image subresource, the old layout
4484e5c31af7Sopenharmony_civalue must: either equal the current layout of the image subresource (at the
4485e5c31af7Sopenharmony_citime the transition executes), or else be ename:VK_IMAGE_LAYOUT_UNDEFINED
4486e5c31af7Sopenharmony_ci(implying that the contents of the image subresource need not be preserved).
4487e5c31af7Sopenharmony_ciThe new layout used in a transition must: not be
4488e5c31af7Sopenharmony_ciename:VK_IMAGE_LAYOUT_UNDEFINED or ename:VK_IMAGE_LAYOUT_PREINITIALIZED.
4489e5c31af7Sopenharmony_ci
4490e5c31af7Sopenharmony_ciifdef::VK_EXT_sample_locations[]
4491e5c31af7Sopenharmony_ci
4492e5c31af7Sopenharmony_ciThe image layout of each image subresource of a depth/stencil image created
4493e5c31af7Sopenharmony_ciwith ename:VK_IMAGE_CREATE_SAMPLE_LOCATIONS_COMPATIBLE_DEPTH_BIT_EXT is
4494e5c31af7Sopenharmony_cidependent on the last sample locations used to render to the image
4495e5c31af7Sopenharmony_cisubresource as a depth/stencil attachment, thus applications must: provide
4496e5c31af7Sopenharmony_cithe same sample locations that were last used to render to the given image
4497e5c31af7Sopenharmony_cisubresource whenever a layout transition of the image subresource happens,
4498e5c31af7Sopenharmony_ciotherwise the contents of the depth aspect of the image subresource become
4499e5c31af7Sopenharmony_ciundefined:.
4500e5c31af7Sopenharmony_ci
4501e5c31af7Sopenharmony_ciIn addition, depth reads from a depth/stencil attachment referring to an
4502e5c31af7Sopenharmony_ciimage subresource range of a depth/stencil image created with
4503e5c31af7Sopenharmony_ciename:VK_IMAGE_CREATE_SAMPLE_LOCATIONS_COMPATIBLE_DEPTH_BIT_EXT using
4504e5c31af7Sopenharmony_cidifferent sample locations than what have been last used to perform depth
4505e5c31af7Sopenharmony_ciwrites to the image subresources of the same image subresource range return
4506e5c31af7Sopenharmony_ciundefined: values.
4507e5c31af7Sopenharmony_ci
4508e5c31af7Sopenharmony_ciSimilarly, depth writes to a depth/stencil attachment referring to an image
4509e5c31af7Sopenharmony_cisubresource range of a depth/stencil image created with
4510e5c31af7Sopenharmony_ciename:VK_IMAGE_CREATE_SAMPLE_LOCATIONS_COMPATIBLE_DEPTH_BIT_EXT using
4511e5c31af7Sopenharmony_cidifferent sample locations than what have been last used to perform depth
4512e5c31af7Sopenharmony_ciwrites to the image subresources of the same image subresource range make
4513e5c31af7Sopenharmony_cithe contents of the depth aspect of those image subresources undefined:.
4514e5c31af7Sopenharmony_ci
4515e5c31af7Sopenharmony_ciendif::VK_EXT_sample_locations[]
4516e5c31af7Sopenharmony_ci
4517e5c31af7Sopenharmony_ci
4518e5c31af7Sopenharmony_ci[[resources-image-views]]
4519e5c31af7Sopenharmony_ci== Image Views
4520e5c31af7Sopenharmony_ci
4521e5c31af7Sopenharmony_ci[open,refpage='VkImageView',desc='Opaque handle to an image view object',type='handles']
4522e5c31af7Sopenharmony_ci--
4523e5c31af7Sopenharmony_ciImage objects are not directly accessed by pipeline shaders for reading or
4524e5c31af7Sopenharmony_ciwriting image data.
4525e5c31af7Sopenharmony_ciInstead, _image views_ representing contiguous ranges of the image
4526e5c31af7Sopenharmony_cisubresources and containing additional metadata are used for that purpose.
4527e5c31af7Sopenharmony_ciViews must: be created on images of compatible types, and must: represent a
4528e5c31af7Sopenharmony_civalid subset of image subresources.
4529e5c31af7Sopenharmony_ci
4530e5c31af7Sopenharmony_ciImage views are represented by sname:VkImageView handles:
4531e5c31af7Sopenharmony_ci
4532e5c31af7Sopenharmony_ciinclude::{generated}/api/handles/VkImageView.adoc[]
4533e5c31af7Sopenharmony_ci--
4534e5c31af7Sopenharmony_ci
4535e5c31af7Sopenharmony_ci[open,refpage='VK_REMAINING_ARRAY_LAYERS',desc='Sentinel for all remaining array layers',type='consts']
4536e5c31af7Sopenharmony_ci--
4537e5c31af7Sopenharmony_ciename:VK_REMAINING_ARRAY_LAYERS is a special constant value used for image
4538e5c31af7Sopenharmony_civiews to indicate that all remaining array layers in an image after the base
4539e5c31af7Sopenharmony_cilayer should be included in the view.
4540e5c31af7Sopenharmony_ci
4541e5c31af7Sopenharmony_ciinclude::{generated}/api/enums/VK_REMAINING_ARRAY_LAYERS.adoc[]
4542e5c31af7Sopenharmony_ci--
4543e5c31af7Sopenharmony_ci
4544e5c31af7Sopenharmony_ci[open,refpage='VK_REMAINING_MIP_LEVELS',desc='Sentinel for all remaining mipmap levels',type='consts']
4545e5c31af7Sopenharmony_ci--
4546e5c31af7Sopenharmony_ciename:VK_REMAINING_MIP_LEVELS is a special constant value used for image
4547e5c31af7Sopenharmony_civiews to indicate that all remaining mipmap levels in an image after the
4548e5c31af7Sopenharmony_cibase level should be included in the view.
4549e5c31af7Sopenharmony_ci
4550e5c31af7Sopenharmony_ciinclude::{generated}/api/enums/VK_REMAINING_MIP_LEVELS.adoc[]
4551e5c31af7Sopenharmony_ci--
4552e5c31af7Sopenharmony_ci
4553e5c31af7Sopenharmony_ci[open,refpage='VkImageViewType',desc='Image view types',type='enums']
4554e5c31af7Sopenharmony_ci--
4555e5c31af7Sopenharmony_ciThe types of image views that can: be created are:
4556e5c31af7Sopenharmony_ci
4557e5c31af7Sopenharmony_ciinclude::{generated}/api/enums/VkImageViewType.adoc[]
4558e5c31af7Sopenharmony_ci--
4559e5c31af7Sopenharmony_ci
4560e5c31af7Sopenharmony_ci[open,refpage='vkCreateImageView',desc='Create an image view from an existing image',type='protos']
4561e5c31af7Sopenharmony_ci--
4562e5c31af7Sopenharmony_ci:refpage: vkCreateImageView
4563e5c31af7Sopenharmony_ci:objectnameplural: image views
4564e5c31af7Sopenharmony_ci:objectnamecamelcase: imageView
4565e5c31af7Sopenharmony_ci:objectcount: 1
4566e5c31af7Sopenharmony_ci
4567e5c31af7Sopenharmony_ciTo create an image view, call:
4568e5c31af7Sopenharmony_ci
4569e5c31af7Sopenharmony_ciinclude::{generated}/api/protos/vkCreateImageView.adoc[]
4570e5c31af7Sopenharmony_ci
4571e5c31af7Sopenharmony_ci  * pname:device is the logical device that creates the image view.
4572e5c31af7Sopenharmony_ci  * pname:pCreateInfo is a pointer to a sname:VkImageViewCreateInfo
4573e5c31af7Sopenharmony_ci    structure containing parameters to be used to create the image view.
4574e5c31af7Sopenharmony_ci  * pname:pAllocator controls host memory allocation as described in the
4575e5c31af7Sopenharmony_ci    <<memory-allocation, Memory Allocation>> chapter.
4576e5c31af7Sopenharmony_ci  * pname:pView is a pointer to a slink:VkImageView handle in which the
4577e5c31af7Sopenharmony_ci    resulting image view object is returned.
4578e5c31af7Sopenharmony_ci
4579e5c31af7Sopenharmony_ciinclude::{chapters}/commonvalidity/no_dynamic_allocations_common.adoc[]
4580e5c31af7Sopenharmony_ci
4581e5c31af7Sopenharmony_ci.Valid Usage
4582e5c31af7Sopenharmony_ci****
4583e5c31af7Sopenharmony_ci  * [[VUID-vkCreateImageView-image-09179]]
4584e5c31af7Sopenharmony_ci    slink:VkImageViewCreateInfo::pname:image must: have been created from
4585e5c31af7Sopenharmony_ci    pname:device
4586e5c31af7Sopenharmony_ciifdef::VKSC_VERSION_1_0[]
4587e5c31af7Sopenharmony_ciinclude::{chapters}/commonvalidity/memory_reservation_request_count_common.adoc[]
4588e5c31af7Sopenharmony_ci  * [[VUID-vkCreateImageView-subresourceRange-05063]]
4589e5c31af7Sopenharmony_ci    If slink:VkImageViewCreateInfo::pname:subresourceRange.layerCount is not
4590e5c31af7Sopenharmony_ci    ename:VK_REMAINING_ARRAY_LAYERS and is greater than `1`, or if
4591e5c31af7Sopenharmony_ci    slink:VkImageViewCreateInfo::pname:subresourceRange.layerCount is
4592e5c31af7Sopenharmony_ci    ename:VK_REMAINING_ARRAY_LAYERS and the remaining number of layers in
4593e5c31af7Sopenharmony_ci    slink:VkImageViewCreateInfo::pname:image is greater than `1`, the number
4594e5c31af7Sopenharmony_ci    of image views with more than one array layer currently allocated from
4595e5c31af7Sopenharmony_ci    pname:device plus `1` must: be less than or equal to the total number of
4596e5c31af7Sopenharmony_ci    image views requested via
4597e5c31af7Sopenharmony_ci    slink:VkDeviceObjectReservationCreateInfo::pname:layeredImageViewRequestCount
4598e5c31af7Sopenharmony_ci    specified when pname:device was created
4599e5c31af7Sopenharmony_ciendif::VKSC_VERSION_1_0[]
4600e5c31af7Sopenharmony_ci****
4601e5c31af7Sopenharmony_ci
4602e5c31af7Sopenharmony_ciinclude::{generated}/validity/protos/vkCreateImageView.adoc[]
4603e5c31af7Sopenharmony_ci--
4604e5c31af7Sopenharmony_ci
4605e5c31af7Sopenharmony_ci[open,refpage='VkImageViewCreateInfo',desc='Structure specifying parameters of a newly created image view',type='structs']
4606e5c31af7Sopenharmony_ci--
4607e5c31af7Sopenharmony_ciThe sname:VkImageViewCreateInfo structure is defined as:
4608e5c31af7Sopenharmony_ci
4609e5c31af7Sopenharmony_ciinclude::{generated}/api/structs/VkImageViewCreateInfo.adoc[]
4610e5c31af7Sopenharmony_ci
4611e5c31af7Sopenharmony_ci  * pname:sType is a elink:VkStructureType value identifying this structure.
4612e5c31af7Sopenharmony_ci  * pname:pNext is `NULL` or a pointer to a structure extending this
4613e5c31af7Sopenharmony_ci    structure.
4614e5c31af7Sopenharmony_ci  * pname:flags is a bitmask of elink:VkImageViewCreateFlagBits specifying
4615e5c31af7Sopenharmony_ci    additional parameters of the image view.
4616e5c31af7Sopenharmony_ci  * pname:image is a slink:VkImage on which the view will be created.
4617e5c31af7Sopenharmony_ci  * pname:viewType is a elink:VkImageViewType value specifying the type of
4618e5c31af7Sopenharmony_ci    the image view.
4619e5c31af7Sopenharmony_ci  * pname:format is a elink:VkFormat specifying the format and type used to
4620e5c31af7Sopenharmony_ci    interpret texel blocks of the image.
4621e5c31af7Sopenharmony_ci  * pname:components is a slink:VkComponentMapping structure specifying a
4622e5c31af7Sopenharmony_ci    remapping of color components (or of depth or stencil components after
4623e5c31af7Sopenharmony_ci    they have been converted into color components).
4624e5c31af7Sopenharmony_ci  * pname:subresourceRange is a slink:VkImageSubresourceRange structure
4625e5c31af7Sopenharmony_ci    selecting the set of mipmap levels and array layers to be accessible to
4626e5c31af7Sopenharmony_ci    the view.
4627e5c31af7Sopenharmony_ci
4628e5c31af7Sopenharmony_ci[[resources-image-inherited-usage]]
4629e5c31af7Sopenharmony_ciSome of the pname:image creation parameters are inherited by the view.
4630e5c31af7Sopenharmony_ciIn particular, image view creation inherits the implicit parameter
4631e5c31af7Sopenharmony_cipname:usage specifying the allowed usages of the image view that, by
4632e5c31af7Sopenharmony_cidefault, takes the value of the corresponding pname:usage parameter
4633e5c31af7Sopenharmony_cispecified in slink:VkImageCreateInfo at image creation time.
4634e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_1,VK_KHR_maintenance2[]
4635e5c31af7Sopenharmony_ciThe implicit pname:usage can: be overridden by adding a
4636e5c31af7Sopenharmony_cislink:VkImageViewUsageCreateInfo structure to the pname:pNext chain, but the
4637e5c31af7Sopenharmony_ciview usage must: be a subset of the image usage.
4638e5c31af7Sopenharmony_ciendif::VK_VERSION_1_1,VK_KHR_maintenance2[]
4639e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_2,VK_EXT_separate_stencil_usage[]
4640e5c31af7Sopenharmony_ciIf pname:image has a depth-stencil format and was created with a
4641e5c31af7Sopenharmony_cislink:VkImageStencilUsageCreateInfo structure included in the pname:pNext
4642e5c31af7Sopenharmony_cichain of slink:VkImageCreateInfo, the usage is calculated based on the
4643e5c31af7Sopenharmony_cipname:subresource.aspectMask provided:
4644e5c31af7Sopenharmony_ci
4645e5c31af7Sopenharmony_ci  * If pname:aspectMask includes only ename:VK_IMAGE_ASPECT_STENCIL_BIT, the
4646e5c31af7Sopenharmony_ci    implicit pname:usage is equal to
4647e5c31af7Sopenharmony_ci    slink:VkImageStencilUsageCreateInfo::pname:stencilUsage.
4648e5c31af7Sopenharmony_ci  * If pname:aspectMask includes only ename:VK_IMAGE_ASPECT_DEPTH_BIT, the
4649e5c31af7Sopenharmony_ci    implicit pname:usage is equal to slink:VkImageCreateInfo::pname:usage.
4650e5c31af7Sopenharmony_ci  * If both aspects are included in pname:aspectMask, the implicit
4651e5c31af7Sopenharmony_ci    pname:usage is equal to the intersection of
4652e5c31af7Sopenharmony_ci    slink:VkImageCreateInfo::pname:usage and
4653e5c31af7Sopenharmony_ci    slink:VkImageStencilUsageCreateInfo::pname:stencilUsage.
4654e5c31af7Sopenharmony_ciendif::VK_VERSION_1_2,VK_EXT_separate_stencil_usage[]
4655e5c31af7Sopenharmony_ci
4656e5c31af7Sopenharmony_ciifdef::VK_EXT_image_sliced_view_of_3d[]
4657e5c31af7Sopenharmony_ciIf pname:image is a 3D image, its Z range can: be restricted to a subset by
4658e5c31af7Sopenharmony_ciadding a slink:VkImageViewSlicedCreateInfoEXT to the pname:pNext chain.
4659e5c31af7Sopenharmony_ciendif::VK_EXT_image_sliced_view_of_3d[]
4660e5c31af7Sopenharmony_ci
4661e5c31af7Sopenharmony_ciIf pname:image was created with the ename:VK_IMAGE_CREATE_MUTABLE_FORMAT_BIT
4662e5c31af7Sopenharmony_ciflag,
4663e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_1,VK_KHR_sampler_ycbcr_conversion[]
4664e5c31af7Sopenharmony_ciand if the pname:format of the image is not
4665e5c31af7Sopenharmony_ci<<formats-requiring-sampler-ycbcr-conversion,multi-planar>>,
4666e5c31af7Sopenharmony_ciendif::VK_VERSION_1_1,VK_KHR_sampler_ycbcr_conversion[]
4667e5c31af7Sopenharmony_cipname:format can: be different from the image's format, but if
4668e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_1,VK_KHR_maintenance2[]
4669e5c31af7Sopenharmony_cipname:image was created without the
4670e5c31af7Sopenharmony_ciename:VK_IMAGE_CREATE_BLOCK_TEXEL_VIEW_COMPATIBLE_BIT flag and
4671e5c31af7Sopenharmony_ciendif::VK_VERSION_1_1,VK_KHR_maintenance2[]
4672e5c31af7Sopenharmony_cithey are not equal they must: be _compatible_.
4673e5c31af7Sopenharmony_ciImage format compatibility is defined in the
4674e5c31af7Sopenharmony_ci<<formats-compatibility-classes,Format Compatibility Classes>> section.
4675e5c31af7Sopenharmony_ciViews of compatible formats will have the same mapping between texel
4676e5c31af7Sopenharmony_cicoordinates and memory locations irrespective of the pname:format, with only
4677e5c31af7Sopenharmony_cithe interpretation of the bit pattern changing.
4678e5c31af7Sopenharmony_ci
4679e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_1,VK_KHR_sampler_ycbcr_conversion[]
4680e5c31af7Sopenharmony_ci[[image-views-plane-promotion]]
4681e5c31af7Sopenharmony_ciIf pname:image was created with a
4682e5c31af7Sopenharmony_ci<<formats-requiring-sampler-ycbcr-conversion,multi-planar>> format, and the
4683e5c31af7Sopenharmony_ciimage view's pname:aspectMask is one of ename:VK_IMAGE_ASPECT_PLANE_0_BIT,
4684e5c31af7Sopenharmony_ciename:VK_IMAGE_ASPECT_PLANE_1_BIT or ename:VK_IMAGE_ASPECT_PLANE_2_BIT, the
4685e5c31af7Sopenharmony_ciview's aspect mask is considered to be equivalent to
4686e5c31af7Sopenharmony_ciename:VK_IMAGE_ASPECT_COLOR_BIT when used as a framebuffer attachment.
4687e5c31af7Sopenharmony_ciendif::VK_VERSION_1_1,VK_KHR_sampler_ycbcr_conversion[]
4688e5c31af7Sopenharmony_ci
4689e5c31af7Sopenharmony_ci[NOTE]
4690e5c31af7Sopenharmony_ci.Note
4691e5c31af7Sopenharmony_ci====
4692e5c31af7Sopenharmony_ciValues intended to be used with one view format may: not be exactly
4693e5c31af7Sopenharmony_cipreserved when written or read through a different format.
4694e5c31af7Sopenharmony_ciFor example, an integer value that happens to have the bit pattern of a
4695e5c31af7Sopenharmony_cifloating point denorm or NaN may: be flushed or canonicalized when written
4696e5c31af7Sopenharmony_cior read through a view with a floating point format.
4697e5c31af7Sopenharmony_ciSimilarly, a value written through a signed normalized format that has a bit
4698e5c31af7Sopenharmony_cipattern exactly equal to [eq]#-2^b^# may: be changed to [eq]#-2^b^ {plus} 1#
4699e5c31af7Sopenharmony_cias described in <<fundamentals-fixedfpconv,Conversion from Normalized
4700e5c31af7Sopenharmony_ciFixed-Point to Floating-Point>>.
4701e5c31af7Sopenharmony_ci====
4702e5c31af7Sopenharmony_ci
4703e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_1,VK_KHR_maintenance2[]
4704e5c31af7Sopenharmony_ciIf pname:image was created with the
4705e5c31af7Sopenharmony_ciename:VK_IMAGE_CREATE_BLOCK_TEXEL_VIEW_COMPATIBLE_BIT flag, pname:format
4706e5c31af7Sopenharmony_cimust: be _compatible_ with the image's format as described above; or must:
4707e5c31af7Sopenharmony_cibe an uncompressed format, in which case it must: be
4708e5c31af7Sopenharmony_ci<<formats-size-compatibility, _size-compatible_>> with the image's format.
4709e5c31af7Sopenharmony_ciIn this case, the resulting image view's texel dimensions equal the
4710e5c31af7Sopenharmony_cidimensions of the selected mip level divided by the compressed texel block
4711e5c31af7Sopenharmony_cisize and rounded up.
4712e5c31af7Sopenharmony_ciendif::VK_VERSION_1_1,VK_KHR_maintenance2[]
4713e5c31af7Sopenharmony_ci
4714e5c31af7Sopenharmony_ciThe slink:VkComponentMapping pname:components member describes a remapping
4715e5c31af7Sopenharmony_cifrom components of the image to components of the vector returned by shader
4716e5c31af7Sopenharmony_ciimage instructions.
4717e5c31af7Sopenharmony_ciThis remapping must: be the identity swizzle for storage image descriptors,
4718e5c31af7Sopenharmony_ciinput attachment descriptors,
4719e5c31af7Sopenharmony_ciifndef::VK_VERSION_1_1,VK_KHR_sampler_ycbcr_conversion[]
4720e5c31af7Sopenharmony_ciand framebuffer attachments.
4721e5c31af7Sopenharmony_ciendif::VK_VERSION_1_1,VK_KHR_sampler_ycbcr_conversion[]
4722e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_1,VK_KHR_sampler_ycbcr_conversion[]
4723e5c31af7Sopenharmony_ciframebuffer attachments, and any sname:VkImageView used with a combined
4724e5c31af7Sopenharmony_ciimage sampler that enables <<samplers-YCbCr-conversion,sampler {YCbCr}
4725e5c31af7Sopenharmony_ciconversion>>.
4726e5c31af7Sopenharmony_ciendif::VK_VERSION_1_1,VK_KHR_sampler_ycbcr_conversion[]
4727e5c31af7Sopenharmony_ci
4728e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_1,VK_KHR_sampler_ycbcr_conversion[]
4729e5c31af7Sopenharmony_ciIf the image view is to be used with a sampler which supports
4730e5c31af7Sopenharmony_ci<<samplers-YCbCr-conversion,sampler {YCbCr} conversion>>, an _identically
4731e5c31af7Sopenharmony_cidefined object_ of type slink:VkSamplerYcbcrConversion to that used to
4732e5c31af7Sopenharmony_cicreate the sampler must: be passed to flink:vkCreateImageView in a
4733e5c31af7Sopenharmony_cislink:VkSamplerYcbcrConversionInfo included in the pname:pNext chain of
4734e5c31af7Sopenharmony_cislink:VkImageViewCreateInfo.
4735e5c31af7Sopenharmony_ciConversely, if a slink:VkSamplerYcbcrConversion object is passed to
4736e5c31af7Sopenharmony_ciflink:vkCreateImageView, an identically defined
4737e5c31af7Sopenharmony_cislink:VkSamplerYcbcrConversion object must: be used when sampling the image.
4738e5c31af7Sopenharmony_ci
4739e5c31af7Sopenharmony_ci[[image-views-requiring-sampler-ycbcr-conversion]]
4740e5c31af7Sopenharmony_ciIf the image has a
4741e5c31af7Sopenharmony_ci<<formats-requiring-sampler-ycbcr-conversion,multi-planar>> pname:format,
4742e5c31af7Sopenharmony_cipname:subresourceRange.aspectMask is ename:VK_IMAGE_ASPECT_COLOR_BIT, and
4743e5c31af7Sopenharmony_cipname:usage includes ename:VK_IMAGE_USAGE_SAMPLED_BIT, then the pname:format
4744e5c31af7Sopenharmony_cimust: be identical to the image pname:format and the sampler to be used with
4745e5c31af7Sopenharmony_cithe image view must: enable <<samplers-YCbCr-conversion,sampler {YCbCr}
4746e5c31af7Sopenharmony_ciconversion>>.
4747e5c31af7Sopenharmony_ci
4748e5c31af7Sopenharmony_ciifdef::VK_KHR_video_queue[]
4749e5c31af7Sopenharmony_ciWhen such an image is used in a <<video-coding,video coding>> operation, the
4750e5c31af7Sopenharmony_ci<<samplers-YCbCr-conversion,sampler {YCbCr} conversion>> has no effect.
4751e5c31af7Sopenharmony_ciendif::VK_KHR_video_queue[]
4752e5c31af7Sopenharmony_ci
4753e5c31af7Sopenharmony_ciIf pname:image was created with the ename:VK_IMAGE_CREATE_MUTABLE_FORMAT_BIT
4754e5c31af7Sopenharmony_ciand the image has a
4755e5c31af7Sopenharmony_ci<<formats-requiring-sampler-ycbcr-conversion,multi-planar>> pname:format,
4756e5c31af7Sopenharmony_ciand if pname:subresourceRange.aspectMask is
4757e5c31af7Sopenharmony_ciename:VK_IMAGE_ASPECT_PLANE_0_BIT, ename:VK_IMAGE_ASPECT_PLANE_1_BIT, or
4758e5c31af7Sopenharmony_ciename:VK_IMAGE_ASPECT_PLANE_2_BIT, pname:format must: be
4759e5c31af7Sopenharmony_ci<<formats-compatible-planes,compatible>> with the corresponding plane of the
4760e5c31af7Sopenharmony_ciimage, and the sampler to be used with the image view must: not enable
4761e5c31af7Sopenharmony_ci<<samplers-YCbCr-conversion,sampler {YCbCr} conversion>>.
4762e5c31af7Sopenharmony_ciThe pname:width and pname:height of the single-plane image view must: be
4763e5c31af7Sopenharmony_ciderived from the multi-planar image's dimensions in the manner listed for
4764e5c31af7Sopenharmony_ci<<formats-compatible-planes,plane compatibility>> for the plane.
4765e5c31af7Sopenharmony_ci
4766e5c31af7Sopenharmony_ciAny view of an image plane will have the same mapping between texel
4767e5c31af7Sopenharmony_cicoordinates and memory locations as used by the components of the color
4768e5c31af7Sopenharmony_ciaspect, subject to the formulae relating texel coordinates to
4769e5c31af7Sopenharmony_cilower-resolution planes as described in <<textures-chroma-reconstruction,
4770e5c31af7Sopenharmony_ciChroma Reconstruction>>.
4771e5c31af7Sopenharmony_ciThat is, if an R or B plane has a reduced resolution relative to the G plane
4772e5c31af7Sopenharmony_ciof the multi-planar image, the image view operates using the (_u~plane~_,
4773e5c31af7Sopenharmony_ci_v~plane~_) unnormalized coordinates of the reduced-resolution plane, and
4774e5c31af7Sopenharmony_cithese coordinates access the same memory locations as the (_u~color~_,
4775e5c31af7Sopenharmony_ci_v~color~_) unnormalized coordinates of the color aspect for which chroma
4776e5c31af7Sopenharmony_cireconstruction operations operate on the same (_u~plane~_, _v~plane~_) or
4777e5c31af7Sopenharmony_ci(_i~plane~_, _j~plane~_) coordinates.
4778e5c31af7Sopenharmony_ciendif::VK_VERSION_1_1,VK_KHR_sampler_ycbcr_conversion[]
4779e5c31af7Sopenharmony_ci
4780e5c31af7Sopenharmony_ci[[resources-image-views-compatibility]]
4781e5c31af7Sopenharmony_ci.Image type and image view type compatibility requirements
4782e5c31af7Sopenharmony_ci[cols="35%,50%",options="header"]
4783e5c31af7Sopenharmony_ci|====
4784e5c31af7Sopenharmony_ci| Image View Type | Compatible Image Types
4785e5c31af7Sopenharmony_ci| ename:VK_IMAGE_VIEW_TYPE_1D         | ename:VK_IMAGE_TYPE_1D
4786e5c31af7Sopenharmony_ci| ename:VK_IMAGE_VIEW_TYPE_1D_ARRAY   | ename:VK_IMAGE_TYPE_1D
4787e5c31af7Sopenharmony_ci| ename:VK_IMAGE_VIEW_TYPE_2D         | ename:VK_IMAGE_TYPE_2D
4788e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_1,VK_KHR_maintenance1[, ename:VK_IMAGE_TYPE_3D]
4789e5c31af7Sopenharmony_ci| ename:VK_IMAGE_VIEW_TYPE_2D_ARRAY   | ename:VK_IMAGE_TYPE_2D
4790e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_1,VK_KHR_maintenance1[, ename:VK_IMAGE_TYPE_3D]
4791e5c31af7Sopenharmony_ci| ename:VK_IMAGE_VIEW_TYPE_CUBE       | ename:VK_IMAGE_TYPE_2D
4792e5c31af7Sopenharmony_ci| ename:VK_IMAGE_VIEW_TYPE_CUBE_ARRAY | ename:VK_IMAGE_TYPE_2D
4793e5c31af7Sopenharmony_ci| ename:VK_IMAGE_VIEW_TYPE_3D         | ename:VK_IMAGE_TYPE_3D
4794e5c31af7Sopenharmony_ci|====
4795e5c31af7Sopenharmony_ci
4796e5c31af7Sopenharmony_ci.Valid Usage
4797e5c31af7Sopenharmony_ci****
4798e5c31af7Sopenharmony_ci  * [[VUID-VkImageViewCreateInfo-image-01003]]
4799e5c31af7Sopenharmony_ci    If pname:image was not created with
4800e5c31af7Sopenharmony_ci    ename:VK_IMAGE_CREATE_CUBE_COMPATIBLE_BIT then pname:viewType must: not
4801e5c31af7Sopenharmony_ci    be ename:VK_IMAGE_VIEW_TYPE_CUBE or ename:VK_IMAGE_VIEW_TYPE_CUBE_ARRAY
4802e5c31af7Sopenharmony_ci  * [[VUID-VkImageViewCreateInfo-viewType-01004]]
4803e5c31af7Sopenharmony_ci    If the <<features-imageCubeArray, pname:imageCubeArray>> feature is not
4804e5c31af7Sopenharmony_ci    enabled, pname:viewType must: not be ename:VK_IMAGE_VIEW_TYPE_CUBE_ARRAY
4805e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_1,VK_KHR_maintenance1[]
4806e5c31af7Sopenharmony_ci  * [[VUID-VkImageViewCreateInfo-image-06723]]
4807e5c31af7Sopenharmony_ci    If pname:image was created with ename:VK_IMAGE_TYPE_3D but without
4808e5c31af7Sopenharmony_ci    ename:VK_IMAGE_CREATE_2D_ARRAY_COMPATIBLE_BIT set then pname:viewType
4809e5c31af7Sopenharmony_ci    must: not be ename:VK_IMAGE_VIEW_TYPE_2D_ARRAY
4810e5c31af7Sopenharmony_ciifndef::VK_EXT_image_2d_view_of_3d[]
4811e5c31af7Sopenharmony_ci  * [[VUID-VkImageViewCreateInfo-image-06727]]
4812e5c31af7Sopenharmony_ci    If pname:image was created with ename:VK_IMAGE_TYPE_3D but without
4813e5c31af7Sopenharmony_ci    ename:VK_IMAGE_CREATE_2D_ARRAY_COMPATIBLE_BIT set then pname:viewType
4814e5c31af7Sopenharmony_ci    must: not be ename:VK_IMAGE_VIEW_TYPE_2D
4815e5c31af7Sopenharmony_ciendif::VK_EXT_image_2d_view_of_3d[]
4816e5c31af7Sopenharmony_ciifdef::VK_EXT_image_2d_view_of_3d[]
4817e5c31af7Sopenharmony_ci  * [[VUID-VkImageViewCreateInfo-image-06728]]
4818e5c31af7Sopenharmony_ci    If pname:image was created with ename:VK_IMAGE_TYPE_3D but without
4819e5c31af7Sopenharmony_ci    ename:VK_IMAGE_CREATE_2D_ARRAY_COMPATIBLE_BIT or
4820e5c31af7Sopenharmony_ci    ename:VK_IMAGE_CREATE_2D_VIEW_COMPATIBLE_BIT_EXT set, then
4821e5c31af7Sopenharmony_ci    pname:viewType must: not be ename:VK_IMAGE_VIEW_TYPE_2D
4822e5c31af7Sopenharmony_ciendif::VK_EXT_image_2d_view_of_3d[]
4823e5c31af7Sopenharmony_ci  * [[VUID-VkImageViewCreateInfo-image-04970]]
4824e5c31af7Sopenharmony_ci    If pname:image was created with ename:VK_IMAGE_TYPE_3D and
4825e5c31af7Sopenharmony_ci    pname:viewType is ename:VK_IMAGE_VIEW_TYPE_2D or
4826e5c31af7Sopenharmony_ci    ename:VK_IMAGE_VIEW_TYPE_2D_ARRAY then pname:subresourceRange.levelCount
4827e5c31af7Sopenharmony_ci    must: be 1
4828e5c31af7Sopenharmony_ciifndef::VKSC_VERSION_1_0[]
4829e5c31af7Sopenharmony_ci  * [[VUID-VkImageViewCreateInfo-image-04971]]
4830e5c31af7Sopenharmony_ci    If pname:image was created with ename:VK_IMAGE_TYPE_3D and
4831e5c31af7Sopenharmony_ci    pname:viewType is ename:VK_IMAGE_VIEW_TYPE_2D or
4832e5c31af7Sopenharmony_ci    ename:VK_IMAGE_VIEW_TYPE_2D_ARRAY then
4833e5c31af7Sopenharmony_ci    slink:VkImageCreateInfo::pname:flags must: not contain any of
4834e5c31af7Sopenharmony_ci    ename:VK_IMAGE_CREATE_SPARSE_BINDING_BIT,
4835e5c31af7Sopenharmony_ci    ename:VK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT, and
4836e5c31af7Sopenharmony_ci    ename:VK_IMAGE_CREATE_SPARSE_ALIASED_BIT
4837e5c31af7Sopenharmony_ciendif::VKSC_VERSION_1_0[]
4838e5c31af7Sopenharmony_ci  * [[VUID-VkImageViewCreateInfo-image-04972]]
4839e5c31af7Sopenharmony_ci    If pname:image was created with a pname:samples value not equal to
4840e5c31af7Sopenharmony_ci    ename:VK_SAMPLE_COUNT_1_BIT then pname:viewType must: be either
4841e5c31af7Sopenharmony_ci    ename:VK_IMAGE_VIEW_TYPE_2D or ename:VK_IMAGE_VIEW_TYPE_2D_ARRAY
4842e5c31af7Sopenharmony_ciendif::VK_VERSION_1_1,VK_KHR_maintenance1[]
4843e5c31af7Sopenharmony_ci  * [[VUID-VkImageViewCreateInfo-image-04441]]
4844e5c31af7Sopenharmony_ci    pname:image must: have been created with a pname:usage value containing
4845e5c31af7Sopenharmony_ci    at least one of the usages defined in the <<valid-imageview-imageusage,
4846e5c31af7Sopenharmony_ci    valid image usage>> list for image views
4847e5c31af7Sopenharmony_ci  * [[VUID-VkImageViewCreateInfo-None-02273]]
4848e5c31af7Sopenharmony_ci    The <<resources-image-view-format-features,format features>> of the
4849e5c31af7Sopenharmony_ci    resultant image view must: contain at least one bit
4850e5c31af7Sopenharmony_ci  * [[VUID-VkImageViewCreateInfo-usage-02274]]
4851e5c31af7Sopenharmony_ci    If pname:usage contains ename:VK_IMAGE_USAGE_SAMPLED_BIT, then the
4852e5c31af7Sopenharmony_ci    <<resources-image-view-format-features,format features>> of the
4853e5c31af7Sopenharmony_ci    resultant image view must: contain
4854e5c31af7Sopenharmony_ci    ename:VK_FORMAT_FEATURE_SAMPLED_IMAGE_BIT
4855e5c31af7Sopenharmony_ci  * [[VUID-VkImageViewCreateInfo-usage-02275]]
4856e5c31af7Sopenharmony_ci    If pname:usage contains ename:VK_IMAGE_USAGE_STORAGE_BIT, then the image
4857e5c31af7Sopenharmony_ci    view's <<resources-image-view-format-features,format features>> must:
4858e5c31af7Sopenharmony_ci    contain ename:VK_FORMAT_FEATURE_STORAGE_IMAGE_BIT
4859e5c31af7Sopenharmony_ciifndef::VK_NV_linear_color_attachment[]
4860e5c31af7Sopenharmony_ci  * [[VUID-VkImageViewCreateInfo-usage-02276]]
4861e5c31af7Sopenharmony_ci    If pname:usage contains ename:VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT, then
4862e5c31af7Sopenharmony_ci    the image view's <<resources-image-view-format-features,format
4863e5c31af7Sopenharmony_ci    features>> must: contain ename:VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BIT
4864e5c31af7Sopenharmony_ciendif::VK_NV_linear_color_attachment[]
4865e5c31af7Sopenharmony_ciifdef::VK_NV_linear_color_attachment[]
4866e5c31af7Sopenharmony_ci  * [[VUID-VkImageViewCreateInfo-usage-08931]]
4867e5c31af7Sopenharmony_ci    If pname:usage contains ename:VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT, then
4868e5c31af7Sopenharmony_ci    the image view's <<resources-image-view-format-features,format
4869e5c31af7Sopenharmony_ci    features>> must: contain ename:VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BIT or
4870e5c31af7Sopenharmony_ci    ename:VK_FORMAT_FEATURE_2_LINEAR_COLOR_ATTACHMENT_BIT_NV
4871e5c31af7Sopenharmony_ciendif::VK_NV_linear_color_attachment[]
4872e5c31af7Sopenharmony_ci  * [[VUID-VkImageViewCreateInfo-usage-02277]]
4873e5c31af7Sopenharmony_ci    If pname:usage contains
4874e5c31af7Sopenharmony_ci    ename:VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT, then the image view's
4875e5c31af7Sopenharmony_ci    <<resources-image-view-format-features,format features>> must: contain
4876e5c31af7Sopenharmony_ci    ename:VK_FORMAT_FEATURE_DEPTH_STENCIL_ATTACHMENT_BIT
4877e5c31af7Sopenharmony_ciifdef::VK_KHR_video_maintenance1[]
4878e5c31af7Sopenharmony_ciifdef::VK_KHR_video_decode_queue[]
4879e5c31af7Sopenharmony_ci  * [[VUID-VkImageViewCreateInfo-image-08333]]
4880e5c31af7Sopenharmony_ci    If pname:image was created with
4881e5c31af7Sopenharmony_ci    ename:VK_IMAGE_CREATE_VIDEO_PROFILE_INDEPENDENT_BIT_KHR and pname:usage
4882e5c31af7Sopenharmony_ci    contains ename:VK_IMAGE_USAGE_VIDEO_DECODE_DST_BIT_KHR, then the image
4883e5c31af7Sopenharmony_ci    view's <<resources-image-view-format-features,format features>> must:
4884e5c31af7Sopenharmony_ci    contain ename:VK_FORMAT_FEATURE_VIDEO_DECODE_OUTPUT_BIT_KHR
4885e5c31af7Sopenharmony_ci  * [[VUID-VkImageViewCreateInfo-image-08334]]
4886e5c31af7Sopenharmony_ci    If pname:image was created with
4887e5c31af7Sopenharmony_ci    ename:VK_IMAGE_CREATE_VIDEO_PROFILE_INDEPENDENT_BIT_KHR and pname:usage
4888e5c31af7Sopenharmony_ci    contains ename:VK_IMAGE_USAGE_VIDEO_DECODE_DPB_BIT_KHR, then the image
4889e5c31af7Sopenharmony_ci    view's <<resources-image-view-format-features,format features>> must:
4890e5c31af7Sopenharmony_ci    contain ename:VK_FORMAT_FEATURE_VIDEO_DECODE_DPB_BIT_KHR
4891e5c31af7Sopenharmony_ci  * [[VUID-VkImageViewCreateInfo-image-08335]]
4892e5c31af7Sopenharmony_ci    If pname:image was created with
4893e5c31af7Sopenharmony_ci    ename:VK_IMAGE_CREATE_VIDEO_PROFILE_INDEPENDENT_BIT_KHR, then
4894e5c31af7Sopenharmony_ci    pname:usage must: not include
4895e5c31af7Sopenharmony_ci    ename:VK_IMAGE_USAGE_VIDEO_DECODE_SRC_BIT_KHR
4896e5c31af7Sopenharmony_ciendif::VK_KHR_video_decode_queue[]
4897e5c31af7Sopenharmony_ciifdef::VK_KHR_video_encode_queue[]
4898e5c31af7Sopenharmony_ci  * [[VUID-VkImageViewCreateInfo-image-08336]]
4899e5c31af7Sopenharmony_ci    If pname:image was created with
4900e5c31af7Sopenharmony_ci    ename:VK_IMAGE_CREATE_VIDEO_PROFILE_INDEPENDENT_BIT_KHR and pname:usage
4901e5c31af7Sopenharmony_ci    contains ename:VK_IMAGE_USAGE_VIDEO_ENCODE_SRC_BIT_KHR, then the image
4902e5c31af7Sopenharmony_ci    view's <<resources-image-view-format-features,format features>> must:
4903e5c31af7Sopenharmony_ci    contain ename:VK_FORMAT_FEATURE_VIDEO_ENCODE_INPUT_BIT_KHR
4904e5c31af7Sopenharmony_ci  * [[VUID-VkImageViewCreateInfo-image-08337]]
4905e5c31af7Sopenharmony_ci    If pname:image was created with
4906e5c31af7Sopenharmony_ci    ename:VK_IMAGE_CREATE_VIDEO_PROFILE_INDEPENDENT_BIT_KHR and pname:usage
4907e5c31af7Sopenharmony_ci    contains ename:VK_IMAGE_USAGE_VIDEO_ENCODE_DPB_BIT_KHR, then the image
4908e5c31af7Sopenharmony_ci    view's <<resources-image-view-format-features,format features>> must:
4909e5c31af7Sopenharmony_ci    contain ename:VK_FORMAT_FEATURE_VIDEO_ENCODE_DPB_BIT_KHR
4910e5c31af7Sopenharmony_ci  * [[VUID-VkImageViewCreateInfo-image-08338]]
4911e5c31af7Sopenharmony_ci    If pname:image was created with
4912e5c31af7Sopenharmony_ci    ename:VK_IMAGE_CREATE_VIDEO_PROFILE_INDEPENDENT_BIT_KHR, then
4913e5c31af7Sopenharmony_ci    pname:usage must: not include
4914e5c31af7Sopenharmony_ci    ename:VK_IMAGE_USAGE_VIDEO_ENCODE_DST_BIT_KHR
4915e5c31af7Sopenharmony_ciendif::VK_KHR_video_encode_queue[]
4916e5c31af7Sopenharmony_ciendif::VK_KHR_video_maintenance1[]
4917e5c31af7Sopenharmony_ci  * [[VUID-VkImageViewCreateInfo-usage-08932]]
4918e5c31af7Sopenharmony_ci    If pname:usage contains ename:VK_IMAGE_USAGE_INPUT_ATTACHMENT_BIT,
4919e5c31af7Sopenharmony_ciifdef::VK_ANDROID_external_format_resolve[]
4920e5c31af7Sopenharmony_ci    and any of the following is true:
4921e5c31af7Sopenharmony_ci  ** the <<features-externalFormatResolve, pname:externalFormatResolve>>
4922e5c31af7Sopenharmony_ci    feature is not enabled
4923e5c31af7Sopenharmony_ci  ** the <<limits-nullColorAttachmentWithExternalFormatResolve,
4924e5c31af7Sopenharmony_ci     pname:nullColorAttachmentWithExternalFormatResolve>> property is
4925e5c31af7Sopenharmony_ci     ename:VK_FALSE
4926e5c31af7Sopenharmony_ci  ** pname:image was created with an
4927e5c31af7Sopenharmony_ci     slink:VkExternalFormatANDROID::pname:externalFormat value of 0
4928e5c31af7Sopenharmony_ciendif::VK_ANDROID_external_format_resolve[]
4929e5c31af7Sopenharmony_ci
4930e5c31af7Sopenharmony_ci+
4931e5c31af7Sopenharmony_cithen the image view's <<resources-image-view-format-features,format
4932e5c31af7Sopenharmony_ci    features>> must: contain at least one of
4933e5c31af7Sopenharmony_ci    ename:VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BIT or
4934e5c31af7Sopenharmony_ci    ename:VK_FORMAT_FEATURE_DEPTH_STENCIL_ATTACHMENT_BIT
4935e5c31af7Sopenharmony_ciifdef::VK_NV_linear_color_attachment[]
4936e5c31af7Sopenharmony_ci    or ename:VK_FORMAT_FEATURE_2_LINEAR_COLOR_ATTACHMENT_BIT_NV
4937e5c31af7Sopenharmony_ciendif::VK_NV_linear_color_attachment[]
4938e5c31af7Sopenharmony_ci  * [[VUID-VkImageViewCreateInfo-subresourceRange-01478]]
4939e5c31af7Sopenharmony_ci    pname:subresourceRange.baseMipLevel must: be less than the
4940e5c31af7Sopenharmony_ci    pname:mipLevels specified in slink:VkImageCreateInfo when pname:image
4941e5c31af7Sopenharmony_ci    was created
4942e5c31af7Sopenharmony_ci  * [[VUID-VkImageViewCreateInfo-subresourceRange-01718]]
4943e5c31af7Sopenharmony_ci    If pname:subresourceRange.levelCount is not
4944e5c31af7Sopenharmony_ci    ename:VK_REMAINING_MIP_LEVELS, [eq]#pname:subresourceRange.baseMipLevel
4945e5c31af7Sopenharmony_ci    {plus} pname:subresourceRange.levelCount# must: be less than or equal to
4946e5c31af7Sopenharmony_ci    the pname:mipLevels specified in slink:VkImageCreateInfo when
4947e5c31af7Sopenharmony_ci    pname:image was created
4948e5c31af7Sopenharmony_ciifdef::VK_EXT_fragment_density_map[]
4949e5c31af7Sopenharmony_ci  * [[VUID-VkImageViewCreateInfo-image-02571]]
4950e5c31af7Sopenharmony_ci    If pname:image was created with pname:usage containing
4951e5c31af7Sopenharmony_ci    ename:VK_IMAGE_USAGE_FRAGMENT_DENSITY_MAP_BIT_EXT,
4952e5c31af7Sopenharmony_ci    pname:subresourceRange.levelCount must: be `1`
4953e5c31af7Sopenharmony_ciendif::VK_EXT_fragment_density_map[]
4954e5c31af7Sopenharmony_ciifndef::VK_VERSION_1_1,VK_KHR_maintenance1[]
4955e5c31af7Sopenharmony_ci  * [[VUID-VkImageViewCreateInfo-subresourceRange-01480]]
4956e5c31af7Sopenharmony_ci    pname:subresourceRange.baseArrayLayer must: be less than the
4957e5c31af7Sopenharmony_ci    pname:arrayLayers specified in slink:VkImageCreateInfo when pname:image
4958e5c31af7Sopenharmony_ci    was created
4959e5c31af7Sopenharmony_ci  * [[VUID-VkImageViewCreateInfo-subresourceRange-01719]]
4960e5c31af7Sopenharmony_ci    If pname:subresourceRange.layerCount is not
4961e5c31af7Sopenharmony_ci    ename:VK_REMAINING_ARRAY_LAYERS,
4962e5c31af7Sopenharmony_ci    [eq]#pname:subresourceRange.baseArrayLayer {plus}
4963e5c31af7Sopenharmony_ci    pname:subresourceRange.layerCount# must: be less than or equal to the
4964e5c31af7Sopenharmony_ci    pname:arrayLayers specified in slink:VkImageCreateInfo when pname:image
4965e5c31af7Sopenharmony_ci    was created
4966e5c31af7Sopenharmony_ciendif::VK_VERSION_1_1,VK_KHR_maintenance1[]
4967e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_1,VK_KHR_maintenance1[]
4968e5c31af7Sopenharmony_ciifndef::VK_EXT_image_2d_view_of_3d[]
4969e5c31af7Sopenharmony_ci  * [[VUID-VkImageViewCreateInfo-image-01482]]
4970e5c31af7Sopenharmony_ci    If pname:image is not a 3D image created with
4971e5c31af7Sopenharmony_ci    ename:VK_IMAGE_CREATE_2D_ARRAY_COMPATIBLE_BIT set, or pname:viewType is
4972e5c31af7Sopenharmony_ci    not ename:VK_IMAGE_VIEW_TYPE_2D or ename:VK_IMAGE_VIEW_TYPE_2D_ARRAY,
4973e5c31af7Sopenharmony_ci    pname:subresourceRange.baseArrayLayer must: be less than the
4974e5c31af7Sopenharmony_ci    pname:arrayLayers specified in slink:VkImageCreateInfo when pname:image
4975e5c31af7Sopenharmony_ci    was created
4976e5c31af7Sopenharmony_ci  * [[VUID-VkImageViewCreateInfo-subresourceRange-01483]]
4977e5c31af7Sopenharmony_ci    If pname:subresourceRange.layerCount is not
4978e5c31af7Sopenharmony_ci    ename:VK_REMAINING_ARRAY_LAYERS, pname:image is not a 3D image created
4979e5c31af7Sopenharmony_ci    with ename:VK_IMAGE_CREATE_2D_ARRAY_COMPATIBLE_BIT set, or
4980e5c31af7Sopenharmony_ci    pname:viewType is not ename:VK_IMAGE_VIEW_TYPE_2D or
4981e5c31af7Sopenharmony_ci    ename:VK_IMAGE_VIEW_TYPE_2D_ARRAY, pname:subresourceRange.layerCount
4982e5c31af7Sopenharmony_ci    must: be non-zero and [eq]#pname:subresourceRange.baseArrayLayer {plus}
4983e5c31af7Sopenharmony_ci    pname:subresourceRange.layerCount# must: be less than or equal to the
4984e5c31af7Sopenharmony_ci    pname:arrayLayers specified in slink:VkImageCreateInfo when pname:image
4985e5c31af7Sopenharmony_ci    was created
4986e5c31af7Sopenharmony_ciendif::VK_EXT_image_2d_view_of_3d[]
4987e5c31af7Sopenharmony_ciifdef::VK_EXT_image_2d_view_of_3d[]
4988e5c31af7Sopenharmony_ci  * [[VUID-VkImageViewCreateInfo-image-06724]]
4989e5c31af7Sopenharmony_ci    If pname:image is not a 3D image created with
4990e5c31af7Sopenharmony_ci    ename:VK_IMAGE_CREATE_2D_ARRAY_COMPATIBLE_BIT or
4991e5c31af7Sopenharmony_ci    ename:VK_IMAGE_CREATE_2D_VIEW_COMPATIBLE_BIT_EXT set, or pname:viewType
4992e5c31af7Sopenharmony_ci    is not ename:VK_IMAGE_VIEW_TYPE_2D or ename:VK_IMAGE_VIEW_TYPE_2D_ARRAY,
4993e5c31af7Sopenharmony_ci    pname:subresourceRange.baseArrayLayer must: be less than the
4994e5c31af7Sopenharmony_ci    pname:arrayLayers specified in slink:VkImageCreateInfo when pname:image
4995e5c31af7Sopenharmony_ci    was created
4996e5c31af7Sopenharmony_ci  * [[VUID-VkImageViewCreateInfo-subresourceRange-06725]]
4997e5c31af7Sopenharmony_ci    If pname:subresourceRange.layerCount is not
4998e5c31af7Sopenharmony_ci    ename:VK_REMAINING_ARRAY_LAYERS, pname:image is not a 3D image created
4999e5c31af7Sopenharmony_ci    with ename:VK_IMAGE_CREATE_2D_ARRAY_COMPATIBLE_BIT or
5000e5c31af7Sopenharmony_ci    ename:VK_IMAGE_CREATE_2D_VIEW_COMPATIBLE_BIT_EXT set, or pname:viewType
5001e5c31af7Sopenharmony_ci    is not ename:VK_IMAGE_VIEW_TYPE_2D or ename:VK_IMAGE_VIEW_TYPE_2D_ARRAY,
5002e5c31af7Sopenharmony_ci    pname:subresourceRange.layerCount must: be non-zero and
5003e5c31af7Sopenharmony_ci    [eq]#pname:subresourceRange.baseArrayLayer {plus}
5004e5c31af7Sopenharmony_ci    pname:subresourceRange.layerCount# must: be less than or equal to the
5005e5c31af7Sopenharmony_ci    pname:arrayLayers specified in slink:VkImageCreateInfo when pname:image
5006e5c31af7Sopenharmony_ci    was created
5007e5c31af7Sopenharmony_ciendif::VK_EXT_image_2d_view_of_3d[]
5008e5c31af7Sopenharmony_ci  * [[VUID-VkImageViewCreateInfo-image-02724]]
5009e5c31af7Sopenharmony_ci    If pname:image is a 3D image created with
5010e5c31af7Sopenharmony_ci    ename:VK_IMAGE_CREATE_2D_ARRAY_COMPATIBLE_BIT set, and pname:viewType is
5011e5c31af7Sopenharmony_ci    ename:VK_IMAGE_VIEW_TYPE_2D or ename:VK_IMAGE_VIEW_TYPE_2D_ARRAY,
5012e5c31af7Sopenharmony_ci    pname:subresourceRange.baseArrayLayer must: be less than the depth
5013e5c31af7Sopenharmony_ci    computed from pname:baseMipLevel and pname:extent.depth specified in
5014e5c31af7Sopenharmony_ci    slink:VkImageCreateInfo when pname:image was created, according to the
5015e5c31af7Sopenharmony_ci    formula defined in <<resources-image-mip-level-sizing,Image Mip Level
5016e5c31af7Sopenharmony_ci    Sizing>>
5017e5c31af7Sopenharmony_ci  * [[VUID-VkImageViewCreateInfo-subresourceRange-02725]]
5018e5c31af7Sopenharmony_ci    If pname:subresourceRange.layerCount is not
5019e5c31af7Sopenharmony_ci    ename:VK_REMAINING_ARRAY_LAYERS, pname:image is a 3D image created with
5020e5c31af7Sopenharmony_ci    ename:VK_IMAGE_CREATE_2D_ARRAY_COMPATIBLE_BIT set, and pname:viewType is
5021e5c31af7Sopenharmony_ci    ename:VK_IMAGE_VIEW_TYPE_2D or ename:VK_IMAGE_VIEW_TYPE_2D_ARRAY,
5022e5c31af7Sopenharmony_ci    pname:subresourceRange.layerCount must: be non-zero and
5023e5c31af7Sopenharmony_ci    [eq]#pname:subresourceRange.baseArrayLayer {plus}
5024e5c31af7Sopenharmony_ci    pname:subresourceRange.layerCount# must: be less than or equal to the
5025e5c31af7Sopenharmony_ci    depth computed from pname:baseMipLevel and pname:extent.depth specified
5026e5c31af7Sopenharmony_ci    in slink:VkImageCreateInfo when pname:image was created, according to
5027e5c31af7Sopenharmony_ci    the formula defined in <<resources-image-mip-level-sizing,Image Mip
5028e5c31af7Sopenharmony_ci    Level Sizing>>
5029e5c31af7Sopenharmony_ciendif::VK_VERSION_1_1,VK_KHR_maintenance1[]
5030e5c31af7Sopenharmony_ci// The VU below comes in 4 alternate versions
5031e5c31af7Sopenharmony_ci// both disabled, both enabled, maintenance2 only, ycbcr only
5032e5c31af7Sopenharmony_ciifndef::VK_VERSION_1_1,VK_KHR_maintenance2[]
5033e5c31af7Sopenharmony_ciifndef::VK_VERSION_1_1,VK_KHR_sampler_ycbcr_conversion[]
5034e5c31af7Sopenharmony_ci  * [[VUID-VkImageViewCreateInfo-image-01018]]
5035e5c31af7Sopenharmony_ci    If pname:image was created with the
5036e5c31af7Sopenharmony_ci    ename:VK_IMAGE_CREATE_MUTABLE_FORMAT_BIT flag, pname:format must: be
5037e5c31af7Sopenharmony_ci    compatible with the pname:format used to create pname:image, as defined
5038e5c31af7Sopenharmony_ci    in <<formats-compatibility-classes,Format Compatibility Classes>>
5039e5c31af7Sopenharmony_ciendif::VK_VERSION_1_1,VK_KHR_sampler_ycbcr_conversion[]
5040e5c31af7Sopenharmony_ciendif::VK_VERSION_1_1,VK_KHR_maintenance2[]
5041e5c31af7Sopenharmony_ci// The nested ifdefs are there in anticipation of the hoped-for day when the
5042e5c31af7Sopenharmony_ci// VU extractor and validation layers can handle VU with imbedded
5043e5c31af7Sopenharmony_ci// conditionals. They are commented out until then.
5044e5c31af7Sopenharmony_ci//
5045e5c31af7Sopenharmony_ci// If VK_VERSION_1_1,VK_KHR_maintenance2 and NOT VK_VERSION_1_1,VK_KHR_sampler_ycbcr_conversion
5046e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_1,VK_KHR_maintenance2[]
5047e5c31af7Sopenharmony_ciifndef::VK_VERSION_1_1,VK_KHR_sampler_ycbcr_conversion[]
5048e5c31af7Sopenharmony_ci  * [[VUID-VkImageViewCreateInfo-image-01759]]
5049e5c31af7Sopenharmony_ci    If pname:image was created with the
5050e5c31af7Sopenharmony_ci    ename:VK_IMAGE_CREATE_MUTABLE_FORMAT_BIT flag, but without the
5051e5c31af7Sopenharmony_ci    ename:VK_IMAGE_CREATE_BLOCK_TEXEL_VIEW_COMPATIBLE_BIT flag, pname:format
5052e5c31af7Sopenharmony_ci    must: be compatible with the pname:format used to create pname:image, as
5053e5c31af7Sopenharmony_ci    defined in <<formats-compatibility-classes,Format Compatibility
5054e5c31af7Sopenharmony_ci    Classes>>
5055e5c31af7Sopenharmony_ciendif::VK_VERSION_1_1,VK_KHR_sampler_ycbcr_conversion[]
5056e5c31af7Sopenharmony_ciendif::VK_VERSION_1_1,VK_KHR_maintenance2[]
5057e5c31af7Sopenharmony_ci// If NOT VK_VERSION_1_1,VK_KHR_maintenance2 and VK_VERSION_1_1,VK_KHR_sampler_ycbcr_conversion
5058e5c31af7Sopenharmony_ciifndef::VK_VERSION_1_1,VK_KHR_maintenance2[]
5059e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_1,VK_KHR_sampler_ycbcr_conversion[]
5060e5c31af7Sopenharmony_ci  * [[VUID-VkImageViewCreateInfo-image-01760]]
5061e5c31af7Sopenharmony_ci    If pname:image was created with the
5062e5c31af7Sopenharmony_ci    ename:VK_IMAGE_CREATE_MUTABLE_FORMAT_BIT flag, and if the pname:format
5063e5c31af7Sopenharmony_ci    of the pname:image is not a
5064e5c31af7Sopenharmony_ci    <<formats-requiring-sampler-ycbcr-conversion,multi-planar>> format,
5065e5c31af7Sopenharmony_ci    pname:format must: be compatible with the pname:format used to create
5066e5c31af7Sopenharmony_ci    pname:image, as defined in <<formats-compatibility-classes,Format
5067e5c31af7Sopenharmony_ci    Compatibility Classes>>
5068e5c31af7Sopenharmony_ciendif::VK_VERSION_1_1,VK_KHR_sampler_ycbcr_conversion[]
5069e5c31af7Sopenharmony_ciendif::VK_VERSION_1_1,VK_KHR_maintenance2[]
5070e5c31af7Sopenharmony_ci// If VK_VERSION_1_1,VK_KHR_maintenance2 and VK_VERSION_1_1,VK_KHR_sampler_ycbcr_conversion
5071e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_1,VK_KHR_maintenance2[]
5072e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_1,VK_KHR_sampler_ycbcr_conversion[]
5073e5c31af7Sopenharmony_ci  * [[VUID-VkImageViewCreateInfo-image-01761]]
5074e5c31af7Sopenharmony_ci    If pname:image was created with the
5075e5c31af7Sopenharmony_ci    ename:VK_IMAGE_CREATE_MUTABLE_FORMAT_BIT flag,
5076e5c31af7Sopenharmony_ci// ifdef::VK_VERSION_1_1,VK_KHR_maintenance2[]
5077e5c31af7Sopenharmony_ci    but without the ename:VK_IMAGE_CREATE_BLOCK_TEXEL_VIEW_COMPATIBLE_BIT
5078e5c31af7Sopenharmony_ci    flag,
5079e5c31af7Sopenharmony_ci// endif::VK_VERSION_1_1,VK_KHR_maintenance2[]
5080e5c31af7Sopenharmony_ci// ifdef::VK_VERSION_1_1,VK_KHR_sampler_ycbcr_conversion[]
5081e5c31af7Sopenharmony_ci    and if the pname:format of the pname:image is not a
5082e5c31af7Sopenharmony_ci    <<formats-requiring-sampler-ycbcr-conversion,multi-planar>> format,
5083e5c31af7Sopenharmony_ci// endif::VK_VERSION_1_1,VK_KHR_sampler_ycbcr_conversion[]
5084e5c31af7Sopenharmony_ci    pname:format must: be compatible with the pname:format used to create
5085e5c31af7Sopenharmony_ci    pname:image, as defined in <<formats-compatibility-classes,Format
5086e5c31af7Sopenharmony_ci    Compatibility Classes>>
5087e5c31af7Sopenharmony_ciendif::VK_VERSION_1_1,VK_KHR_sampler_ycbcr_conversion[]
5088e5c31af7Sopenharmony_ciendif::VK_VERSION_1_1,VK_KHR_maintenance2[]
5089e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_1,VK_KHR_maintenance2[]
5090e5c31af7Sopenharmony_ci  * [[VUID-VkImageViewCreateInfo-image-01583]]
5091e5c31af7Sopenharmony_ci    If pname:image was created with the
5092e5c31af7Sopenharmony_ci    ename:VK_IMAGE_CREATE_BLOCK_TEXEL_VIEW_COMPATIBLE_BIT flag, pname:format
5093e5c31af7Sopenharmony_ci    must: be compatible with, or must: be an uncompressed format that is
5094e5c31af7Sopenharmony_ci    size-compatible with, the pname:format used to create pname:image
5095e5c31af7Sopenharmony_ci  * [[VUID-VkImageViewCreateInfo-image-07072]]
5096e5c31af7Sopenharmony_ci    If pname:image was created with the
5097e5c31af7Sopenharmony_ci    ename:VK_IMAGE_CREATE_BLOCK_TEXEL_VIEW_COMPATIBLE_BIT flag and
5098e5c31af7Sopenharmony_ci    pname:format is a non-compressed format, the pname:levelCount member of
5099e5c31af7Sopenharmony_ci    pname:subresourceRange must: be `1`
5100e5c31af7Sopenharmony_ci  * [[VUID-VkImageViewCreateInfo-image-09487]]
5101e5c31af7Sopenharmony_ci    If pname:image was created with the
5102e5c31af7Sopenharmony_ci    ename:VK_IMAGE_CREATE_BLOCK_TEXEL_VIEW_COMPATIBLE_BIT flag,
5103e5c31af7Sopenharmony_ciifdef::VK_KHR_maintenance6[]
5104e5c31af7Sopenharmony_ci    the
5105e5c31af7Sopenharmony_ci    sname:VkPhysicalDeviceMaintenance6PropertiesKHR::pname:blockTexelViewCompatibleMultipleLayers
5106e5c31af7Sopenharmony_ci    property is not set to ename:VK_TRUE,
5107e5c31af7Sopenharmony_ciendif::VK_KHR_maintenance6[]
5108e5c31af7Sopenharmony_ci    and pname:format is a non-compressed format, then the pname:layerCount
5109e5c31af7Sopenharmony_ci    member of pname:subresourceRange must: be `1`
5110e5c31af7Sopenharmony_ciendif::VK_VERSION_1_1,VK_KHR_maintenance2[]
5111e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_2,VK_KHR_image_format_list[]
5112e5c31af7Sopenharmony_ci  * [[VUID-VkImageViewCreateInfo-pNext-01585]]
5113e5c31af7Sopenharmony_ci    If a slink:VkImageFormatListCreateInfo structure was included in the
5114e5c31af7Sopenharmony_ci    pname:pNext chain of the slink:VkImageCreateInfo structure used when
5115e5c31af7Sopenharmony_ci    creating pname:image and
5116e5c31af7Sopenharmony_ci    slink:VkImageFormatListCreateInfo::pname:viewFormatCount is not zero
5117e5c31af7Sopenharmony_ci    then pname:format must: be one of the formats in
5118e5c31af7Sopenharmony_ci    slink:VkImageFormatListCreateInfo::pname:pViewFormats
5119e5c31af7Sopenharmony_ciendif::VK_VERSION_1_2,VK_KHR_image_format_list[]
5120e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_1,VK_KHR_sampler_ycbcr_conversion[]
5121e5c31af7Sopenharmony_ci  * [[VUID-VkImageViewCreateInfo-image-01586]]
5122e5c31af7Sopenharmony_ci    If pname:image was created with the
5123e5c31af7Sopenharmony_ci    ename:VK_IMAGE_CREATE_MUTABLE_FORMAT_BIT flag, if the pname:format of
5124e5c31af7Sopenharmony_ci    the pname:image is a
5125e5c31af7Sopenharmony_ci    <<formats-requiring-sampler-ycbcr-conversion,multi-planar>> format, and
5126e5c31af7Sopenharmony_ci    if pname:subresourceRange.aspectMask is one of the
5127e5c31af7Sopenharmony_ci    <<formats-planes-image-aspect,multi-planar aspect mask>> bits, then
5128e5c31af7Sopenharmony_ci    pname:format must: be compatible with the elink:VkFormat for the plane
5129e5c31af7Sopenharmony_ci    of the pname:image pname:format indicated by
5130e5c31af7Sopenharmony_ci    pname:subresourceRange.aspectMask, as defined in
5131e5c31af7Sopenharmony_ci    <<formats-compatible-planes>>
5132e5c31af7Sopenharmony_ci  * [[VUID-VkImageViewCreateInfo-subresourceRange-07818]]
5133e5c31af7Sopenharmony_ci    pname:subresourceRange.aspectMask must: only have at most 1 valid
5134e5c31af7Sopenharmony_ci    <<formats-planes-image-aspect,multi-planar aspect mask>> bit
5135e5c31af7Sopenharmony_ciendif::VK_VERSION_1_1,VK_KHR_sampler_ycbcr_conversion[]
5136e5c31af7Sopenharmony_ciifndef::VK_VERSION_1_1,VK_KHR_sampler_ycbcr_conversion[]
5137e5c31af7Sopenharmony_ci// The VU below comes in an alternate version when the extension is
5138e5c31af7Sopenharmony_ci// enabled.
5139e5c31af7Sopenharmony_ci  * [[VUID-VkImageViewCreateInfo-image-01019]]
5140e5c31af7Sopenharmony_ci    If pname:image was not created with the
5141e5c31af7Sopenharmony_ci    ename:VK_IMAGE_CREATE_MUTABLE_FORMAT_BIT flag, pname:format must: be
5142e5c31af7Sopenharmony_ci    identical to the pname:format used to create pname:image
5143e5c31af7Sopenharmony_ciendif::VK_VERSION_1_1,VK_KHR_sampler_ycbcr_conversion[]
5144e5c31af7Sopenharmony_ci// The nested ifdefs are there in anticipation of the hoped-for day when the
5145e5c31af7Sopenharmony_ci// VU extractor and validation layers can handle VU with imbedded
5146e5c31af7Sopenharmony_ci// conditionals. They are commented out until then.
5147e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_1,VK_KHR_sampler_ycbcr_conversion[]
5148e5c31af7Sopenharmony_ci  * [[VUID-VkImageViewCreateInfo-image-01762]]
5149e5c31af7Sopenharmony_ci    If pname:image was not created with the
5150e5c31af7Sopenharmony_ci    ename:VK_IMAGE_CREATE_MUTABLE_FORMAT_BIT flag,
5151e5c31af7Sopenharmony_ci// ifdef::VK_VERSION_1_1,VK_KHR_sampler_ycbcr_conversion[]
5152e5c31af7Sopenharmony_ci    or if the pname:format of the pname:image is a
5153e5c31af7Sopenharmony_ci    <<formats-requiring-sampler-ycbcr-conversion,multi-planar>> format and
5154e5c31af7Sopenharmony_ci    if pname:subresourceRange.aspectMask is ename:VK_IMAGE_ASPECT_COLOR_BIT,
5155e5c31af7Sopenharmony_ci// endif::VK_VERSION_1_1,VK_KHR_sampler_ycbcr_conversion[]
5156e5c31af7Sopenharmony_ci    pname:format must: be identical to the pname:format used to create
5157e5c31af7Sopenharmony_ci    pname:image
5158e5c31af7Sopenharmony_ciendif::VK_VERSION_1_1,VK_KHR_sampler_ycbcr_conversion[]
5159e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_1,VK_KHR_sampler_ycbcr_conversion[]
5160e5c31af7Sopenharmony_ci  * [[VUID-VkImageViewCreateInfo-format-06415]]
5161e5c31af7Sopenharmony_ci    If the image view <<image-views-requiring-sampler-ycbcr-conversion,
5162e5c31af7Sopenharmony_ci    requires a sampler {YCbCr} conversion>> and pname:usage contains
5163e5c31af7Sopenharmony_ci    ename:VK_IMAGE_USAGE_SAMPLED_BIT, then the pname:pNext chain must:
5164e5c31af7Sopenharmony_ci    include a slink:VkSamplerYcbcrConversionInfo structure with a conversion
5165e5c31af7Sopenharmony_ci    value other than dlink:VK_NULL_HANDLE
5166e5c31af7Sopenharmony_ci  * [[VUID-VkImageViewCreateInfo-format-04714]]
5167e5c31af7Sopenharmony_ci    If pname:format has a code:_422 or code:_420 suffix then pname:image
5168e5c31af7Sopenharmony_ci    must: have been created with a width that is a multiple of 2
5169e5c31af7Sopenharmony_ci  * [[VUID-VkImageViewCreateInfo-format-04715]]
5170e5c31af7Sopenharmony_ci    If pname:format has a code:_420 suffix then pname:image must: have been
5171e5c31af7Sopenharmony_ci    created with a height that is a multiple of 2
5172e5c31af7Sopenharmony_ci  * [[VUID-VkImageViewCreateInfo-pNext-01970]]
5173e5c31af7Sopenharmony_ci    If the pname:pNext chain includes a slink:VkSamplerYcbcrConversionInfo
5174e5c31af7Sopenharmony_ci    structure with a pname:conversion value other than dlink:VK_NULL_HANDLE,
5175e5c31af7Sopenharmony_ci    all members of pname:components must: have the
5176e5c31af7Sopenharmony_ci    <<resources-image-views-identity-mappings,identity swizzle>>
5177e5c31af7Sopenharmony_ci  * [[VUID-VkImageViewCreateInfo-pNext-06658]]
5178e5c31af7Sopenharmony_ci    If the pname:pNext chain includes a slink:VkSamplerYcbcrConversionInfo
5179e5c31af7Sopenharmony_ci    structure with a pname:conversion value other than dlink:VK_NULL_HANDLE,
5180e5c31af7Sopenharmony_ci    pname:format must: be the same used in
5181e5c31af7Sopenharmony_ci    slink:VkSamplerYcbcrConversionCreateInfo::pname:format
5182e5c31af7Sopenharmony_ciendif::VK_VERSION_1_1,VK_KHR_sampler_ycbcr_conversion[]
5183e5c31af7Sopenharmony_ci  * [[VUID-VkImageViewCreateInfo-image-01020]]
5184e5c31af7Sopenharmony_ci    If pname:image is non-sparse then it must: be bound completely and
5185e5c31af7Sopenharmony_ci    contiguously to a single sname:VkDeviceMemory object
5186e5c31af7Sopenharmony_ci  * [[VUID-VkImageViewCreateInfo-subResourceRange-01021]]
5187e5c31af7Sopenharmony_ci    pname:viewType must: be compatible with the type of pname:image as shown
5188e5c31af7Sopenharmony_ci    in the <<resources-image-views-compatibility,view type compatibility
5189e5c31af7Sopenharmony_ci    table>>
5190e5c31af7Sopenharmony_ciifdef::VK_ANDROID_external_memory_android_hardware_buffer[]
5191e5c31af7Sopenharmony_ci  * [[VUID-VkImageViewCreateInfo-image-02399]]
5192e5c31af7Sopenharmony_ci    If pname:image has an
5193e5c31af7Sopenharmony_ci    <<memory-external-android-hardware-buffer-external-formats,Android
5194e5c31af7Sopenharmony_ci    external format>>, pname:format must: be ename:VK_FORMAT_UNDEFINED
5195e5c31af7Sopenharmony_ci  * [[VUID-VkImageViewCreateInfo-image-02400]]
5196e5c31af7Sopenharmony_ci    If pname:image has an
5197e5c31af7Sopenharmony_ci    <<memory-external-android-hardware-buffer-external-formats,Android
5198e5c31af7Sopenharmony_ci    external format>>, the pname:pNext chain must: include a
5199e5c31af7Sopenharmony_ci    slink:VkSamplerYcbcrConversionInfo structure with a pname:conversion
5200e5c31af7Sopenharmony_ci    object created with the same external format as pname:image
5201e5c31af7Sopenharmony_ci  * [[VUID-VkImageViewCreateInfo-image-02401]]
5202e5c31af7Sopenharmony_ci    If pname:image has an
5203e5c31af7Sopenharmony_ci    <<memory-external-android-hardware-buffer-external-formats,Android
5204e5c31af7Sopenharmony_ci    external format>>, all members of pname:components must: be the
5205e5c31af7Sopenharmony_ci    <<resources-image-views-identity-mappings,identity swizzle>>
5206e5c31af7Sopenharmony_ciendif::VK_ANDROID_external_memory_android_hardware_buffer[]
5207e5c31af7Sopenharmony_ciifdef::VK_QNX_external_memory_screen_buffer[]
5208e5c31af7Sopenharmony_ci  * [[VUID-VkImageViewCreateInfo-image-08957]]
5209e5c31af7Sopenharmony_ci    If pname:image has an
5210e5c31af7Sopenharmony_ci    <<memory-external-screen-buffer-external-formats,QNX Screen external
5211e5c31af7Sopenharmony_ci    format>>, pname:format must: be ename:VK_FORMAT_UNDEFINED
5212e5c31af7Sopenharmony_ci  * [[VUID-VkImageViewCreateInfo-image-08958]]
5213e5c31af7Sopenharmony_ci    If pname:image has an
5214e5c31af7Sopenharmony_ci    <<memory-external-screen-buffer-external-formats,QNX Screen external
5215e5c31af7Sopenharmony_ci    format>>, the pname:pNext chain must: include a
5216e5c31af7Sopenharmony_ci    slink:VkSamplerYcbcrConversionInfo structure with a pname:conversion
5217e5c31af7Sopenharmony_ci    object created with the same external format as pname:image
5218e5c31af7Sopenharmony_ci  * [[VUID-VkImageViewCreateInfo-image-08959]]
5219e5c31af7Sopenharmony_ci    If pname:image has an
5220e5c31af7Sopenharmony_ci    <<memory-external-screen-buffer-external-formats,QNX Screen external
5221e5c31af7Sopenharmony_ci    format>>, all members of pname:components must: be the
5222e5c31af7Sopenharmony_ci    <<resources-image-views-identity-mappings,identity swizzle>>
5223e5c31af7Sopenharmony_ciendif::VK_QNX_external_memory_screen_buffer[]
5224e5c31af7Sopenharmony_ciifdef::VK_KHR_fragment_shading_rate,VK_NV_shading_rate_image[]
5225e5c31af7Sopenharmony_ci  * [[VUID-VkImageViewCreateInfo-image-02086]]
5226e5c31af7Sopenharmony_ci    If pname:image was created with pname:usage containing
5227e5c31af7Sopenharmony_ci    ename:VK_IMAGE_USAGE_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR,
5228e5c31af7Sopenharmony_ci    pname:viewType must: be ename:VK_IMAGE_VIEW_TYPE_2D or
5229e5c31af7Sopenharmony_ci    ename:VK_IMAGE_VIEW_TYPE_2D_ARRAY
5230e5c31af7Sopenharmony_ciendif::VK_KHR_fragment_shading_rate,VK_NV_shading_rate_image[]
5231e5c31af7Sopenharmony_ciifdef::VK_NV_shading_rate_image[]
5232e5c31af7Sopenharmony_ci  * [[VUID-VkImageViewCreateInfo-image-02087]]
5233e5c31af7Sopenharmony_ci    If the <<features-shadingRateImage, pname:shadingRateImage>> feature is
5234e5c31af7Sopenharmony_ci    enabled, and If pname:image was created with pname:usage containing
5235e5c31af7Sopenharmony_ci    ename:VK_IMAGE_USAGE_SHADING_RATE_IMAGE_BIT_NV, pname:format must: be
5236e5c31af7Sopenharmony_ci    ename:VK_FORMAT_R8_UINT
5237e5c31af7Sopenharmony_ciendif::VK_NV_shading_rate_image[]
5238e5c31af7Sopenharmony_ciifdef::VK_KHR_fragment_shading_rate[]
5239e5c31af7Sopenharmony_ci  * [[VUID-VkImageViewCreateInfo-usage-04550]]
5240e5c31af7Sopenharmony_ci    If the <<features-attachmentFragmentShadingRate,
5241e5c31af7Sopenharmony_ci    pname:attachmentFragmentShadingRate>> feature is enabled, and the
5242e5c31af7Sopenharmony_ci    pname:usage for the image view includes
5243e5c31af7Sopenharmony_ci    ename:VK_IMAGE_USAGE_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR, then the
5244e5c31af7Sopenharmony_ci    image view's <<resources-image-view-format-features,format features>>
5245e5c31af7Sopenharmony_ci    must: contain
5246e5c31af7Sopenharmony_ci    ename:VK_FORMAT_FEATURE_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR
5247e5c31af7Sopenharmony_ci  * [[VUID-VkImageViewCreateInfo-usage-04551]]
5248e5c31af7Sopenharmony_ci    If the <<features-attachmentFragmentShadingRate,
5249e5c31af7Sopenharmony_ci    pname:attachmentFragmentShadingRate>> feature is enabled, the
5250e5c31af7Sopenharmony_ci    pname:usage for the image view includes
5251e5c31af7Sopenharmony_ci    ename:VK_IMAGE_USAGE_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR, and
5252e5c31af7Sopenharmony_ci    <<limits-layeredShadingRateAttachments,
5253e5c31af7Sopenharmony_ci    pname:layeredShadingRateAttachments>> is ename:VK_FALSE,
5254e5c31af7Sopenharmony_ci    pname:subresourceRange.layerCount must: be `1`
5255e5c31af7Sopenharmony_ciendif::VK_KHR_fragment_shading_rate[]
5256e5c31af7Sopenharmony_ciifdef::VK_EXT_fragment_density_map[]
5257e5c31af7Sopenharmony_ci  * [[VUID-VkImageViewCreateInfo-flags-02572]]
5258e5c31af7Sopenharmony_ci    If the <<features-fragmentDensityMapDynamic,
5259e5c31af7Sopenharmony_ci    pname:fragmentDensityMapDynamic>> feature is not enabled, pname:flags
5260e5c31af7Sopenharmony_ci    must: not contain
5261e5c31af7Sopenharmony_ci    ename:VK_IMAGE_VIEW_CREATE_FRAGMENT_DENSITY_MAP_DYNAMIC_BIT_EXT
5262e5c31af7Sopenharmony_ciifdef::VK_EXT_fragment_density_map2[]
5263e5c31af7Sopenharmony_ci  * [[VUID-VkImageViewCreateInfo-flags-03567]]
5264e5c31af7Sopenharmony_ci    If the <<features-fragmentDensityMapDeferred,
5265e5c31af7Sopenharmony_ci    pname:fragmentDensityMapDeferred>> feature is not enabled, pname:flags
5266e5c31af7Sopenharmony_ci    must: not contain
5267e5c31af7Sopenharmony_ci    ename:VK_IMAGE_VIEW_CREATE_FRAGMENT_DENSITY_MAP_DEFERRED_BIT_EXT
5268e5c31af7Sopenharmony_ci  * [[VUID-VkImageViewCreateInfo-flags-03568]]
5269e5c31af7Sopenharmony_ci    If pname:flags contains
5270e5c31af7Sopenharmony_ci    ename:VK_IMAGE_VIEW_CREATE_FRAGMENT_DENSITY_MAP_DEFERRED_BIT_EXT,
5271e5c31af7Sopenharmony_ci    pname:flags must: not contain
5272e5c31af7Sopenharmony_ci    ename:VK_IMAGE_VIEW_CREATE_FRAGMENT_DENSITY_MAP_DYNAMIC_BIT_EXT
5273e5c31af7Sopenharmony_ci  * [[VUID-VkImageViewCreateInfo-image-03569]]
5274e5c31af7Sopenharmony_ci    If pname:image was created with pname:flags containing
5275e5c31af7Sopenharmony_ci    ename:VK_IMAGE_CREATE_SUBSAMPLED_BIT_EXT and pname:usage containing
5276e5c31af7Sopenharmony_ci    ename:VK_IMAGE_USAGE_SAMPLED_BIT, pname:subresourceRange.layerCount
5277e5c31af7Sopenharmony_ci    must: be less than or equal to <<limits-maxSubsampledArrayLayers,
5278e5c31af7Sopenharmony_ci    sname:VkPhysicalDeviceFragmentDensityMap2PropertiesEXT::pname:maxSubsampledArrayLayers>>
5279e5c31af7Sopenharmony_ciendif::VK_EXT_fragment_density_map2[]
5280e5c31af7Sopenharmony_ciifdef::VK_HUAWEI_invocation_mask[]
5281e5c31af7Sopenharmony_ci  * [[VUID-VkImageViewCreateInfo-invocationMask-04993]]
5282e5c31af7Sopenharmony_ci    If the <<features-invocationMask, pname:invocationMask>> feature is
5283e5c31af7Sopenharmony_ci    enabled, and if pname:image was created with pname:usage containing
5284e5c31af7Sopenharmony_ci    ename:VK_IMAGE_USAGE_INVOCATION_MASK_BIT_HUAWEI, pname:format must: be
5285e5c31af7Sopenharmony_ci    ename:VK_FORMAT_R8_UINT
5286e5c31af7Sopenharmony_ciendif::VK_HUAWEI_invocation_mask[]
5287e5c31af7Sopenharmony_ci  * [[VUID-VkImageViewCreateInfo-flags-04116]]
5288e5c31af7Sopenharmony_ci    If pname:flags does not contain
5289e5c31af7Sopenharmony_ci    ename:VK_IMAGE_VIEW_CREATE_FRAGMENT_DENSITY_MAP_DYNAMIC_BIT_EXT and
5290e5c31af7Sopenharmony_ci    pname:image was created with pname:usage containing
5291e5c31af7Sopenharmony_ci    ename:VK_IMAGE_USAGE_FRAGMENT_DENSITY_MAP_BIT_EXT, its pname:flags must:
5292e5c31af7Sopenharmony_ci    not contain any of ename:VK_IMAGE_CREATE_PROTECTED_BIT,
5293e5c31af7Sopenharmony_ci    ename:VK_IMAGE_CREATE_SPARSE_BINDING_BIT,
5294e5c31af7Sopenharmony_ci    ename:VK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT, or
5295e5c31af7Sopenharmony_ci    ename:VK_IMAGE_CREATE_SPARSE_ALIASED_BIT
5296e5c31af7Sopenharmony_ciendif::VK_EXT_fragment_density_map[]
5297e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_1,VK_KHR_maintenance2[]
5298e5c31af7Sopenharmony_ciifndef::VK_VERSION_1_2,VK_EXT_separate_stencil_usage[]
5299e5c31af7Sopenharmony_ci  * [[VUID-VkImageViewCreateInfo-pNext-02661]]
5300e5c31af7Sopenharmony_ci    If the pname:pNext chain includes a slink:VkImageViewUsageCreateInfo
5301e5c31af7Sopenharmony_ci    structure, its pname:usage member must: not include any bits that were
5302e5c31af7Sopenharmony_ci    not set in the pname:usage member of the slink:VkImageCreateInfo
5303e5c31af7Sopenharmony_ci    structure used to create pname:image
5304e5c31af7Sopenharmony_ciendif::VK_VERSION_1_2,VK_EXT_separate_stencil_usage[]
5305e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_2,VK_EXT_separate_stencil_usage[]
5306e5c31af7Sopenharmony_ci  * [[VUID-VkImageViewCreateInfo-pNext-02662]]
5307e5c31af7Sopenharmony_ci    If the pname:pNext chain includes a slink:VkImageViewUsageCreateInfo
5308e5c31af7Sopenharmony_ci    structure, and pname:image was not created with a
5309e5c31af7Sopenharmony_ci    slink:VkImageStencilUsageCreateInfo structure included in the
5310e5c31af7Sopenharmony_ci    pname:pNext chain of slink:VkImageCreateInfo, its pname:usage member
5311e5c31af7Sopenharmony_ci    must: not include any bits that were not set in the pname:usage member
5312e5c31af7Sopenharmony_ci    of the slink:VkImageCreateInfo structure used to create pname:image
5313e5c31af7Sopenharmony_ci  * [[VUID-VkImageViewCreateInfo-pNext-02663]]
5314e5c31af7Sopenharmony_ci    If the pname:pNext chain includes a slink:VkImageViewUsageCreateInfo
5315e5c31af7Sopenharmony_ci    structure, pname:image was created with a
5316e5c31af7Sopenharmony_ci    slink:VkImageStencilUsageCreateInfo structure included in the
5317e5c31af7Sopenharmony_ci    pname:pNext chain of slink:VkImageCreateInfo, and
5318e5c31af7Sopenharmony_ci    pname:subresourceRange.aspectMask includes
5319e5c31af7Sopenharmony_ci    ename:VK_IMAGE_ASPECT_STENCIL_BIT, the pname:usage member of the
5320e5c31af7Sopenharmony_ci    slink:VkImageViewUsageCreateInfo structure must: not include any bits
5321e5c31af7Sopenharmony_ci    that were not set in the pname:usage member of the
5322e5c31af7Sopenharmony_ci    slink:VkImageStencilUsageCreateInfo structure used to create pname:image
5323e5c31af7Sopenharmony_ci  * [[VUID-VkImageViewCreateInfo-pNext-02664]]
5324e5c31af7Sopenharmony_ci    If the pname:pNext chain includes a slink:VkImageViewUsageCreateInfo
5325e5c31af7Sopenharmony_ci    structure, pname:image was created with a
5326e5c31af7Sopenharmony_ci    slink:VkImageStencilUsageCreateInfo structure included in the
5327e5c31af7Sopenharmony_ci    pname:pNext chain of slink:VkImageCreateInfo, and
5328e5c31af7Sopenharmony_ci    pname:subresourceRange.aspectMask includes bits other than
5329e5c31af7Sopenharmony_ci    ename:VK_IMAGE_ASPECT_STENCIL_BIT, the pname:usage member of the
5330e5c31af7Sopenharmony_ci    slink:VkImageViewUsageCreateInfo structure must: not include any bits
5331e5c31af7Sopenharmony_ci    that were not set in the pname:usage member of the
5332e5c31af7Sopenharmony_ci    slink:VkImageCreateInfo structure used to create pname:image
5333e5c31af7Sopenharmony_ciendif::VK_VERSION_1_2,VK_EXT_separate_stencil_usage[]
5334e5c31af7Sopenharmony_ciendif::VK_VERSION_1_1,VK_KHR_maintenance2[]
5335e5c31af7Sopenharmony_ci  * [[VUID-VkImageViewCreateInfo-imageViewType-04973]]
5336e5c31af7Sopenharmony_ci    If pname:viewType is ename:VK_IMAGE_VIEW_TYPE_1D,
5337e5c31af7Sopenharmony_ci    ename:VK_IMAGE_VIEW_TYPE_2D, or ename:VK_IMAGE_VIEW_TYPE_3D; and
5338e5c31af7Sopenharmony_ci    pname:subresourceRange.layerCount is not
5339e5c31af7Sopenharmony_ci    ename:VK_REMAINING_ARRAY_LAYERS, then pname:subresourceRange.layerCount
5340e5c31af7Sopenharmony_ci    must: be 1
5341e5c31af7Sopenharmony_ci  * [[VUID-VkImageViewCreateInfo-imageViewType-04974]]
5342e5c31af7Sopenharmony_ci    If pname:viewType is ename:VK_IMAGE_VIEW_TYPE_1D,
5343e5c31af7Sopenharmony_ci    ename:VK_IMAGE_VIEW_TYPE_2D, or ename:VK_IMAGE_VIEW_TYPE_3D; and
5344e5c31af7Sopenharmony_ci    pname:subresourceRange.layerCount is ename:VK_REMAINING_ARRAY_LAYERS,
5345e5c31af7Sopenharmony_ci    then the remaining number of layers must: be 1
5346e5c31af7Sopenharmony_ci  * [[VUID-VkImageViewCreateInfo-viewType-02960]]
5347e5c31af7Sopenharmony_ci    If pname:viewType is ename:VK_IMAGE_VIEW_TYPE_CUBE and
5348e5c31af7Sopenharmony_ci    pname:subresourceRange.layerCount is not
5349e5c31af7Sopenharmony_ci    ename:VK_REMAINING_ARRAY_LAYERS, pname:subresourceRange.layerCount must:
5350e5c31af7Sopenharmony_ci    be `6`
5351e5c31af7Sopenharmony_ci  * [[VUID-VkImageViewCreateInfo-viewType-02961]]
5352e5c31af7Sopenharmony_ci    If pname:viewType is ename:VK_IMAGE_VIEW_TYPE_CUBE_ARRAY and
5353e5c31af7Sopenharmony_ci    pname:subresourceRange.layerCount is not
5354e5c31af7Sopenharmony_ci    ename:VK_REMAINING_ARRAY_LAYERS, pname:subresourceRange.layerCount must:
5355e5c31af7Sopenharmony_ci    be a multiple of `6`
5356e5c31af7Sopenharmony_ci  * [[VUID-VkImageViewCreateInfo-viewType-02962]]
5357e5c31af7Sopenharmony_ci    If pname:viewType is ename:VK_IMAGE_VIEW_TYPE_CUBE and
5358e5c31af7Sopenharmony_ci    pname:subresourceRange.layerCount is ename:VK_REMAINING_ARRAY_LAYERS,
5359e5c31af7Sopenharmony_ci    the remaining number of layers must: be `6`
5360e5c31af7Sopenharmony_ci  * [[VUID-VkImageViewCreateInfo-viewType-02963]]
5361e5c31af7Sopenharmony_ci    If pname:viewType is ename:VK_IMAGE_VIEW_TYPE_CUBE_ARRAY and
5362e5c31af7Sopenharmony_ci    pname:subresourceRange.layerCount is ename:VK_REMAINING_ARRAY_LAYERS,
5363e5c31af7Sopenharmony_ci    the remaining number of layers must: be a multiple of `6`
5364e5c31af7Sopenharmony_ciifdef::VK_KHR_portability_subset[]
5365e5c31af7Sopenharmony_ci  * [[VUID-VkImageViewCreateInfo-imageViewFormatSwizzle-04465]]
5366e5c31af7Sopenharmony_ci    If the `apiext:VK_KHR_portability_subset` extension is enabled, and
5367e5c31af7Sopenharmony_ci    slink:VkPhysicalDevicePortabilitySubsetFeaturesKHR::pname:imageViewFormatSwizzle
5368e5c31af7Sopenharmony_ci    is ename:VK_FALSE, all elements of pname:components must: have the
5369e5c31af7Sopenharmony_ci    <<resources-image-views-identity-mappings,identity swizzle>>
5370e5c31af7Sopenharmony_ci  * [[VUID-VkImageViewCreateInfo-imageViewFormatReinterpretation-04466]]
5371e5c31af7Sopenharmony_ci    If the `apiext:VK_KHR_portability_subset` extension is enabled, and
5372e5c31af7Sopenharmony_ci    slink:VkPhysicalDevicePortabilitySubsetFeaturesKHR::pname:imageViewFormatReinterpretation
5373e5c31af7Sopenharmony_ci    is ename:VK_FALSE, the elink:VkFormat in pname:format must: not contain
5374e5c31af7Sopenharmony_ci    a different number of components, or a different number of bits in each
5375e5c31af7Sopenharmony_ci    component, than the format of the sname:VkImage in pname:image
5376e5c31af7Sopenharmony_ciendif::VK_KHR_portability_subset[]
5377e5c31af7Sopenharmony_ciifdef::VKSC_VERSION_1_0[]
5378e5c31af7Sopenharmony_ci  * [[VUID-VkImageViewCreateInfo-subresourceRange-05064]]
5379e5c31af7Sopenharmony_ci    If pname:subresourceRange.levelCount is not
5380e5c31af7Sopenharmony_ci    ename:VK_REMAINING_MIP_LEVELS, pname:subresourceRange.levelCount must:
5381e5c31af7Sopenharmony_ci    be less than or equal to
5382e5c31af7Sopenharmony_ci    slink:VkDeviceObjectReservationCreateInfo::pname:maxImageViewMipLevels
5383e5c31af7Sopenharmony_ci  * [[VUID-VkImageViewCreateInfo-subresourceRange-05200]]
5384e5c31af7Sopenharmony_ci    If pname:subresourceRange.levelCount is ename:VK_REMAINING_MIP_LEVELS,
5385e5c31af7Sopenharmony_ci    the remaining number of mip levels must: be less than or equal to
5386e5c31af7Sopenharmony_ci    slink:VkDeviceObjectReservationCreateInfo::pname:maxImageViewMipLevels
5387e5c31af7Sopenharmony_ci  * [[VUID-VkImageViewCreateInfo-subresourceRange-05065]]
5388e5c31af7Sopenharmony_ci    If pname:subresourceRange.layerCount is not
5389e5c31af7Sopenharmony_ci    ename:VK_REMAINING_ARRAY_LAYERS, pname:subresourceRange.layerCount must:
5390e5c31af7Sopenharmony_ci    be less than or equal to
5391e5c31af7Sopenharmony_ci    slink:VkDeviceObjectReservationCreateInfo::pname:maxImageViewArrayLayers
5392e5c31af7Sopenharmony_ci  * [[VUID-VkImageViewCreateInfo-subresourceRange-05201]]
5393e5c31af7Sopenharmony_ci    If pname:subresourceRange.layerCount is ename:VK_REMAINING_ARRAY_LAYERS,
5394e5c31af7Sopenharmony_ci    the remaining number of layers must: be less than or equal to
5395e5c31af7Sopenharmony_ci    slink:VkDeviceObjectReservationCreateInfo::pname:maxImageViewMipLevels
5396e5c31af7Sopenharmony_ci  * [[VUID-VkImageViewCreateInfo-subresourceRange-05066]]
5397e5c31af7Sopenharmony_ci    If pname:subresourceRange.layerCount is not
5398e5c31af7Sopenharmony_ci    ename:VK_REMAINING_ARRAY_LAYERS and is greater than `1`, or if
5399e5c31af7Sopenharmony_ci    pname:subresourceRange.layerCount is ename:VK_REMAINING_ARRAY_LAYERS and
5400e5c31af7Sopenharmony_ci    the remaining number of layers is greater than `1`, then if
5401e5c31af7Sopenharmony_ci    pname:subresourceRange.levelCount is not ename:VK_REMAINING_MIP_LEVELS,
5402e5c31af7Sopenharmony_ci    pname:subresourceRange.levelCount must: be less than or equal to
5403e5c31af7Sopenharmony_ci    slink:VkDeviceObjectReservationCreateInfo::pname:maxLayeredImageViewMipLevels
5404e5c31af7Sopenharmony_ci  * [[VUID-VkImageViewCreateInfo-subresourceRange-05202]]
5405e5c31af7Sopenharmony_ci    If pname:subresourceRange.layerCount is not
5406e5c31af7Sopenharmony_ci    ename:VK_REMAINING_ARRAY_LAYERS and is greater than `1`, or if
5407e5c31af7Sopenharmony_ci    pname:subresourceRange.layerCount is ename:VK_REMAINING_ARRAY_LAYERS and
5408e5c31af7Sopenharmony_ci    the remaining number of layers is greater than `1`, then if
5409e5c31af7Sopenharmony_ci    pname:subresourceRange.levelCount is ename:VK_REMAINING_MIP_LEVELS, the
5410e5c31af7Sopenharmony_ci    remaining number of mip levels must: be less than or equal to
5411e5c31af7Sopenharmony_ci    slink:VkDeviceObjectReservationCreateInfo::pname:maxLayeredImageViewMipLevels
5412e5c31af7Sopenharmony_ciendif::VKSC_VERSION_1_0[]
5413e5c31af7Sopenharmony_ciifdef::VK_KHR_video_decode_queue[]
5414e5c31af7Sopenharmony_ci  * [[VUID-VkImageViewCreateInfo-image-04817]]
5415e5c31af7Sopenharmony_ci    If pname:image was created with pname:usage containing
5416e5c31af7Sopenharmony_ci    ename:VK_IMAGE_USAGE_VIDEO_DECODE_DST_BIT_KHR,
5417e5c31af7Sopenharmony_ci    ename:VK_IMAGE_USAGE_VIDEO_DECODE_SRC_BIT_KHR, or
5418e5c31af7Sopenharmony_ci    ename:VK_IMAGE_USAGE_VIDEO_DECODE_DPB_BIT_KHR, then the pname:viewType
5419e5c31af7Sopenharmony_ci    must: be ename:VK_IMAGE_VIEW_TYPE_2D or
5420e5c31af7Sopenharmony_ci    ename:VK_IMAGE_VIEW_TYPE_2D_ARRAY
5421e5c31af7Sopenharmony_ciendif::VK_KHR_video_decode_queue[]
5422e5c31af7Sopenharmony_ciifdef::VK_KHR_video_encode_queue[]
5423e5c31af7Sopenharmony_ci  * [[VUID-VkImageViewCreateInfo-image-04818]]
5424e5c31af7Sopenharmony_ci    If pname:image was created with pname:usage containing
5425e5c31af7Sopenharmony_ci    ename:VK_IMAGE_USAGE_VIDEO_ENCODE_DST_BIT_KHR,
5426e5c31af7Sopenharmony_ci    ename:VK_IMAGE_USAGE_VIDEO_ENCODE_SRC_BIT_KHR, or
5427e5c31af7Sopenharmony_ci    ename:VK_IMAGE_USAGE_VIDEO_ENCODE_DPB_BIT_KHR, then the pname:viewType
5428e5c31af7Sopenharmony_ci    must: be ename:VK_IMAGE_VIEW_TYPE_2D or
5429e5c31af7Sopenharmony_ci    ename:VK_IMAGE_VIEW_TYPE_2D_ARRAY
5430e5c31af7Sopenharmony_ciendif::VK_KHR_video_encode_queue[]
5431e5c31af7Sopenharmony_ciifdef::VK_EXT_descriptor_buffer[]
5432e5c31af7Sopenharmony_ci  * [[VUID-VkImageViewCreateInfo-flags-08106]]
5433e5c31af7Sopenharmony_ci    If pname:flags includes
5434e5c31af7Sopenharmony_ci    ename:VK_IMAGE_VIEW_CREATE_DESCRIPTOR_BUFFER_CAPTURE_REPLAY_BIT_EXT, the
5435e5c31af7Sopenharmony_ci    <<features-descriptorBufferCaptureReplay,
5436e5c31af7Sopenharmony_ci    pname:descriptorBufferCaptureReplay>> feature must: be enabled
5437e5c31af7Sopenharmony_ci  * [[VUID-VkImageViewCreateInfo-pNext-08107]]
5438e5c31af7Sopenharmony_ci    If the pname:pNext chain includes a
5439e5c31af7Sopenharmony_ci    slink:VkOpaqueCaptureDescriptorDataCreateInfoEXT structure, pname:flags
5440e5c31af7Sopenharmony_ci    must: contain
5441e5c31af7Sopenharmony_ci    ename:VK_IMAGE_VIEW_CREATE_DESCRIPTOR_BUFFER_CAPTURE_REPLAY_BIT_EXT
5442e5c31af7Sopenharmony_ciendif::VK_EXT_descriptor_buffer[]
5443e5c31af7Sopenharmony_ciifdef::VK_EXT_metal_objects[]
5444e5c31af7Sopenharmony_ci  * [[VUID-VkImageViewCreateInfo-pNext-06787]]
5445e5c31af7Sopenharmony_ci    If the pname:pNext chain includes a
5446e5c31af7Sopenharmony_ci    slink:VkExportMetalObjectCreateInfoEXT structure, its
5447e5c31af7Sopenharmony_ci    pname:exportObjectType member must: be
5448e5c31af7Sopenharmony_ci    ename:VK_EXPORT_METAL_OBJECT_TYPE_METAL_TEXTURE_BIT_EXT
5449e5c31af7Sopenharmony_ciendif::VK_EXT_metal_objects[]
5450e5c31af7Sopenharmony_ciifdef::VK_QCOM_image_processing[]
5451e5c31af7Sopenharmony_ci  * [[VUID-VkImageViewCreateInfo-pNext-06944]]
5452e5c31af7Sopenharmony_ci    If the pname:pNext chain includes
5453e5c31af7Sopenharmony_ci    slink:VkImageViewSampleWeightCreateInfoQCOM structure, then
5454e5c31af7Sopenharmony_ci    <<features-textureSampleWeighted, pname:textureSampleWeighted>> feature
5455e5c31af7Sopenharmony_ci    must: be enabled
5456e5c31af7Sopenharmony_ci  * [[VUID-VkImageViewCreateInfo-pNext-06945]]
5457e5c31af7Sopenharmony_ci    If the pname:pNext chain includes
5458e5c31af7Sopenharmony_ci    slink:VkImageViewSampleWeightCreateInfoQCOM structure, then pname:image
5459e5c31af7Sopenharmony_ci    must: have been created with pname:usage containing
5460e5c31af7Sopenharmony_ci    ename:VK_IMAGE_USAGE_SAMPLE_WEIGHT_BIT_QCOM
5461e5c31af7Sopenharmony_ci  * [[VUID-VkImageViewCreateInfo-pNext-06946]]
5462e5c31af7Sopenharmony_ci    If the pname:pNext chain includes
5463e5c31af7Sopenharmony_ci    slink:VkImageViewSampleWeightCreateInfoQCOM structure, then
5464e5c31af7Sopenharmony_ci    pname:components must: be ename:VK_COMPONENT_SWIZZLE_IDENTITY for all
5465e5c31af7Sopenharmony_ci    components
5466e5c31af7Sopenharmony_ci  * [[VUID-VkImageViewCreateInfo-pNext-06947]]
5467e5c31af7Sopenharmony_ci    If the pname:pNext chain includes
5468e5c31af7Sopenharmony_ci    slink:VkImageViewSampleWeightCreateInfoQCOM structure, then
5469e5c31af7Sopenharmony_ci    pname:subresourceRange.aspectMask must: be
5470e5c31af7Sopenharmony_ci    ename:VK_IMAGE_ASPECT_COLOR_BIT
5471e5c31af7Sopenharmony_ci  * [[VUID-VkImageViewCreateInfo-pNext-06948]]
5472e5c31af7Sopenharmony_ci    If the pname:pNext chain includes
5473e5c31af7Sopenharmony_ci    slink:VkImageViewSampleWeightCreateInfoQCOM structure, then
5474e5c31af7Sopenharmony_ci    pname:subresourceRange.levelCount must: be `1`
5475e5c31af7Sopenharmony_ci  * [[VUID-VkImageViewCreateInfo-pNext-06949]]
5476e5c31af7Sopenharmony_ci    If the pname:pNext chain includes
5477e5c31af7Sopenharmony_ci    slink:VkImageViewSampleWeightCreateInfoQCOM structure, then
5478e5c31af7Sopenharmony_ci    pname:viewType must: be ename:VK_IMAGE_VIEW_TYPE_1D_ARRAY or
5479e5c31af7Sopenharmony_ci    ename:VK_IMAGE_VIEW_TYPE_2D_ARRAY
5480e5c31af7Sopenharmony_ci  * [[VUID-VkImageViewCreateInfo-pNext-06950]]
5481e5c31af7Sopenharmony_ci    If the pname:pNext chain includes
5482e5c31af7Sopenharmony_ci    slink:VkImageViewSampleWeightCreateInfoQCOM structure and if
5483e5c31af7Sopenharmony_ci    pname:viewType is ename:VK_IMAGE_VIEW_TYPE_1D_ARRAY, then pname:image
5484e5c31af7Sopenharmony_ci    must: have been created with pname:imageType ename:VK_IMAGE_TYPE_1D
5485e5c31af7Sopenharmony_ci  * [[VUID-VkImageViewCreateInfo-pNext-06951]]
5486e5c31af7Sopenharmony_ci    If the pname:pNext chain includes
5487e5c31af7Sopenharmony_ci    slink:VkImageViewSampleWeightCreateInfoQCOM structure and pname:viewType
5488e5c31af7Sopenharmony_ci    is ename:VK_IMAGE_VIEW_TYPE_1D_ARRAY, then
5489e5c31af7Sopenharmony_ci    pname:subresourceRange.layerCount must: be equal to `2`
5490e5c31af7Sopenharmony_ci  * [[VUID-VkImageViewCreateInfo-pNext-06952]]
5491e5c31af7Sopenharmony_ci    If the pname:pNext chain includes
5492e5c31af7Sopenharmony_ci    slink:VkImageViewSampleWeightCreateInfoQCOM structure and pname:viewType
5493e5c31af7Sopenharmony_ci    is ename:VK_IMAGE_VIEW_TYPE_1D_ARRAY, then pname:image must: have been
5494e5c31af7Sopenharmony_ci    created with pname:width equal to or greater than latexmath:[(numPhases
5495e5c31af7Sopenharmony_ci    \times \mathbin{max}\left(
5496e5c31af7Sopenharmony_ci    \mathbin{align}\left(filterSize.width,4\right),
5497e5c31af7Sopenharmony_ci    filterSize.height\right))]
5498e5c31af7Sopenharmony_ci  * [[VUID-VkImageViewCreateInfo-pNext-06953]]
5499e5c31af7Sopenharmony_ci    If the pname:pNext chain includes
5500e5c31af7Sopenharmony_ci    slink:VkImageViewSampleWeightCreateInfoQCOM structure and if
5501e5c31af7Sopenharmony_ci    pname:viewType is ename:VK_IMAGE_VIEW_TYPE_2D_ARRAY, then pname:image
5502e5c31af7Sopenharmony_ci    must: have been created with pname:imageType ename:VK_IMAGE_TYPE_2D
5503e5c31af7Sopenharmony_ci  * [[VUID-VkImageViewCreateInfo-pNext-06954]]
5504e5c31af7Sopenharmony_ci    If the pname:pNext chain includes
5505e5c31af7Sopenharmony_ci    slink:VkImageViewSampleWeightCreateInfoQCOM structure and pname:viewType
5506e5c31af7Sopenharmony_ci    is ename:VK_IMAGE_VIEW_TYPE_2D_ARRAY, then
5507e5c31af7Sopenharmony_ci    pname:subresourceRange.layerCount must: be equal or greater than
5508e5c31af7Sopenharmony_ci    [eq]#numPhases#
5509e5c31af7Sopenharmony_ci  * [[VUID-VkImageViewCreateInfo-pNext-06955]]
5510e5c31af7Sopenharmony_ci    If the pname:pNext chain includes
5511e5c31af7Sopenharmony_ci    slink:VkImageViewSampleWeightCreateInfoQCOM structure and pname:viewType
5512e5c31af7Sopenharmony_ci    is ename:VK_IMAGE_VIEW_TYPE_2D_ARRAY, then pname:image must: have been
5513e5c31af7Sopenharmony_ci    created with pname:width equal to or greater than pname:filterSize.width
5514e5c31af7Sopenharmony_ci  * [[VUID-VkImageViewCreateInfo-pNext-06956]]
5515e5c31af7Sopenharmony_ci    If the pname:pNext chain includes
5516e5c31af7Sopenharmony_ci    slink:VkImageViewSampleWeightCreateInfoQCOM structure and pname:viewType
5517e5c31af7Sopenharmony_ci    is ename:VK_IMAGE_VIEW_TYPE_2D_ARRAY, then pname:image must: have been
5518e5c31af7Sopenharmony_ci    created with pname:height equal to or greater than
5519e5c31af7Sopenharmony_ci    pname:filterSize.height
5520e5c31af7Sopenharmony_ci  * [[VUID-VkImageViewCreateInfo-pNext-06957]]
5521e5c31af7Sopenharmony_ci    If the pname:pNext chain includes
5522e5c31af7Sopenharmony_ci    slink:VkImageViewSampleWeightCreateInfoQCOM structure then
5523e5c31af7Sopenharmony_ci    slink:VkImageViewSampleWeightCreateInfoQCOM::pname:filterSize.height
5524e5c31af7Sopenharmony_ci    must: be less than or equal to <<limits-weightfilter-maxdimension,
5525e5c31af7Sopenharmony_ci    sname:VkPhysicalDeviceImageProcessingPropertiesQCOM::pname:maxWeightFilterDimension.height>>
5526e5c31af7Sopenharmony_ciendif::VK_QCOM_image_processing[]
5527e5c31af7Sopenharmony_ci
5528e5c31af7Sopenharmony_ci****
5529e5c31af7Sopenharmony_ci
5530e5c31af7Sopenharmony_ciinclude::{generated}/validity/structs/VkImageViewCreateInfo.adoc[]
5531e5c31af7Sopenharmony_ci--
5532e5c31af7Sopenharmony_ci
5533e5c31af7Sopenharmony_ci[open,refpage='VkImageViewCreateFlagBits',desc='Bitmask specifying additional parameters of an image view',type='enums']
5534e5c31af7Sopenharmony_ci--
5535e5c31af7Sopenharmony_ciBits which can: be set in slink:VkImageViewCreateInfo::pname:flags,
5536e5c31af7Sopenharmony_cispecifying additional parameters of an image view, are:
5537e5c31af7Sopenharmony_ci
5538e5c31af7Sopenharmony_ciinclude::{generated}/api/enums/VkImageViewCreateFlagBits.adoc[]
5539e5c31af7Sopenharmony_ci
5540e5c31af7Sopenharmony_ciifdef::VK_EXT_fragment_density_map[]
5541e5c31af7Sopenharmony_ci  * ename:VK_IMAGE_VIEW_CREATE_FRAGMENT_DENSITY_MAP_DYNAMIC_BIT_EXT
5542e5c31af7Sopenharmony_ci    specifies that the fragment density map will be read by device during
5543e5c31af7Sopenharmony_ci    ename:VK_PIPELINE_STAGE_FRAGMENT_DENSITY_PROCESS_BIT_EXT
5544e5c31af7Sopenharmony_ciifdef::VK_EXT_fragment_density_map2[]
5545e5c31af7Sopenharmony_ci  * ename:VK_IMAGE_VIEW_CREATE_FRAGMENT_DENSITY_MAP_DEFERRED_BIT_EXT
5546e5c31af7Sopenharmony_ci    specifies that the fragment density map will be read by the host during
5547e5c31af7Sopenharmony_ci    flink:vkEndCommandBuffer for the primary command buffer that the render
5548e5c31af7Sopenharmony_ci    pass is recorded into
5549e5c31af7Sopenharmony_ciendif::VK_EXT_fragment_density_map2[]
5550e5c31af7Sopenharmony_ciendif::VK_EXT_fragment_density_map[]
5551e5c31af7Sopenharmony_ciifdef::VK_EXT_descriptor_buffer[]
5552e5c31af7Sopenharmony_ci  * ename:VK_IMAGE_VIEW_CREATE_DESCRIPTOR_BUFFER_CAPTURE_REPLAY_BIT_EXT
5553e5c31af7Sopenharmony_ci    specifies that the image view can: be used with descriptor buffers when
5554e5c31af7Sopenharmony_ci    capturing and replaying (e.g. for trace capture and replay), see
5555e5c31af7Sopenharmony_ci    slink:VkOpaqueCaptureDescriptorDataCreateInfoEXT for more detail.
5556e5c31af7Sopenharmony_ciendif::VK_EXT_descriptor_buffer[]
5557e5c31af7Sopenharmony_ci--
5558e5c31af7Sopenharmony_ci
5559e5c31af7Sopenharmony_ci[open,refpage='VkImageViewCreateFlags',desc='Reserved for future use',type='flags']
5560e5c31af7Sopenharmony_ci--
5561e5c31af7Sopenharmony_ciinclude::{generated}/api/flags/VkImageViewCreateFlags.adoc[]
5562e5c31af7Sopenharmony_ci
5563e5c31af7Sopenharmony_citname:VkImageViewCreateFlags is a bitmask type for setting a mask of zero or
5564e5c31af7Sopenharmony_cimore elink:VkImageViewCreateFlagBits.
5565e5c31af7Sopenharmony_ci--
5566e5c31af7Sopenharmony_ci
5567e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_1,VK_KHR_maintenance2[]
5568e5c31af7Sopenharmony_ci[open,refpage='VkImageViewUsageCreateInfo',desc='Specify the intended usage of an image view',type='structs']
5569e5c31af7Sopenharmony_ci--
5570e5c31af7Sopenharmony_ciThe set of usages for the created image view can: be restricted compared to
5571e5c31af7Sopenharmony_cithe parent image's pname:usage flags by adding a
5572e5c31af7Sopenharmony_cisname:VkImageViewUsageCreateInfo structure to the pname:pNext chain of
5573e5c31af7Sopenharmony_cislink:VkImageViewCreateInfo.
5574e5c31af7Sopenharmony_ci
5575e5c31af7Sopenharmony_ciThe sname:VkImageViewUsageCreateInfo structure is defined as:
5576e5c31af7Sopenharmony_ci
5577e5c31af7Sopenharmony_ciinclude::{generated}/api/structs/VkImageViewUsageCreateInfo.adoc[]
5578e5c31af7Sopenharmony_ci
5579e5c31af7Sopenharmony_ciifdef::VK_KHR_maintenance2[]
5580e5c31af7Sopenharmony_cior the equivalent
5581e5c31af7Sopenharmony_ci
5582e5c31af7Sopenharmony_ciinclude::{generated}/api/structs/VkImageViewUsageCreateInfoKHR.adoc[]
5583e5c31af7Sopenharmony_ciendif::VK_KHR_maintenance2[]
5584e5c31af7Sopenharmony_ci
5585e5c31af7Sopenharmony_ci  * pname:sType is a elink:VkStructureType value identifying this structure.
5586e5c31af7Sopenharmony_ci  * pname:pNext is `NULL` or a pointer to a structure extending this
5587e5c31af7Sopenharmony_ci    structure.
5588e5c31af7Sopenharmony_ci  * pname:usage is a bitmask of elink:VkImageUsageFlagBits specifying
5589e5c31af7Sopenharmony_ci    allowed usages of the image view.
5590e5c31af7Sopenharmony_ci
5591e5c31af7Sopenharmony_ciWhen this structure is chained to slink:VkImageViewCreateInfo the
5592e5c31af7Sopenharmony_cipname:usage field overrides the implicit pname:usage parameter inherited
5593e5c31af7Sopenharmony_cifrom image creation time and its value is used instead for the purposes of
5594e5c31af7Sopenharmony_cidetermining the valid usage conditions of slink:VkImageViewCreateInfo.
5595e5c31af7Sopenharmony_ci
5596e5c31af7Sopenharmony_ciinclude::{generated}/validity/structs/VkImageViewUsageCreateInfo.adoc[]
5597e5c31af7Sopenharmony_ci--
5598e5c31af7Sopenharmony_ciendif::VK_VERSION_1_1,VK_KHR_maintenance2[]
5599e5c31af7Sopenharmony_ci
5600e5c31af7Sopenharmony_ciifdef::VK_EXT_image_sliced_view_of_3d[]
5601e5c31af7Sopenharmony_ci[open,refpage='VkImageViewSlicedCreateInfoEXT',desc='Specify the subset of 3D slices of an image view',type='structs']
5602e5c31af7Sopenharmony_ci--
5603e5c31af7Sopenharmony_ciThe range of 3D slices for the created image view can: be restricted to a
5604e5c31af7Sopenharmony_cisubset of the parent image's Z range by adding a
5605e5c31af7Sopenharmony_cisname:VkImageViewSlicedCreateInfoEXT structure to the pname:pNext chain of
5606e5c31af7Sopenharmony_cislink:VkImageViewCreateInfo.
5607e5c31af7Sopenharmony_ci
5608e5c31af7Sopenharmony_ciThe sname:VkImageViewSlicedCreateInfoEXT structure is defined as:
5609e5c31af7Sopenharmony_ci
5610e5c31af7Sopenharmony_ciinclude::{generated}/api/structs/VkImageViewSlicedCreateInfoEXT.adoc[]
5611e5c31af7Sopenharmony_ci
5612e5c31af7Sopenharmony_ci  * pname:sType is a elink:VkStructureType value identifying this structure.
5613e5c31af7Sopenharmony_ci  * pname:pNext is `NULL` or a pointer to a structure extending this
5614e5c31af7Sopenharmony_ci    structure.
5615e5c31af7Sopenharmony_ci  * pname:sliceOffset is the Z-offset for the first 3D slice accessible to
5616e5c31af7Sopenharmony_ci    the image view.
5617e5c31af7Sopenharmony_ci  * pname:sliceCount is the number of 3D slices accessible to the image
5618e5c31af7Sopenharmony_ci    view.
5619e5c31af7Sopenharmony_ci
5620e5c31af7Sopenharmony_ciWhen this structure is chained to slink:VkImageViewCreateInfo the
5621e5c31af7Sopenharmony_cipname:sliceOffset field is treated as a Z-offset for the sliced view and
5622e5c31af7Sopenharmony_cipname:sliceCount specifies the range.
5623e5c31af7Sopenharmony_ciShader accesses using a Z coordinate of 0 will access the depth slice
5624e5c31af7Sopenharmony_cicorresponding to pname:sliceOffset in the image, and in a shader, the
5625e5c31af7Sopenharmony_cimaximum in-bounds Z coordinate for the view is [eq]#pname:sliceCount - 1#.
5626e5c31af7Sopenharmony_ci
5627e5c31af7Sopenharmony_ciA sliced 3D view must: only be used with a single mip level.
5628e5c31af7Sopenharmony_ciThe slice coordinates are integer coordinates within the
5629e5c31af7Sopenharmony_cipname:subresourceRange.baseMipLevel used to create the image view.
5630e5c31af7Sopenharmony_ci
5631e5c31af7Sopenharmony_ciThe effective view depth is equal to pname:extent.depth used to create the
5632e5c31af7Sopenharmony_cipname:image for this view adjusted by pname:subresourceRange.baseMipLevel as
5633e5c31af7Sopenharmony_cispecified in <<resources-image-mip-level-sizing,Image Mip Level Sizing>>.
5634e5c31af7Sopenharmony_ci
5635e5c31af7Sopenharmony_ciShader access to this image view is only affected by
5636e5c31af7Sopenharmony_cisname:VkImageViewSlicedCreateInfoEXT if it uses a descriptor of type
5637e5c31af7Sopenharmony_ciename:VK_DESCRIPTOR_TYPE_STORAGE_IMAGE.
5638e5c31af7Sopenharmony_ciFor access using any other descriptor type, the contents of
5639e5c31af7Sopenharmony_cisname:VkImageViewSlicedCreateInfoEXT are ignored; instead, pname:sliceOffset
5640e5c31af7Sopenharmony_ciis treated as being equal to 0, and pname:sliceCount is treated as being
5641e5c31af7Sopenharmony_ciequal to ename:VK_REMAINING_3D_SLICES_EXT.
5642e5c31af7Sopenharmony_ci
5643e5c31af7Sopenharmony_ci.Valid Usage
5644e5c31af7Sopenharmony_ci****
5645e5c31af7Sopenharmony_ci  * [[VUID-VkImageViewSlicedCreateInfoEXT-sliceOffset-07867]]
5646e5c31af7Sopenharmony_ci    pname:sliceOffset must: be less than the effective view depth as
5647e5c31af7Sopenharmony_ci    specified in <<resources-image-mip-level-sizing,Image Mip Level Sizing>>
5648e5c31af7Sopenharmony_ci  * [[VUID-VkImageViewSlicedCreateInfoEXT-sliceCount-07868]]
5649e5c31af7Sopenharmony_ci    If pname:sliceCount is not ename:VK_REMAINING_3D_SLICES_EXT, it must: be
5650e5c31af7Sopenharmony_ci    be non-zero and [eq]#pname:sliceOffset {plus} pname:sliceCount# must: be
5651e5c31af7Sopenharmony_ci    less than or equal to the effective view depth as specified in
5652e5c31af7Sopenharmony_ci    <<resources-image-mip-level-sizing,Image Mip Level Sizing>>
5653e5c31af7Sopenharmony_ci  * [[VUID-VkImageViewSlicedCreateInfoEXT-image-07869]]
5654e5c31af7Sopenharmony_ci    pname:image must: have been created with pname:imageType equal to
5655e5c31af7Sopenharmony_ci    ename:VK_IMAGE_TYPE_3D
5656e5c31af7Sopenharmony_ci  * [[VUID-VkImageViewSlicedCreateInfoEXT-viewType-07909]]
5657e5c31af7Sopenharmony_ci    pname:viewType must: be ename:VK_IMAGE_VIEW_TYPE_3D
5658e5c31af7Sopenharmony_ci  * [[VUID-VkImageViewSlicedCreateInfoEXT-None-07870]]
5659e5c31af7Sopenharmony_ci    The image view must: reference exactly 1 mip level
5660e5c31af7Sopenharmony_ci  * [[VUID-VkImageViewSlicedCreateInfoEXT-None-07871]]
5661e5c31af7Sopenharmony_ci    The <<features-imageSlicedViewOf3D,imageSlicedViewOf3D>> feature must:
5662e5c31af7Sopenharmony_ci    be enabled on the device
5663e5c31af7Sopenharmony_ci****
5664e5c31af7Sopenharmony_ci
5665e5c31af7Sopenharmony_ciinclude::{generated}/validity/structs/VkImageViewSlicedCreateInfoEXT.adoc[]
5666e5c31af7Sopenharmony_ci--
5667e5c31af7Sopenharmony_ci
5668e5c31af7Sopenharmony_ci[open,refpage='VK_REMAINING_3D_SLICES_EXT',desc='Sentinel for all remaining 3D slices',type='consts']
5669e5c31af7Sopenharmony_ci--
5670e5c31af7Sopenharmony_ciename:VK_REMAINING_3D_SLICES_EXT is a special constant value used for
5671e5c31af7Sopenharmony_cislink:VkImageViewSlicedCreateInfoEXT::pname:sliceCount to indicate that all
5672e5c31af7Sopenharmony_ciremaining 3D slices in an image after the first slice offset specified
5673e5c31af7Sopenharmony_cishould be included in the view.
5674e5c31af7Sopenharmony_ci
5675e5c31af7Sopenharmony_ciinclude::{generated}/api/enums/VK_REMAINING_3D_SLICES_EXT.adoc[]
5676e5c31af7Sopenharmony_ci--
5677e5c31af7Sopenharmony_ciendif::VK_EXT_image_sliced_view_of_3d[]
5678e5c31af7Sopenharmony_ci
5679e5c31af7Sopenharmony_ci[open,refpage='VkImageSubresourceRange',desc='Structure specifying an image subresource range',type='structs']
5680e5c31af7Sopenharmony_ci--
5681e5c31af7Sopenharmony_ciThe sname:VkImageSubresourceRange structure is defined as:
5682e5c31af7Sopenharmony_ci
5683e5c31af7Sopenharmony_ciinclude::{generated}/api/structs/VkImageSubresourceRange.adoc[]
5684e5c31af7Sopenharmony_ci
5685e5c31af7Sopenharmony_ci  * pname:aspectMask is a bitmask of elink:VkImageAspectFlagBits specifying
5686e5c31af7Sopenharmony_ci    which aspect(s) of the image are included in the view.
5687e5c31af7Sopenharmony_ci  * pname:baseMipLevel is the first mipmap level accessible to the view.
5688e5c31af7Sopenharmony_ci  * pname:levelCount is the number of mipmap levels (starting from
5689e5c31af7Sopenharmony_ci    pname:baseMipLevel) accessible to the view.
5690e5c31af7Sopenharmony_ci  * pname:baseArrayLayer is the first array layer accessible to the view.
5691e5c31af7Sopenharmony_ci  * pname:layerCount is the number of array layers (starting from
5692e5c31af7Sopenharmony_ci    pname:baseArrayLayer) accessible to the view.
5693e5c31af7Sopenharmony_ci
5694e5c31af7Sopenharmony_ciThe number of mipmap levels and array layers must: be a subset of the image
5695e5c31af7Sopenharmony_cisubresources in the image.
5696e5c31af7Sopenharmony_ciIf an application wants to use all mip levels or layers in an image after
5697e5c31af7Sopenharmony_cithe pname:baseMipLevel or pname:baseArrayLayer, it can: set pname:levelCount
5698e5c31af7Sopenharmony_ciand pname:layerCount to the special values ename:VK_REMAINING_MIP_LEVELS and
5699e5c31af7Sopenharmony_ciename:VK_REMAINING_ARRAY_LAYERS without knowing the exact number of mip
5700e5c31af7Sopenharmony_cilevels or layers.
5701e5c31af7Sopenharmony_ci
5702e5c31af7Sopenharmony_ciFor cube and cube array image views, the layers of the image view starting
5703e5c31af7Sopenharmony_ciat pname:baseArrayLayer correspond to faces in the order +X, -X, +Y, -Y, +Z,
5704e5c31af7Sopenharmony_ci-Z.
5705e5c31af7Sopenharmony_ciFor cube arrays, each set of six sequential layers is a single cube, so the
5706e5c31af7Sopenharmony_cinumber of cube maps in a cube map array view is _pname:layerCount / 6_, and
5707e5c31af7Sopenharmony_ciimage array layer [eq]#(pname:baseArrayLayer {plus} i)# is face index
5708e5c31af7Sopenharmony_ci[eq]#(i mod 6)# of cube _i / 6_.
5709e5c31af7Sopenharmony_ciIf the number of layers in the view, whether set explicitly in
5710e5c31af7Sopenharmony_cipname:layerCount or implied by ename:VK_REMAINING_ARRAY_LAYERS, is not a
5711e5c31af7Sopenharmony_cimultiple of 6, the last cube map in the array must: not be accessed.
5712e5c31af7Sopenharmony_ci
5713e5c31af7Sopenharmony_cipname:aspectMask must: be only ename:VK_IMAGE_ASPECT_COLOR_BIT,
5714e5c31af7Sopenharmony_ciename:VK_IMAGE_ASPECT_DEPTH_BIT or ename:VK_IMAGE_ASPECT_STENCIL_BIT if
5715e5c31af7Sopenharmony_cipname:format is a color, depth-only or stencil-only format,
5716e5c31af7Sopenharmony_ciifndef::VK_VERSION_1_1,VK_KHR_sampler_ycbcr_conversion[]
5717e5c31af7Sopenharmony_cirespectively.
5718e5c31af7Sopenharmony_ciendif::VK_VERSION_1_1,VK_KHR_sampler_ycbcr_conversion[]
5719e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_1,VK_KHR_sampler_ycbcr_conversion[]
5720e5c31af7Sopenharmony_cirespectively, except if pname:format is a
5721e5c31af7Sopenharmony_ci<<formats-requiring-sampler-ycbcr-conversion,multi-planar format>>.
5722e5c31af7Sopenharmony_ciendif::VK_VERSION_1_1,VK_KHR_sampler_ycbcr_conversion[]
5723e5c31af7Sopenharmony_ciIf using a depth/stencil format with both depth and stencil components,
5724e5c31af7Sopenharmony_cipname:aspectMask must: include at least one of
5725e5c31af7Sopenharmony_ciename:VK_IMAGE_ASPECT_DEPTH_BIT and ename:VK_IMAGE_ASPECT_STENCIL_BIT, and
5726e5c31af7Sopenharmony_cican: include both.
5727e5c31af7Sopenharmony_ci
5728e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_1,VK_KHR_maintenance1[]
5729e5c31af7Sopenharmony_ciWhen the sname:VkImageSubresourceRange structure is used to select a subset
5730e5c31af7Sopenharmony_ciof the slices of a 3D image's mip level in order to create a 2D or 2D array
5731e5c31af7Sopenharmony_ciimage view of a 3D image created with
5732e5c31af7Sopenharmony_ciename:VK_IMAGE_CREATE_2D_ARRAY_COMPATIBLE_BIT, pname:baseArrayLayer and
5733e5c31af7Sopenharmony_cipname:layerCount specify the first slice index and the number of slices to
5734e5c31af7Sopenharmony_ciinclude in the created image view.
5735e5c31af7Sopenharmony_ciSuch an image view can: be used as a framebuffer attachment that refers only
5736e5c31af7Sopenharmony_cito the specified range of slices of the selected mip level.
5737e5c31af7Sopenharmony_ciHowever, any layout transitions performed on such an attachment view during
5738e5c31af7Sopenharmony_cia render pass instance still apply to the entire subresource referenced
5739e5c31af7Sopenharmony_ciwhich includes all the slices of the selected mip level.
5740e5c31af7Sopenharmony_ciendif::VK_VERSION_1_1,VK_KHR_maintenance1[]
5741e5c31af7Sopenharmony_ci
5742e5c31af7Sopenharmony_ciWhen using an image view of a depth/stencil image to populate a descriptor
5743e5c31af7Sopenharmony_ciset (e.g. for sampling in the shader, or for use as an input attachment),
5744e5c31af7Sopenharmony_cithe pname:aspectMask must: only include one bit, which selects whether the
5745e5c31af7Sopenharmony_ciimage view is used for depth reads (i.e. using a floating-point sampler or
5746e5c31af7Sopenharmony_ciinput attachment in the shader) or stencil reads (i.e. using an unsigned
5747e5c31af7Sopenharmony_ciinteger sampler or input attachment in the shader).
5748e5c31af7Sopenharmony_ciWhen an image view of a depth/stencil image is used as a depth/stencil
5749e5c31af7Sopenharmony_ciframebuffer attachment, the pname:aspectMask is ignored and both depth and
5750e5c31af7Sopenharmony_cistencil image subresources are used.
5751e5c31af7Sopenharmony_ci
5752e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_1,VK_KHR_sampler_ycbcr_conversion[]
5753e5c31af7Sopenharmony_ciWhen creating a sname:VkImageView, if <<samplers-YCbCr-conversion,sampler
5754e5c31af7Sopenharmony_ci{YCbCr} conversion>> is enabled in the sampler, the pname:aspectMask of a
5755e5c31af7Sopenharmony_cipname:subresourceRange used by the sname:VkImageView must: be
5756e5c31af7Sopenharmony_ciename:VK_IMAGE_ASPECT_COLOR_BIT.
5757e5c31af7Sopenharmony_ci
5758e5c31af7Sopenharmony_ciWhen creating a sname:VkImageView, if sampler {YCbCr} conversion is not
5759e5c31af7Sopenharmony_cienabled in the sampler and the image pname:format is
5760e5c31af7Sopenharmony_ci<<formats-requiring-sampler-ycbcr-conversion,multi-planar>>, the image must:
5761e5c31af7Sopenharmony_cihave been created with ename:VK_IMAGE_CREATE_MUTABLE_FORMAT_BIT, and the
5762e5c31af7Sopenharmony_cipname:aspectMask of the sname:VkImageView's pname:subresourceRange must: be
5763e5c31af7Sopenharmony_ciename:VK_IMAGE_ASPECT_PLANE_0_BIT, ename:VK_IMAGE_ASPECT_PLANE_1_BIT or
5764e5c31af7Sopenharmony_ciename:VK_IMAGE_ASPECT_PLANE_2_BIT.
5765e5c31af7Sopenharmony_ciendif::VK_VERSION_1_1,VK_KHR_sampler_ycbcr_conversion[]
5766e5c31af7Sopenharmony_ci
5767e5c31af7Sopenharmony_ci.Valid Usage
5768e5c31af7Sopenharmony_ci****
5769e5c31af7Sopenharmony_ci  * [[VUID-VkImageSubresourceRange-levelCount-01720]]
5770e5c31af7Sopenharmony_ci    If pname:levelCount is not ename:VK_REMAINING_MIP_LEVELS, it must: be
5771e5c31af7Sopenharmony_ci    greater than `0`
5772e5c31af7Sopenharmony_ci  * [[VUID-VkImageSubresourceRange-layerCount-01721]]
5773e5c31af7Sopenharmony_ci    If pname:layerCount is not ename:VK_REMAINING_ARRAY_LAYERS, it must: be
5774e5c31af7Sopenharmony_ci    greater than `0`
5775e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_1,VK_KHR_sampler_ycbcr_conversion[]
5776e5c31af7Sopenharmony_ci  * [[VUID-VkImageSubresourceRange-aspectMask-01670]]
5777e5c31af7Sopenharmony_ci    If pname:aspectMask includes ename:VK_IMAGE_ASPECT_COLOR_BIT, then it
5778e5c31af7Sopenharmony_ci    must: not include any of ename:VK_IMAGE_ASPECT_PLANE_0_BIT,
5779e5c31af7Sopenharmony_ci    ename:VK_IMAGE_ASPECT_PLANE_1_BIT, or ename:VK_IMAGE_ASPECT_PLANE_2_BIT
5780e5c31af7Sopenharmony_ciendif::VK_VERSION_1_1,VK_KHR_sampler_ycbcr_conversion[]
5781e5c31af7Sopenharmony_ciifdef::VK_EXT_image_drm_format_modifier[]
5782e5c31af7Sopenharmony_ci  * [[VUID-VkImageSubresourceRange-aspectMask-02278]]
5783e5c31af7Sopenharmony_ci    pname:aspectMask must: not include
5784e5c31af7Sopenharmony_ci    `VK_IMAGE_ASPECT_MEMORY_PLANE__{ibit}__BIT_EXT` for any index _i_
5785e5c31af7Sopenharmony_ciendif::VK_EXT_image_drm_format_modifier[]
5786e5c31af7Sopenharmony_ci****
5787e5c31af7Sopenharmony_ci
5788e5c31af7Sopenharmony_ciinclude::{generated}/validity/structs/VkImageSubresourceRange.adoc[]
5789e5c31af7Sopenharmony_ci--
5790e5c31af7Sopenharmony_ci
5791e5c31af7Sopenharmony_ci[open,refpage='VkImageAspectFlagBits',desc='Bitmask specifying which aspects of an image are included in a view',type='enums']
5792e5c31af7Sopenharmony_ci--
5793e5c31af7Sopenharmony_ciBits which can: be set in an aspect mask to specify aspects of an image for
5794e5c31af7Sopenharmony_cipurposes such as identifying a subresource, are:
5795e5c31af7Sopenharmony_ci
5796e5c31af7Sopenharmony_ciinclude::{generated}/api/enums/VkImageAspectFlagBits.adoc[]
5797e5c31af7Sopenharmony_ci
5798e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_3,VK_KHR_maintenance4[]
5799e5c31af7Sopenharmony_ci  * ename:VK_IMAGE_ASPECT_NONE specifies no image aspect, or the image
5800e5c31af7Sopenharmony_ci    aspect is not applicable.
5801e5c31af7Sopenharmony_ciendif::VK_VERSION_1_3,VK_KHR_maintenance4[]
5802e5c31af7Sopenharmony_ci  * ename:VK_IMAGE_ASPECT_COLOR_BIT specifies the color aspect.
5803e5c31af7Sopenharmony_ci  * ename:VK_IMAGE_ASPECT_DEPTH_BIT specifies the depth aspect.
5804e5c31af7Sopenharmony_ci  * ename:VK_IMAGE_ASPECT_STENCIL_BIT specifies the stencil aspect.
5805e5c31af7Sopenharmony_ci  * ename:VK_IMAGE_ASPECT_METADATA_BIT specifies the metadata aspect used
5806e5c31af7Sopenharmony_ci    for <<sparsememory, sparse resource>> operations.
5807e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_1,VK_KHR_sampler_ycbcr_conversion[]
5808e5c31af7Sopenharmony_ci  * ename:VK_IMAGE_ASPECT_PLANE_0_BIT specifies plane 0 of a _multi-planar_
5809e5c31af7Sopenharmony_ci    image format.
5810e5c31af7Sopenharmony_ci  * ename:VK_IMAGE_ASPECT_PLANE_1_BIT specifies plane 1 of a _multi-planar_
5811e5c31af7Sopenharmony_ci    image format.
5812e5c31af7Sopenharmony_ci  * ename:VK_IMAGE_ASPECT_PLANE_2_BIT specifies plane 2 of a _multi-planar_
5813e5c31af7Sopenharmony_ci    image format.
5814e5c31af7Sopenharmony_ciendif::VK_VERSION_1_1,VK_KHR_sampler_ycbcr_conversion[]
5815e5c31af7Sopenharmony_ciifdef::VK_EXT_image_drm_format_modifier[]
5816e5c31af7Sopenharmony_ci  * ename:VK_IMAGE_ASPECT_MEMORY_PLANE_0_BIT_EXT specifies _memory plane_ 0.
5817e5c31af7Sopenharmony_ci  * ename:VK_IMAGE_ASPECT_MEMORY_PLANE_1_BIT_EXT specifies _memory plane_ 1.
5818e5c31af7Sopenharmony_ci  * ename:VK_IMAGE_ASPECT_MEMORY_PLANE_2_BIT_EXT specifies _memory plane_ 2.
5819e5c31af7Sopenharmony_ci  * ename:VK_IMAGE_ASPECT_MEMORY_PLANE_3_BIT_EXT specifies _memory plane_ 3.
5820e5c31af7Sopenharmony_ciendif::VK_EXT_image_drm_format_modifier[]
5821e5c31af7Sopenharmony_ci--
5822e5c31af7Sopenharmony_ci
5823e5c31af7Sopenharmony_ci[open,refpage='VkImageAspectFlags',desc='Bitmask of VkImageAspectFlagBits',type='flags']
5824e5c31af7Sopenharmony_ci--
5825e5c31af7Sopenharmony_ciinclude::{generated}/api/flags/VkImageAspectFlags.adoc[]
5826e5c31af7Sopenharmony_ci
5827e5c31af7Sopenharmony_citname:VkImageAspectFlags is a bitmask type for setting a mask of zero or
5828e5c31af7Sopenharmony_cimore elink:VkImageAspectFlagBits.
5829e5c31af7Sopenharmony_ci--
5830e5c31af7Sopenharmony_ci
5831e5c31af7Sopenharmony_ci[open,refpage='VkComponentMapping',desc='Structure specifying a color component mapping',type='structs']
5832e5c31af7Sopenharmony_ci--
5833e5c31af7Sopenharmony_ciThe sname:VkComponentMapping structure is defined as:
5834e5c31af7Sopenharmony_ci
5835e5c31af7Sopenharmony_ciinclude::{generated}/api/structs/VkComponentMapping.adoc[]
5836e5c31af7Sopenharmony_ci
5837e5c31af7Sopenharmony_ci  * pname:r is a elink:VkComponentSwizzle specifying the component value
5838e5c31af7Sopenharmony_ci    placed in the R component of the output vector.
5839e5c31af7Sopenharmony_ci  * pname:g is a elink:VkComponentSwizzle specifying the component value
5840e5c31af7Sopenharmony_ci    placed in the G component of the output vector.
5841e5c31af7Sopenharmony_ci  * pname:b is a elink:VkComponentSwizzle specifying the component value
5842e5c31af7Sopenharmony_ci    placed in the B component of the output vector.
5843e5c31af7Sopenharmony_ci  * pname:a is a elink:VkComponentSwizzle specifying the component value
5844e5c31af7Sopenharmony_ci    placed in the A component of the output vector.
5845e5c31af7Sopenharmony_ci
5846e5c31af7Sopenharmony_ciinclude::{generated}/validity/structs/VkComponentMapping.adoc[]
5847e5c31af7Sopenharmony_ci--
5848e5c31af7Sopenharmony_ci
5849e5c31af7Sopenharmony_ci[open,refpage='VkComponentSwizzle',desc='Specify how a component is swizzled',type='enums']
5850e5c31af7Sopenharmony_ci--
5851e5c31af7Sopenharmony_ciPossible values of the members of slink:VkComponentMapping, specifying the
5852e5c31af7Sopenharmony_cicomponent values placed in each component of the output vector, are:
5853e5c31af7Sopenharmony_ci
5854e5c31af7Sopenharmony_ciinclude::{generated}/api/enums/VkComponentSwizzle.adoc[]
5855e5c31af7Sopenharmony_ci
5856e5c31af7Sopenharmony_ci  * ename:VK_COMPONENT_SWIZZLE_IDENTITY specifies that the component is set
5857e5c31af7Sopenharmony_ci    to the identity swizzle.
5858e5c31af7Sopenharmony_ci  * ename:VK_COMPONENT_SWIZZLE_ZERO specifies that the component is set to
5859e5c31af7Sopenharmony_ci    zero.
5860e5c31af7Sopenharmony_ci  * ename:VK_COMPONENT_SWIZZLE_ONE specifies that the component is set to
5861e5c31af7Sopenharmony_ci    either 1 or 1.0, depending on whether the type of the image view format
5862e5c31af7Sopenharmony_ci    is integer or floating-point respectively, as determined by the
5863e5c31af7Sopenharmony_ci    <<formats-definition,Format Definition>> section for each
5864e5c31af7Sopenharmony_ci    elink:VkFormat.
5865e5c31af7Sopenharmony_ci  * ename:VK_COMPONENT_SWIZZLE_R specifies that the component is set to the
5866e5c31af7Sopenharmony_ci    value of the R component of the image.
5867e5c31af7Sopenharmony_ci  * ename:VK_COMPONENT_SWIZZLE_G specifies that the component is set to the
5868e5c31af7Sopenharmony_ci    value of the G component of the image.
5869e5c31af7Sopenharmony_ci  * ename:VK_COMPONENT_SWIZZLE_B specifies that the component is set to the
5870e5c31af7Sopenharmony_ci    value of the B component of the image.
5871e5c31af7Sopenharmony_ci  * ename:VK_COMPONENT_SWIZZLE_A specifies that the component is set to the
5872e5c31af7Sopenharmony_ci    value of the A component of the image.
5873e5c31af7Sopenharmony_ci
5874e5c31af7Sopenharmony_ci[[resources-image-views-identity-mappings]]
5875e5c31af7Sopenharmony_ciSetting the identity swizzle on a component is equivalent to setting the
5876e5c31af7Sopenharmony_ciidentity mapping on that component.
5877e5c31af7Sopenharmony_ciThat is:
5878e5c31af7Sopenharmony_ci
5879e5c31af7Sopenharmony_ci.Component Mappings Equivalent To ename:VK_COMPONENT_SWIZZLE_IDENTITY
5880e5c31af7Sopenharmony_ci[options="header"]
5881e5c31af7Sopenharmony_ci|====
5882e5c31af7Sopenharmony_ci| Component          | Identity Mapping
5883e5c31af7Sopenharmony_ci| pname:components.r | ename:VK_COMPONENT_SWIZZLE_R
5884e5c31af7Sopenharmony_ci| pname:components.g | ename:VK_COMPONENT_SWIZZLE_G
5885e5c31af7Sopenharmony_ci| pname:components.b | ename:VK_COMPONENT_SWIZZLE_B
5886e5c31af7Sopenharmony_ci| pname:components.a | ename:VK_COMPONENT_SWIZZLE_A
5887e5c31af7Sopenharmony_ci|====
5888e5c31af7Sopenharmony_ci--
5889e5c31af7Sopenharmony_ci
5890e5c31af7Sopenharmony_ciifdef::VK_EXT_astc_decode_mode[]
5891e5c31af7Sopenharmony_ci[open,refpage='VkImageViewASTCDecodeModeEXT',desc='Structure describing the ASTC decode mode for an image view',type='structs']
5892e5c31af7Sopenharmony_ci--
5893e5c31af7Sopenharmony_ciIf the pname:pNext chain includes a sname:VkImageViewASTCDecodeModeEXT
5894e5c31af7Sopenharmony_cistructure, then that structure includes a parameter specifying the decode
5895e5c31af7Sopenharmony_cimode for image views using ASTC compressed formats.
5896e5c31af7Sopenharmony_ci
5897e5c31af7Sopenharmony_ciThe sname:VkImageViewASTCDecodeModeEXT structure is defined as:
5898e5c31af7Sopenharmony_ci
5899e5c31af7Sopenharmony_ciinclude::{generated}/api/structs/VkImageViewASTCDecodeModeEXT.adoc[]
5900e5c31af7Sopenharmony_ci
5901e5c31af7Sopenharmony_ci  * pname:sType is a elink:VkStructureType value identifying this structure.
5902e5c31af7Sopenharmony_ci  * pname:pNext is `NULL` or a pointer to a structure extending this
5903e5c31af7Sopenharmony_ci    structure.
5904e5c31af7Sopenharmony_ci  * pname:decodeMode is the intermediate format used to decode ASTC
5905e5c31af7Sopenharmony_ci    compressed formats.
5906e5c31af7Sopenharmony_ci
5907e5c31af7Sopenharmony_ci.Valid Usage
5908e5c31af7Sopenharmony_ci****
5909e5c31af7Sopenharmony_ci  * [[VUID-VkImageViewASTCDecodeModeEXT-decodeMode-02230]]
5910e5c31af7Sopenharmony_ci    pname:decodeMode must: be one of ename:VK_FORMAT_R16G16B16A16_SFLOAT,
5911e5c31af7Sopenharmony_ci    ename:VK_FORMAT_R8G8B8A8_UNORM, or
5912e5c31af7Sopenharmony_ci    ename:VK_FORMAT_E5B9G9R9_UFLOAT_PACK32
5913e5c31af7Sopenharmony_ci  * [[VUID-VkImageViewASTCDecodeModeEXT-decodeMode-02231]]
5914e5c31af7Sopenharmony_ci    If the <<features-astc-decodeModeSharedExponent,
5915e5c31af7Sopenharmony_ci    pname:decodeModeSharedExponent>> feature is not enabled,
5916e5c31af7Sopenharmony_ci    pname:decodeMode must: not be ename:VK_FORMAT_E5B9G9R9_UFLOAT_PACK32
5917e5c31af7Sopenharmony_ci  * [[VUID-VkImageViewASTCDecodeModeEXT-decodeMode-02232]]
5918e5c31af7Sopenharmony_ci    If pname:decodeMode is ename:VK_FORMAT_R8G8B8A8_UNORM the image view
5919e5c31af7Sopenharmony_ci    must: not include blocks using any of the ASTC HDR modes
5920e5c31af7Sopenharmony_ci  * [[VUID-VkImageViewASTCDecodeModeEXT-format-04084]]
5921e5c31af7Sopenharmony_ci    pname:format of the image view must: be one of the
5922e5c31af7Sopenharmony_ci    <<appendix-compressedtex-astc, ASTC Compressed Image Formats>>
5923e5c31af7Sopenharmony_ci****
5924e5c31af7Sopenharmony_ci
5925e5c31af7Sopenharmony_ciIf pname:format uses sRGB encoding then the pname:decodeMode has no effect.
5926e5c31af7Sopenharmony_ci
5927e5c31af7Sopenharmony_ciinclude::{generated}/validity/structs/VkImageViewASTCDecodeModeEXT.adoc[]
5928e5c31af7Sopenharmony_ci--
5929e5c31af7Sopenharmony_ciendif::VK_EXT_astc_decode_mode[]
5930e5c31af7Sopenharmony_ci
5931e5c31af7Sopenharmony_ciifdef::VK_QCOM_image_processing[]
5932e5c31af7Sopenharmony_ci[open,refpage='VkImageViewSampleWeightCreateInfoQCOM',desc='Structure describing weight sampling parameters for image view',type='structs']
5933e5c31af7Sopenharmony_ci--
5934e5c31af7Sopenharmony_ciIf the pname:pNext chain includes a
5935e5c31af7Sopenharmony_cisname:VkImageViewSampleWeightCreateInfoQCOM structure, then that structure
5936e5c31af7Sopenharmony_ciincludes a parameter specifying the parameters for weight image views used
5937e5c31af7Sopenharmony_ciin <<textures-weightimage,weight image sampling>>.
5938e5c31af7Sopenharmony_ci
5939e5c31af7Sopenharmony_ciThe sname:VkImageViewSampleWeightCreateInfoQCOM structure is defined as:
5940e5c31af7Sopenharmony_ci
5941e5c31af7Sopenharmony_ciinclude::{generated}/api/structs/VkImageViewSampleWeightCreateInfoQCOM.adoc[]
5942e5c31af7Sopenharmony_ci
5943e5c31af7Sopenharmony_ci  * pname:sType is a elink:VkStructureType value identifying this structure.
5944e5c31af7Sopenharmony_ci  * pname:pNext is `NULL` or a pointer to a structure extending this
5945e5c31af7Sopenharmony_ci    structure.
5946e5c31af7Sopenharmony_ci  * pname:filterCenter is a slink:VkOffset2D describing the location of the
5947e5c31af7Sopenharmony_ci    weight filter origin.
5948e5c31af7Sopenharmony_ci  * pname:filterSize is a slink:VkExtent2D specifying weight filter
5949e5c31af7Sopenharmony_ci    dimensions.
5950e5c31af7Sopenharmony_ci  * pname:numPhases is number of sub-pixel filter phases.
5951e5c31af7Sopenharmony_ci
5952e5c31af7Sopenharmony_ci
5953e5c31af7Sopenharmony_ciThe pname:filterCenter specifies the origin or center of the filter kernel,
5954e5c31af7Sopenharmony_cias described in <<textures-weightimage-filteroperation, Weight Sampling
5955e5c31af7Sopenharmony_ciOperation>>.
5956e5c31af7Sopenharmony_ciThe pname:numPhases describes the number of sub-pixel filter phases as
5957e5c31af7Sopenharmony_cidescribed in <<textures-weightimage-filterphases,Weight Sampling Phases>>.
5958e5c31af7Sopenharmony_ci
5959e5c31af7Sopenharmony_ci.Valid Usage
5960e5c31af7Sopenharmony_ci****
5961e5c31af7Sopenharmony_ci  * [[VUID-VkImageViewSampleWeightCreateInfoQCOM-filterSize-06958]]
5962e5c31af7Sopenharmony_ci    pname:filterSize.width must: be less than or equal to
5963e5c31af7Sopenharmony_ci    <<limits-weightfilter-maxdimension,
5964e5c31af7Sopenharmony_ci    sname:VkPhysicalDeviceImageProcessingPropertiesQCOM::pname:maxWeightFilterDimension.width>>
5965e5c31af7Sopenharmony_ci  * [[VUID-VkImageViewSampleWeightCreateInfoQCOM-filterSize-06959]]
5966e5c31af7Sopenharmony_ci    pname:filterSize.height must: be less than or equal to
5967e5c31af7Sopenharmony_ci    <<limits-weightfilter-maxdimension,
5968e5c31af7Sopenharmony_ci    sname:VkPhysicalDeviceImageProcessingPropertiesQCOM::pname:maxWeightFilterDimension.height>>
5969e5c31af7Sopenharmony_ci  * [[VUID-VkImageViewSampleWeightCreateInfoQCOM-filterCenter-06960]]
5970e5c31af7Sopenharmony_ci    pname:filterCenter.x must: be less than or equal to
5971e5c31af7Sopenharmony_ci    [eq]#(filterSize.width - 1)#
5972e5c31af7Sopenharmony_ci  * [[VUID-VkImageViewSampleWeightCreateInfoQCOM-filterCenter-06961]]
5973e5c31af7Sopenharmony_ci    pname:filterCenter.y must: be less than or equal to
5974e5c31af7Sopenharmony_ci    [eq]#(filterSize.height - 1)#
5975e5c31af7Sopenharmony_ci  * [[VUID-VkImageViewSampleWeightCreateInfoQCOM-numPhases-06962]]
5976e5c31af7Sopenharmony_ci    pname:numPhases must: be a power of two squared value (i.e., 1, 4, 16,
5977e5c31af7Sopenharmony_ci    64, 256, etc.)
5978e5c31af7Sopenharmony_ci  * [[VUID-VkImageViewSampleWeightCreateInfoQCOM-numPhases-06963]]
5979e5c31af7Sopenharmony_ci    pname:numPhases must: be less than or equal to
5980e5c31af7Sopenharmony_ci    <<limits-weightfilter-phases,
5981e5c31af7Sopenharmony_ci    sname:VkPhysicalDeviceImageProcessingPropertiesQCOM::pname:maxWeightFilterPhases>>
5982e5c31af7Sopenharmony_ci****
5983e5c31af7Sopenharmony_ci
5984e5c31af7Sopenharmony_ci
5985e5c31af7Sopenharmony_ciinclude::{generated}/validity/structs/VkImageViewSampleWeightCreateInfoQCOM.adoc[]
5986e5c31af7Sopenharmony_ci--
5987e5c31af7Sopenharmony_ciendif::VK_QCOM_image_processing[]
5988e5c31af7Sopenharmony_ci
5989e5c31af7Sopenharmony_ci
5990e5c31af7Sopenharmony_ci[open,refpage='vkDestroyImageView',desc='Destroy an image view object',type='protos']
5991e5c31af7Sopenharmony_ci--
5992e5c31af7Sopenharmony_ciTo destroy an image view, call:
5993e5c31af7Sopenharmony_ci
5994e5c31af7Sopenharmony_ciinclude::{generated}/api/protos/vkDestroyImageView.adoc[]
5995e5c31af7Sopenharmony_ci
5996e5c31af7Sopenharmony_ci  * pname:device is the logical device that destroys the image view.
5997e5c31af7Sopenharmony_ci  * pname:imageView is the image view to destroy.
5998e5c31af7Sopenharmony_ci  * pname:pAllocator controls host memory allocation as described in the
5999e5c31af7Sopenharmony_ci    <<memory-allocation, Memory Allocation>> chapter.
6000e5c31af7Sopenharmony_ci
6001e5c31af7Sopenharmony_ci.Valid Usage
6002e5c31af7Sopenharmony_ci****
6003e5c31af7Sopenharmony_ci  * [[VUID-vkDestroyImageView-imageView-01026]]
6004e5c31af7Sopenharmony_ci    All submitted commands that refer to pname:imageView must: have
6005e5c31af7Sopenharmony_ci    completed execution
6006e5c31af7Sopenharmony_ciifndef::VKSC_VERSION_1_0[]
6007e5c31af7Sopenharmony_ci  * [[VUID-vkDestroyImageView-imageView-01027]]
6008e5c31af7Sopenharmony_ci    If sname:VkAllocationCallbacks were provided when pname:imageView was
6009e5c31af7Sopenharmony_ci    created, a compatible set of callbacks must: be provided here
6010e5c31af7Sopenharmony_ci  * [[VUID-vkDestroyImageView-imageView-01028]]
6011e5c31af7Sopenharmony_ci    If no sname:VkAllocationCallbacks were provided when pname:imageView was
6012e5c31af7Sopenharmony_ci    created, pname:pAllocator must: be `NULL`
6013e5c31af7Sopenharmony_ciendif::VKSC_VERSION_1_0[]
6014e5c31af7Sopenharmony_ci****
6015e5c31af7Sopenharmony_ci
6016e5c31af7Sopenharmony_ciinclude::{generated}/validity/protos/vkDestroyImageView.adoc[]
6017e5c31af7Sopenharmony_ci--
6018e5c31af7Sopenharmony_ci
6019e5c31af7Sopenharmony_ciifdef::VK_NVX_image_view_handle[]
6020e5c31af7Sopenharmony_ci[open,refpage='vkGetImageViewHandleNVX',desc='Get the handle for an image view for a specific descriptor type',type='protos']
6021e5c31af7Sopenharmony_ci--
6022e5c31af7Sopenharmony_ciTo get the handle for an image view, call:
6023e5c31af7Sopenharmony_ci
6024e5c31af7Sopenharmony_ciinclude::{generated}/api/protos/vkGetImageViewHandleNVX.adoc[]
6025e5c31af7Sopenharmony_ci
6026e5c31af7Sopenharmony_ci  * pname:device is the logical device that owns the image view.
6027e5c31af7Sopenharmony_ci  * pname:pInfo describes the image view to query and type of handle.
6028e5c31af7Sopenharmony_ci
6029e5c31af7Sopenharmony_ciinclude::{generated}/validity/protos/vkGetImageViewHandleNVX.adoc[]
6030e5c31af7Sopenharmony_ci--
6031e5c31af7Sopenharmony_ci
6032e5c31af7Sopenharmony_ci[open,refpage='VkImageViewHandleInfoNVX',desc='Structure specifying the image view for handle queries',type='structs']
6033e5c31af7Sopenharmony_ci--
6034e5c31af7Sopenharmony_ciThe sname:VkImageViewHandleInfoNVX structure is defined as:
6035e5c31af7Sopenharmony_ci
6036e5c31af7Sopenharmony_ciinclude::{generated}/api/structs/VkImageViewHandleInfoNVX.adoc[]
6037e5c31af7Sopenharmony_ci
6038e5c31af7Sopenharmony_ci  * pname:sType is a elink:VkStructureType value identifying this structure.
6039e5c31af7Sopenharmony_ci  * pname:pNext is `NULL` or a pointer to a structure extending this
6040e5c31af7Sopenharmony_ci    structure.
6041e5c31af7Sopenharmony_ci  * pname:imageView is the image view to query.
6042e5c31af7Sopenharmony_ci  * pname:descriptorType is the type of descriptor for which to query a
6043e5c31af7Sopenharmony_ci    handle.
6044e5c31af7Sopenharmony_ci  * pname:sampler is the sampler to combine with the image view when
6045e5c31af7Sopenharmony_ci    generating the handle.
6046e5c31af7Sopenharmony_ci
6047e5c31af7Sopenharmony_ci.Valid Usage
6048e5c31af7Sopenharmony_ci****
6049e5c31af7Sopenharmony_ci  * [[VUID-VkImageViewHandleInfoNVX-descriptorType-02654]]
6050e5c31af7Sopenharmony_ci    pname:descriptorType must: be ename:VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE,
6051e5c31af7Sopenharmony_ci    ename:VK_DESCRIPTOR_TYPE_STORAGE_IMAGE, or
6052e5c31af7Sopenharmony_ci    ename:VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER
6053e5c31af7Sopenharmony_ci  * [[VUID-VkImageViewHandleInfoNVX-sampler-02655]]
6054e5c31af7Sopenharmony_ci    pname:sampler must: be a valid slink:VkSampler if pname:descriptorType
6055e5c31af7Sopenharmony_ci    is ename:VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER
6056e5c31af7Sopenharmony_ci  * [[VUID-VkImageViewHandleInfoNVX-imageView-02656]]
6057e5c31af7Sopenharmony_ci    If descriptorType is ename:VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE or
6058e5c31af7Sopenharmony_ci    ename:VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER, the image that
6059e5c31af7Sopenharmony_ci    pname:imageView was created from must: have been created with the
6060e5c31af7Sopenharmony_ci    ename:VK_IMAGE_USAGE_SAMPLED_BIT usage bit set
6061e5c31af7Sopenharmony_ci  * [[VUID-VkImageViewHandleInfoNVX-imageView-02657]]
6062e5c31af7Sopenharmony_ci    If descriptorType is ename:VK_DESCRIPTOR_TYPE_STORAGE_IMAGE, the image
6063e5c31af7Sopenharmony_ci    that pname:imageView was created from must: have been created with the
6064e5c31af7Sopenharmony_ci    ename:VK_IMAGE_USAGE_STORAGE_BIT usage bit set
6065e5c31af7Sopenharmony_ci****
6066e5c31af7Sopenharmony_ci
6067e5c31af7Sopenharmony_ciinclude::{generated}/validity/structs/VkImageViewHandleInfoNVX.adoc[]
6068e5c31af7Sopenharmony_ci--
6069e5c31af7Sopenharmony_ci
6070e5c31af7Sopenharmony_ci[open,refpage='vkGetImageViewAddressNVX',desc='Get the device address of an image view',type='protos']
6071e5c31af7Sopenharmony_ci--
6072e5c31af7Sopenharmony_ciTo get the device address for an image view, call:
6073e5c31af7Sopenharmony_ci
6074e5c31af7Sopenharmony_ciinclude::{generated}/api/protos/vkGetImageViewAddressNVX.adoc[]
6075e5c31af7Sopenharmony_ci
6076e5c31af7Sopenharmony_ci  * pname:device is the logical device that owns the image view.
6077e5c31af7Sopenharmony_ci  * pname:imageView is a handle to the image view.
6078e5c31af7Sopenharmony_ci  * pname:pProperties contains the device address and size when the call
6079e5c31af7Sopenharmony_ci    returns.
6080e5c31af7Sopenharmony_ci
6081e5c31af7Sopenharmony_ciinclude::{generated}/validity/protos/vkGetImageViewAddressNVX.adoc[]
6082e5c31af7Sopenharmony_ci--
6083e5c31af7Sopenharmony_ci
6084e5c31af7Sopenharmony_ci[open,refpage='VkImageViewAddressPropertiesNVX',desc='Structure specifying the image view for handle queries',type='structs']
6085e5c31af7Sopenharmony_ci--
6086e5c31af7Sopenharmony_ciThe sname:VkImageViewAddressPropertiesNVX structure is defined as:
6087e5c31af7Sopenharmony_ci
6088e5c31af7Sopenharmony_ciinclude::{generated}/api/structs/VkImageViewAddressPropertiesNVX.adoc[]
6089e5c31af7Sopenharmony_ci
6090e5c31af7Sopenharmony_ci  * pname:sType is a elink:VkStructureType value identifying this structure.
6091e5c31af7Sopenharmony_ci  * pname:pNext is `NULL` or a pointer to a structure extending this
6092e5c31af7Sopenharmony_ci    structure.
6093e5c31af7Sopenharmony_ci  * pname:deviceAddress is the device address of the image view.
6094e5c31af7Sopenharmony_ci  * pname:size is the size in bytes of the image view device memory.
6095e5c31af7Sopenharmony_ci
6096e5c31af7Sopenharmony_ci
6097e5c31af7Sopenharmony_ciinclude::{generated}/validity/structs/VkImageViewAddressPropertiesNVX.adoc[]
6098e5c31af7Sopenharmony_ci--
6099e5c31af7Sopenharmony_ciendif::VK_NVX_image_view_handle[]
6100e5c31af7Sopenharmony_ci
6101e5c31af7Sopenharmony_ci
6102e5c31af7Sopenharmony_ci[[resources-image-view-format-features]]
6103e5c31af7Sopenharmony_ci=== Image View Format Features
6104e5c31af7Sopenharmony_ci
6105e5c31af7Sopenharmony_ciValid uses of a slink:VkImageView may: depend on the image view's _format
6106e5c31af7Sopenharmony_cifeatures_, defined below.
6107e5c31af7Sopenharmony_ciSuch constraints are documented in the affected valid usage statement.
6108e5c31af7Sopenharmony_ci
6109e5c31af7Sopenharmony_ciifndef::VK_VERSION_1_3,VK_KHR_format_feature_flags2[]
6110e5c31af7Sopenharmony_ci  * If slink:VkImageViewCreateInfo::pname:image was created with
6111e5c31af7Sopenharmony_ci    ename:VK_IMAGE_TILING_LINEAR, then the image view's set of _format
6112e5c31af7Sopenharmony_ci    features_ is the value of
6113e5c31af7Sopenharmony_ci    slink:VkFormatProperties::pname:linearTilingFeatures found by calling
6114e5c31af7Sopenharmony_ci    flink:vkGetPhysicalDeviceFormatProperties on the same pname:format as
6115e5c31af7Sopenharmony_ci    slink:VkImageViewCreateInfo::pname:format.
6116e5c31af7Sopenharmony_ciendif::VK_VERSION_1_3,VK_KHR_format_feature_flags2[]
6117e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_3,VK_KHR_format_feature_flags2[]
6118e5c31af7Sopenharmony_ci  * If Vulkan 1.3 is supported or the `apiext:VK_KHR_format_feature_flags2`
6119e5c31af7Sopenharmony_ci    extension is supported, and slink:VkImageViewCreateInfo::pname:image was
6120e5c31af7Sopenharmony_ci    created with ename:VK_IMAGE_TILING_LINEAR, then the image view's set of
6121e5c31af7Sopenharmony_ci    _format features_ is the value of
6122e5c31af7Sopenharmony_ci    slink:VkFormatProperties3::pname:linearTilingFeatures found by calling
6123e5c31af7Sopenharmony_ci    flink:vkGetPhysicalDeviceFormatProperties2 on the same pname:format as
6124e5c31af7Sopenharmony_ci    slink:VkImageViewCreateInfo::pname:format.
6125e5c31af7Sopenharmony_ci  * If Vulkan 1.3 is not supported and the
6126e5c31af7Sopenharmony_ci    `apiext:VK_KHR_format_feature_flags2` extension is not supported, and
6127e5c31af7Sopenharmony_ci    slink:VkImageViewCreateInfo::pname:image was created with
6128e5c31af7Sopenharmony_ci    ename:VK_IMAGE_TILING_LINEAR, then the image view's set of _format
6129e5c31af7Sopenharmony_ci    features_ is the union of the value of
6130e5c31af7Sopenharmony_ci    slink:VkFormatProperties::pname:linearTilingFeatures found by calling
6131e5c31af7Sopenharmony_ci    flink:vkGetPhysicalDeviceFormatProperties on the same pname:format as
6132e5c31af7Sopenharmony_ci    slink:VkImageViewCreateInfo::pname:format, with:
6133e5c31af7Sopenharmony_ci  ** ename:VK_FORMAT_FEATURE_2_SAMPLED_IMAGE_DEPTH_COMPARISON_BIT if the
6134e5c31af7Sopenharmony_ci     format is a depth/stencil format and the image view features also
6135e5c31af7Sopenharmony_ci     contain ename:VK_FORMAT_FEATURE_2_SAMPLED_IMAGE_BIT.
6136e5c31af7Sopenharmony_ci  ** ename:VK_FORMAT_FEATURE_2_STORAGE_READ_WITHOUT_FORMAT_BIT if the format
6137e5c31af7Sopenharmony_ci     is one of the <<formats-without-shader-storage-format,extended storage
6138e5c31af7Sopenharmony_ci     formats>> and pname:shaderStorageImageReadWithoutFormat is enabled on
6139e5c31af7Sopenharmony_ci     the device.
6140e5c31af7Sopenharmony_ci  ** ename:VK_FORMAT_FEATURE_2_STORAGE_WRITE_WITHOUT_FORMAT_BIT if the
6141e5c31af7Sopenharmony_ci     format is one of the <<formats-without-shader-storage-format,extended
6142e5c31af7Sopenharmony_ci     storage formats>> and pname:shaderStorageImageWriteWithoutFormat is
6143e5c31af7Sopenharmony_ci     enabled on the device.
6144e5c31af7Sopenharmony_ciendif::VK_VERSION_1_3,VK_KHR_format_feature_flags2[]
6145e5c31af7Sopenharmony_ciifndef::VK_VERSION_1_3,VK_KHR_format_feature_flags2[]
6146e5c31af7Sopenharmony_ci  * If slink:VkImageViewCreateInfo::pname:image was created with
6147e5c31af7Sopenharmony_ci    ename:VK_IMAGE_TILING_OPTIMAL,
6148e5c31af7Sopenharmony_ciifdef::VK_ANDROID_external_memory_android_hardware_buffer[]
6149e5c31af7Sopenharmony_ci    but without an
6150e5c31af7Sopenharmony_ci    <<memory-external-android-hardware-buffer-external-formats,Android
6151e5c31af7Sopenharmony_ci    hardware buffer external format>>,
6152e5c31af7Sopenharmony_ciendif::VK_ANDROID_external_memory_android_hardware_buffer[]
6153e5c31af7Sopenharmony_ciifdef::VK_QNX_external_memory_screen_buffer[]
6154e5c31af7Sopenharmony_ci    or a <<memory-external-screen-buffer-external-formats,QNX Screen buffer
6155e5c31af7Sopenharmony_ci    external format>>,
6156e5c31af7Sopenharmony_ciendif::VK_QNX_external_memory_screen_buffer[]
6157e5c31af7Sopenharmony_ci    then the image view's set of _format features_ is the value of
6158e5c31af7Sopenharmony_ci    slink:VkFormatProperties::pname:optimalTilingFeatures found by calling
6159e5c31af7Sopenharmony_ci    flink:vkGetPhysicalDeviceFormatProperties on the same pname:format as
6160e5c31af7Sopenharmony_ci    slink:VkImageViewCreateInfo::pname:format.
6161e5c31af7Sopenharmony_ciendif::VK_VERSION_1_3,VK_KHR_format_feature_flags2[]
6162e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_3,VK_KHR_format_feature_flags2[]
6163e5c31af7Sopenharmony_ci  * If Vulkan 1.3 is supported or the `apiext:VK_KHR_format_feature_flags2`
6164e5c31af7Sopenharmony_ci    extension is supported, and slink:VkImageViewCreateInfo::pname:image was
6165e5c31af7Sopenharmony_ci    created with ename:VK_IMAGE_TILING_OPTIMAL,
6166e5c31af7Sopenharmony_ciifdef::VK_ANDROID_external_memory_android_hardware_buffer[]
6167e5c31af7Sopenharmony_ci    but without an
6168e5c31af7Sopenharmony_ci    <<memory-external-android-hardware-buffer-external-formats,Android
6169e5c31af7Sopenharmony_ci    hardware buffer external format>>,
6170e5c31af7Sopenharmony_ciendif::VK_ANDROID_external_memory_android_hardware_buffer[]
6171e5c31af7Sopenharmony_ciifdef::VK_QNX_external_memory_screen_buffer[]
6172e5c31af7Sopenharmony_ci    or a <<memory-external-screen-buffer-external-formats,QNX Screen buffer
6173e5c31af7Sopenharmony_ci    external format>>,
6174e5c31af7Sopenharmony_ciendif::VK_QNX_external_memory_screen_buffer[]
6175e5c31af7Sopenharmony_ci    then the image view's set of _format features_ is the value of
6176e5c31af7Sopenharmony_ci    slink:VkFormatProperties::pname:optimalTilingFeatures or
6177e5c31af7Sopenharmony_ci    slink:VkFormatProperties3::pname:optimalTilingFeatures found by calling
6178e5c31af7Sopenharmony_ci    flink:vkGetPhysicalDeviceFormatProperties or
6179e5c31af7Sopenharmony_ci    flink:vkGetPhysicalDeviceImageFormatProperties2 on the same pname:format
6180e5c31af7Sopenharmony_ci    as slink:VkImageViewCreateInfo::pname:format.
6181e5c31af7Sopenharmony_ci  * If Vulkan 1.3 is not supported and the
6182e5c31af7Sopenharmony_ci    `apiext:VK_KHR_format_feature_flags2` extension is not supported, and
6183e5c31af7Sopenharmony_ci    slink:VkImageViewCreateInfo::pname:image was created with
6184e5c31af7Sopenharmony_ci    ename:VK_IMAGE_TILING_OPTIMAL,
6185e5c31af7Sopenharmony_ciifdef::VK_ANDROID_external_memory_android_hardware_buffer[]
6186e5c31af7Sopenharmony_ci    but without an
6187e5c31af7Sopenharmony_ci    <<memory-external-android-hardware-buffer-external-formats,Android
6188e5c31af7Sopenharmony_ci    hardware buffer external format>>,
6189e5c31af7Sopenharmony_ciendif::VK_ANDROID_external_memory_android_hardware_buffer[]
6190e5c31af7Sopenharmony_ciifdef::VK_QNX_external_memory_screen_buffer[]
6191e5c31af7Sopenharmony_ci    or a <<memory-external-screen-buffer-external-formats,QNX Screen buffer
6192e5c31af7Sopenharmony_ci    external format>>,
6193e5c31af7Sopenharmony_ciendif::VK_QNX_external_memory_screen_buffer[]
6194e5c31af7Sopenharmony_ci    then the image view's set of _format features_ is the union of the value
6195e5c31af7Sopenharmony_ci    of slink:VkFormatProperties::pname:optimalTilingFeatures found by
6196e5c31af7Sopenharmony_ci    calling flink:vkGetPhysicalDeviceFormatProperties on the same
6197e5c31af7Sopenharmony_ci    pname:format as slink:VkImageViewCreateInfo::pname:format, with:
6198e5c31af7Sopenharmony_ci  ** ename:VK_FORMAT_FEATURE_2_SAMPLED_IMAGE_DEPTH_COMPARISON_BIT if the
6199e5c31af7Sopenharmony_ci     format is a depth/stencil format and the image view features also
6200e5c31af7Sopenharmony_ci     contain ename:VK_FORMAT_FEATURE_2_SAMPLED_IMAGE_BIT.
6201e5c31af7Sopenharmony_ci  ** ename:VK_FORMAT_FEATURE_2_STORAGE_READ_WITHOUT_FORMAT_BIT if the format
6202e5c31af7Sopenharmony_ci     is one of the <<formats-without-shader-storage-format,extended storage
6203e5c31af7Sopenharmony_ci     formats>> and pname:shaderStorageImageReadWithoutFormat is enabled on
6204e5c31af7Sopenharmony_ci     the device.
6205e5c31af7Sopenharmony_ci  ** ename:VK_FORMAT_FEATURE_2_STORAGE_WRITE_WITHOUT_FORMAT_BIT if the
6206e5c31af7Sopenharmony_ci     format is one of the <<formats-without-shader-storage-format,extended
6207e5c31af7Sopenharmony_ci     storage formats>> and pname:shaderStorageImageWriteWithoutFormat is
6208e5c31af7Sopenharmony_ci     enabled on the device.
6209e5c31af7Sopenharmony_ciendif::VK_VERSION_1_3,VK_KHR_format_feature_flags2[]
6210e5c31af7Sopenharmony_ciifdef::VK_ANDROID_external_memory_android_hardware_buffer[]
6211e5c31af7Sopenharmony_ci  * If slink:VkImageViewCreateInfo::pname:image was created with an
6212e5c31af7Sopenharmony_ci    <<memory-external-android-hardware-buffer-external-formats,Android
6213e5c31af7Sopenharmony_ci    hardware buffer external format>>, then the image views's set of _format
6214e5c31af7Sopenharmony_ci    features_ is the value of
6215e5c31af7Sopenharmony_ci    slink:VkAndroidHardwareBufferFormatPropertiesANDROID::pname:formatFeatures
6216e5c31af7Sopenharmony_ci    found by calling flink:vkGetAndroidHardwareBufferPropertiesANDROID on
6217e5c31af7Sopenharmony_ci    the Android hardware buffer that was imported to the
6218e5c31af7Sopenharmony_ci    slink:VkDeviceMemory to which the
6219e5c31af7Sopenharmony_ci    slink:VkImageViewCreateInfo::pname:image is bound.
6220e5c31af7Sopenharmony_ciendif::VK_ANDROID_external_memory_android_hardware_buffer[]
6221e5c31af7Sopenharmony_ciifdef::VK_QNX_external_memory_screen_buffer[]
6222e5c31af7Sopenharmony_ci  * If slink:VkImageViewCreateInfo::pname:image was created with a
6223e5c31af7Sopenharmony_ci    <<memory-external-screen-buffer-external-formats,QNX Screen buffer
6224e5c31af7Sopenharmony_ci    external format>>, then the image views's set of _format features_ is
6225e5c31af7Sopenharmony_ci    the value of
6226e5c31af7Sopenharmony_ci    slink:VkScreenBufferFormatPropertiesQNX::pname:formatFeatures found by
6227e5c31af7Sopenharmony_ci    calling flink:vkGetScreenBufferPropertiesQNX on the QNX Screen buffer
6228e5c31af7Sopenharmony_ci    that was imported to the slink:VkDeviceMemory to which the
6229e5c31af7Sopenharmony_ci    slink:VkImageViewCreateInfo::pname:image is bound.
6230e5c31af7Sopenharmony_ciendif::VK_QNX_external_memory_screen_buffer[]
6231e5c31af7Sopenharmony_ciifdef::VK_FUCHSIA_buffer_collection[]
6232e5c31af7Sopenharmony_ci  * If slink:VkImageViewCreateInfo::pname:image was created with a chained
6233e5c31af7Sopenharmony_ci    slink:VkBufferCollectionImageCreateInfoFUCHSIA, then the image view's
6234e5c31af7Sopenharmony_ci    set of _format features_ is the value of
6235e5c31af7Sopenharmony_ci    slink:VkBufferCollectionPropertiesFUCHSIA::pname:formatFeatures found by
6236e5c31af7Sopenharmony_ci    calling flink:vkGetBufferCollectionPropertiesFUCHSIA on the buffer
6237e5c31af7Sopenharmony_ci    collection passed as
6238e5c31af7Sopenharmony_ci    slink:VkBufferCollectionImageCreateInfoFUCHSIA::pname:collection when
6239e5c31af7Sopenharmony_ci    the image was created.
6240e5c31af7Sopenharmony_ciendif::VK_FUCHSIA_buffer_collection[]
6241e5c31af7Sopenharmony_ciifdef::VK_EXT_image_drm_format_modifier[]
6242e5c31af7Sopenharmony_ci  * If slink:VkImageViewCreateInfo::pname:image was created with
6243e5c31af7Sopenharmony_ci    ename:VK_IMAGE_TILING_DRM_FORMAT_MODIFIER_EXT, then:
6244e5c31af7Sopenharmony_ci  ** The image's DRM format modifier is the value of
6245e5c31af7Sopenharmony_ci     slink:VkImageDrmFormatModifierPropertiesEXT::pname:drmFormatModifier
6246e5c31af7Sopenharmony_ci     found by calling flink:vkGetImageDrmFormatModifierPropertiesEXT.
6247e5c31af7Sopenharmony_ci  ** Let
6248e5c31af7Sopenharmony_ci     slink:VkDrmFormatModifierPropertiesListEXT::pname:pDrmFormatModifierProperties
6249e5c31af7Sopenharmony_ci     be the array found by calling
6250e5c31af7Sopenharmony_ci     flink:vkGetPhysicalDeviceFormatProperties2 on the same pname:format as
6251e5c31af7Sopenharmony_ci     slink:VkImageViewCreateInfo::pname:format.
6252e5c31af7Sopenharmony_ci  ** Let `VkDrmFormatModifierPropertiesEXT prop` be the array element whose
6253e5c31af7Sopenharmony_ci     pname:drmFormatModifier member is the value of the image's DRM format
6254e5c31af7Sopenharmony_ci     modifier.
6255e5c31af7Sopenharmony_ci  ** Then the image view's set of _format features_ is
6256e5c31af7Sopenharmony_ci     `prop`::pname:drmFormatModifierTilingFeatures.
6257e5c31af7Sopenharmony_ciendif::VK_EXT_image_drm_format_modifier[]
6258e5c31af7Sopenharmony_ci
6259e5c31af7Sopenharmony_ciifdef::VK_EXT_image_view_min_lod[]
6260e5c31af7Sopenharmony_ci[open,refpage='VkImageViewMinLodCreateInfoEXT',desc='Structure describing the minimum LOD of an image view',type='structs']
6261e5c31af7Sopenharmony_ci--
6262e5c31af7Sopenharmony_ciThe sname:VkImageViewMinLodCreateInfoEXT structure is defined as:
6263e5c31af7Sopenharmony_ci
6264e5c31af7Sopenharmony_ciinclude::{generated}/api/structs/VkImageViewMinLodCreateInfoEXT.adoc[]
6265e5c31af7Sopenharmony_ci
6266e5c31af7Sopenharmony_ci  * pname:sType is a elink:VkStructureType value identifying this structure.
6267e5c31af7Sopenharmony_ci  * pname:pNext is `NULL` or a pointer to a structure extending this
6268e5c31af7Sopenharmony_ci    structure.
6269e5c31af7Sopenharmony_ci  * pname:minLod is the value to clamp the minimum LOD accessible by this
6270e5c31af7Sopenharmony_ci    slink:VkImageView.
6271e5c31af7Sopenharmony_ci
6272e5c31af7Sopenharmony_ciIf the pname:pNext chain includes a sname:VkImageViewMinLodCreateInfoEXT
6273e5c31af7Sopenharmony_cistructure, then that structure includes a parameter specifying a value to
6274e5c31af7Sopenharmony_ciclamp the minimum LOD value during <<textures-image-level-selection,Image
6275e5c31af7Sopenharmony_ciLevel(s) Selection>>, <<textures-gather,Texel Gathering>> and
6276e5c31af7Sopenharmony_ci<<textures-integer-coordinate-operations,Integer Texel Coordinate
6277e5c31af7Sopenharmony_ciOperations>>.
6278e5c31af7Sopenharmony_ci
6279e5c31af7Sopenharmony_ciIf the image view contains sname:VkImageViewMinLodCreateInfoEXT and it is
6280e5c31af7Sopenharmony_ciused as part of a sampling operation:
6281e5c31af7Sopenharmony_ci
6282e5c31af7Sopenharmony_ci[eq]#minLodFloat~imageView~ = pname:minLod#
6283e5c31af7Sopenharmony_ci
6284e5c31af7Sopenharmony_ciotherwise:
6285e5c31af7Sopenharmony_ci
6286e5c31af7Sopenharmony_ci[eq]#minLodFloat~imageView~ = 0.0#
6287e5c31af7Sopenharmony_ci
6288e5c31af7Sopenharmony_ciAn integer variant of this parameter is also defined for sampling operations
6289e5c31af7Sopenharmony_ciwhich access integer mipmap levels:
6290e5c31af7Sopenharmony_ci
6291e5c31af7Sopenharmony_ci[eq]#minLodInteger~imageView~ = {lfloor}minLodFloat~imageView~{rfloor}#
6292e5c31af7Sopenharmony_ci
6293e5c31af7Sopenharmony_ci.Valid Usage
6294e5c31af7Sopenharmony_ci****
6295e5c31af7Sopenharmony_ci  * [[VUID-VkImageViewMinLodCreateInfoEXT-minLod-06455]]
6296e5c31af7Sopenharmony_ci    If the <<features-minLod, pname:minLod>> feature is not enabled,
6297e5c31af7Sopenharmony_ci    pname:minLod must: be `0.0`
6298e5c31af7Sopenharmony_ci  * [[VUID-VkImageViewMinLodCreateInfoEXT-minLod-06456]]
6299e5c31af7Sopenharmony_ci    pname:minLod must: be less or equal to the index of the last mipmap
6300e5c31af7Sopenharmony_ci    level accessible to the view
6301e5c31af7Sopenharmony_ci****
6302e5c31af7Sopenharmony_ci
6303e5c31af7Sopenharmony_ciinclude::{generated}/validity/structs/VkImageViewMinLodCreateInfoEXT.adoc[]
6304e5c31af7Sopenharmony_ci--
6305e5c31af7Sopenharmony_ciendif::VK_EXT_image_view_min_lod[]
6306e5c31af7Sopenharmony_ci
6307e5c31af7Sopenharmony_ci
6308e5c31af7Sopenharmony_ciifdef::VK_NV_ray_tracing,VK_KHR_acceleration_structure[]
6309e5c31af7Sopenharmony_ci[[resources-acceleration-structures]]
6310e5c31af7Sopenharmony_ci== Acceleration Structures
6311e5c31af7Sopenharmony_ci
6312e5c31af7Sopenharmony_ci[open,refpage='VkAccelerationStructureKHR',desc='Opaque handle to an acceleration structure object',type='handles']
6313e5c31af7Sopenharmony_ci--
6314e5c31af7Sopenharmony_ci:refpage: VkAccelerationStructureKHR
6315e5c31af7Sopenharmony_ci
6316e5c31af7Sopenharmony_ciAcceleration structures are opaque data structures that are built by the
6317e5c31af7Sopenharmony_ciimplementation to more efficiently perform spatial queries on the provided
6318e5c31af7Sopenharmony_cigeometric data.
6319e5c31af7Sopenharmony_ciFor this extension, an acceleration structure is either a top-level
6320e5c31af7Sopenharmony_ciacceleration structure containing a set of bottom-level acceleration
6321e5c31af7Sopenharmony_cistructures or a bottom-level acceleration structure containing either a set
6322e5c31af7Sopenharmony_ciof axis-aligned bounding boxes for custom geometry or a set of triangles.
6323e5c31af7Sopenharmony_ci
6324e5c31af7Sopenharmony_ciEach instance in the top-level acceleration structure contains a reference
6325e5c31af7Sopenharmony_cito a bottom-level acceleration structure as well as an instance transform
6326e5c31af7Sopenharmony_ciplus information required to index into the shader bindings.
6327e5c31af7Sopenharmony_ciThe top-level acceleration structure is what is bound to the acceleration
6328e5c31af7Sopenharmony_cidescriptor, for example to trace inside the shader in the ray tracing
6329e5c31af7Sopenharmony_cipipeline.
6330e5c31af7Sopenharmony_ci
6331e5c31af7Sopenharmony_ciAcceleration structures are represented by sname:VkAccelerationStructureKHR
6332e5c31af7Sopenharmony_cihandles:
6333e5c31af7Sopenharmony_ci
6334e5c31af7Sopenharmony_ciinclude::{generated}/api/handles/VkAccelerationStructureKHR.adoc[]
6335e5c31af7Sopenharmony_ci--
6336e5c31af7Sopenharmony_ci
6337e5c31af7Sopenharmony_ciifdef::VK_NV_ray_tracing[]
6338e5c31af7Sopenharmony_ci[open,refpage='VkAccelerationStructureNV',desc='Opaque handle to an acceleration structure object',type='handles']
6339e5c31af7Sopenharmony_ci--
6340e5c31af7Sopenharmony_ci:refpage: VkAccelerationStructureNV
6341e5c31af7Sopenharmony_ci
6342e5c31af7Sopenharmony_ciAcceleration structures for the `apiext:VK_NV_ray_tracing extension` are
6343e5c31af7Sopenharmony_cirepresented by the similar sname:VkAccelerationStructureNV handles:
6344e5c31af7Sopenharmony_ci
6345e5c31af7Sopenharmony_ciinclude::{generated}/api/handles/VkAccelerationStructureNV.adoc[]
6346e5c31af7Sopenharmony_ci--
6347e5c31af7Sopenharmony_ci
6348e5c31af7Sopenharmony_ci[open,refpage='vkCreateAccelerationStructureNV',desc='Create a new acceleration structure object',type='protos']
6349e5c31af7Sopenharmony_ci--
6350e5c31af7Sopenharmony_ci:refpage: vkCreateAccelerationStructureNV
6351e5c31af7Sopenharmony_ci
6352e5c31af7Sopenharmony_ciTo create acceleration structures, call:
6353e5c31af7Sopenharmony_ci
6354e5c31af7Sopenharmony_ciinclude::{generated}/api/protos/vkCreateAccelerationStructureNV.adoc[]
6355e5c31af7Sopenharmony_ci
6356e5c31af7Sopenharmony_ci  * pname:device is the logical device that creates the buffer object.
6357e5c31af7Sopenharmony_ci  * pname:pCreateInfo is a pointer to a
6358e5c31af7Sopenharmony_ci    slink:VkAccelerationStructureCreateInfoNV structure containing
6359e5c31af7Sopenharmony_ci    parameters affecting creation of the acceleration structure.
6360e5c31af7Sopenharmony_ci  * pname:pAllocator controls host memory allocation as described in the
6361e5c31af7Sopenharmony_ci    <<memory-allocation, Memory Allocation>> chapter.
6362e5c31af7Sopenharmony_ci  * pname:pAccelerationStructure is a pointer to a
6363e5c31af7Sopenharmony_ci    slink:VkAccelerationStructureNV handle in which the resulting
6364e5c31af7Sopenharmony_ci    acceleration structure object is returned.
6365e5c31af7Sopenharmony_ci
6366e5c31af7Sopenharmony_ciSimilarly to other objects in Vulkan, the acceleration structure creation
6367e5c31af7Sopenharmony_cimerely creates an object with a specific "`shape`" as specified by the
6368e5c31af7Sopenharmony_ciinformation in slink:VkAccelerationStructureInfoNV and pname:compactedSize
6369e5c31af7Sopenharmony_ciin pname:pCreateInfo.
6370e5c31af7Sopenharmony_ci
6371e5c31af7Sopenharmony_ciOnce memory has been bound to the acceleration structure using
6372e5c31af7Sopenharmony_ciflink:vkBindAccelerationStructureMemoryNV, that memory is populated by calls
6373e5c31af7Sopenharmony_cito flink:vkCmdBuildAccelerationStructureNV and
6374e5c31af7Sopenharmony_ciflink:vkCmdCopyAccelerationStructureNV.
6375e5c31af7Sopenharmony_ci
6376e5c31af7Sopenharmony_ciAcceleration structure creation uses the count and type information from the
6377e5c31af7Sopenharmony_cigeometries, but does not use the data references in the structures.
6378e5c31af7Sopenharmony_ci
6379e5c31af7Sopenharmony_ciinclude::{generated}/validity/protos/vkCreateAccelerationStructureNV.adoc[]
6380e5c31af7Sopenharmony_ci--
6381e5c31af7Sopenharmony_ci
6382e5c31af7Sopenharmony_ci[open,refpage='VkAccelerationStructureCreateInfoNV',desc='Structure specifying the parameters of a newly created acceleration structure object',type='structs']
6383e5c31af7Sopenharmony_ci--
6384e5c31af7Sopenharmony_ci:refpage: VkAccelerationStructureCreateInfoNV
6385e5c31af7Sopenharmony_ci
6386e5c31af7Sopenharmony_ciThe sname:VkAccelerationStructureCreateInfoNV structure is defined as:
6387e5c31af7Sopenharmony_ci
6388e5c31af7Sopenharmony_ciinclude::{generated}/api/structs/VkAccelerationStructureCreateInfoNV.adoc[]
6389e5c31af7Sopenharmony_ci
6390e5c31af7Sopenharmony_ci  * pname:sType is a elink:VkStructureType value identifying this structure.
6391e5c31af7Sopenharmony_ci  * pname:pNext is `NULL` or a pointer to a structure extending this
6392e5c31af7Sopenharmony_ci    structure.
6393e5c31af7Sopenharmony_ci  * pname:compactedSize is the size from the result of
6394e5c31af7Sopenharmony_ci    flink:vkCmdWriteAccelerationStructuresPropertiesNV if this acceleration
6395e5c31af7Sopenharmony_ci    structure is going to be the target of a compacting copy.
6396e5c31af7Sopenharmony_ci  * pname:info is the slink:VkAccelerationStructureInfoNV structure
6397e5c31af7Sopenharmony_ci    specifying further parameters of the created acceleration structure.
6398e5c31af7Sopenharmony_ci
6399e5c31af7Sopenharmony_ci.Valid Usage
6400e5c31af7Sopenharmony_ci****
6401e5c31af7Sopenharmony_ci  * [[VUID-VkAccelerationStructureCreateInfoNV-compactedSize-02421]]
6402e5c31af7Sopenharmony_ci    If pname:compactedSize is not `0` then both pname:info.geometryCount and
6403e5c31af7Sopenharmony_ci    pname:info.instanceCount must: be `0`
6404e5c31af7Sopenharmony_ci****
6405e5c31af7Sopenharmony_ci
6406e5c31af7Sopenharmony_ciinclude::{generated}/validity/structs/VkAccelerationStructureCreateInfoNV.adoc[]
6407e5c31af7Sopenharmony_ci--
6408e5c31af7Sopenharmony_ci
6409e5c31af7Sopenharmony_ci[open,refpage='VkAccelerationStructureInfoNV',desc='Structure specifying the parameters of acceleration structure object',type='structs']
6410e5c31af7Sopenharmony_ci--
6411e5c31af7Sopenharmony_ci:refpage: VkAccelerationStructureInfoNV
6412e5c31af7Sopenharmony_ci
6413e5c31af7Sopenharmony_ciThe sname:VkAccelerationStructureInfoNV structure is defined as:
6414e5c31af7Sopenharmony_ci
6415e5c31af7Sopenharmony_ciinclude::{generated}/api/structs/VkAccelerationStructureInfoNV.adoc[]
6416e5c31af7Sopenharmony_ci
6417e5c31af7Sopenharmony_ci  * pname:sType is a elink:VkStructureType value identifying this structure.
6418e5c31af7Sopenharmony_ci  * pname:pNext is `NULL` or a pointer to a structure extending this
6419e5c31af7Sopenharmony_ci    structure.
6420e5c31af7Sopenharmony_ci  * pname:type is a elink:VkAccelerationStructureTypeNV value specifying the
6421e5c31af7Sopenharmony_ci    type of acceleration structure that will be created.
6422e5c31af7Sopenharmony_ci  * pname:flags is a bitmask of elink:VkBuildAccelerationStructureFlagBitsNV
6423e5c31af7Sopenharmony_ci    specifying additional parameters of the acceleration structure.
6424e5c31af7Sopenharmony_ci  * pname:instanceCount specifies the number of instances that will be in
6425e5c31af7Sopenharmony_ci    the new acceleration structure.
6426e5c31af7Sopenharmony_ci  * pname:geometryCount specifies the number of geometries that will be in
6427e5c31af7Sopenharmony_ci    the new acceleration structure.
6428e5c31af7Sopenharmony_ci  * pname:pGeometries is a pointer to an array of pname:geometryCount
6429e5c31af7Sopenharmony_ci    slink:VkGeometryNV structures containing the scene data being passed
6430e5c31af7Sopenharmony_ci    into the acceleration structure.
6431e5c31af7Sopenharmony_ci
6432e5c31af7Sopenharmony_cisname:VkAccelerationStructureInfoNV contains information that is used both
6433e5c31af7Sopenharmony_cifor acceleration structure creation with
6434e5c31af7Sopenharmony_ciflink:vkCreateAccelerationStructureNV and in combination with the actual
6435e5c31af7Sopenharmony_cigeometric data to build the acceleration structure with
6436e5c31af7Sopenharmony_ciflink:vkCmdBuildAccelerationStructureNV.
6437e5c31af7Sopenharmony_ci
6438e5c31af7Sopenharmony_ci.Valid Usage
6439e5c31af7Sopenharmony_ci****
6440e5c31af7Sopenharmony_ci  * [[VUID-VkAccelerationStructureInfoNV-geometryCount-02422]]
6441e5c31af7Sopenharmony_ci    pname:geometryCount must: be less than or equal to
6442e5c31af7Sopenharmony_ci    slink:VkPhysicalDeviceRayTracingPropertiesNV::pname:maxGeometryCount
6443e5c31af7Sopenharmony_ci  * [[VUID-VkAccelerationStructureInfoNV-instanceCount-02423]]
6444e5c31af7Sopenharmony_ci    pname:instanceCount must: be less than or equal to
6445e5c31af7Sopenharmony_ci    slink:VkPhysicalDeviceRayTracingPropertiesNV::pname:maxInstanceCount
6446e5c31af7Sopenharmony_ci  * [[VUID-VkAccelerationStructureInfoNV-maxTriangleCount-02424]]
6447e5c31af7Sopenharmony_ci    The total number of triangles in all geometries must: be less than or
6448e5c31af7Sopenharmony_ci    equal to
6449e5c31af7Sopenharmony_ci    slink:VkPhysicalDeviceRayTracingPropertiesNV::pname:maxTriangleCount
6450e5c31af7Sopenharmony_ci  * [[VUID-VkAccelerationStructureInfoNV-type-02425]]
6451e5c31af7Sopenharmony_ci    If pname:type is ename:VK_ACCELERATION_STRUCTURE_TYPE_TOP_LEVEL_NV then
6452e5c31af7Sopenharmony_ci    pname:geometryCount must: be `0`
6453e5c31af7Sopenharmony_ci  * [[VUID-VkAccelerationStructureInfoNV-type-02426]]
6454e5c31af7Sopenharmony_ci    If pname:type is ename:VK_ACCELERATION_STRUCTURE_TYPE_BOTTOM_LEVEL_NV
6455e5c31af7Sopenharmony_ci    then pname:instanceCount must: be `0`
6456e5c31af7Sopenharmony_ci  * [[VUID-VkAccelerationStructureInfoNV-type-02786]]
6457e5c31af7Sopenharmony_ci    If pname:type is ename:VK_ACCELERATION_STRUCTURE_TYPE_BOTTOM_LEVEL_NV
6458e5c31af7Sopenharmony_ci    then the pname:geometryType member of each geometry in pname:pGeometries
6459e5c31af7Sopenharmony_ci    must: be the same
6460e5c31af7Sopenharmony_ciifdef::VK_KHR_acceleration_structure[]
6461e5c31af7Sopenharmony_ci  * [[VUID-VkAccelerationStructureInfoNV-type-04623]]
6462e5c31af7Sopenharmony_ci    pname:type must: not be ename:VK_ACCELERATION_STRUCTURE_TYPE_GENERIC_KHR
6463e5c31af7Sopenharmony_ciendif::VK_KHR_acceleration_structure[]
6464e5c31af7Sopenharmony_ci  * [[VUID-VkAccelerationStructureInfoNV-flags-02592]]
6465e5c31af7Sopenharmony_ci    If pname:flags has the
6466e5c31af7Sopenharmony_ci    ename:VK_BUILD_ACCELERATION_STRUCTURE_PREFER_FAST_TRACE_BIT_NV bit set,
6467e5c31af7Sopenharmony_ci    then it must: not have the
6468e5c31af7Sopenharmony_ci    ename:VK_BUILD_ACCELERATION_STRUCTURE_PREFER_FAST_BUILD_BIT_NV bit set
6469e5c31af7Sopenharmony_ci  * [[VUID-VkAccelerationStructureInfoNV-scratch-02781]]
6470e5c31af7Sopenharmony_ci    pname:scratch must: have been created with
6471e5c31af7Sopenharmony_ci    ename:VK_BUFFER_USAGE_RAY_TRACING_BIT_NV usage flag
6472e5c31af7Sopenharmony_ci  * [[VUID-VkAccelerationStructureInfoNV-instanceData-02782]]
6473e5c31af7Sopenharmony_ci    If pname:instanceData is not dlink:VK_NULL_HANDLE, pname:instanceData
6474e5c31af7Sopenharmony_ci    must: have been created with ename:VK_BUFFER_USAGE_RAY_TRACING_BIT_NV
6475e5c31af7Sopenharmony_ci    usage flag
6476e5c31af7Sopenharmony_ci****
6477e5c31af7Sopenharmony_ci
6478e5c31af7Sopenharmony_ciinclude::{generated}/validity/structs/VkAccelerationStructureInfoNV.adoc[]
6479e5c31af7Sopenharmony_ci--
6480e5c31af7Sopenharmony_ciendif::VK_NV_ray_tracing[]
6481e5c31af7Sopenharmony_ci
6482e5c31af7Sopenharmony_ciifdef::VK_KHR_acceleration_structure[]
6483e5c31af7Sopenharmony_ci[open,refpage='vkCreateAccelerationStructureKHR',desc='Create a new acceleration structure object',type='protos']
6484e5c31af7Sopenharmony_ci--
6485e5c31af7Sopenharmony_ci:refpage: vkCreateAccelerationStructureKHR
6486e5c31af7Sopenharmony_ci
6487e5c31af7Sopenharmony_ciTo create an acceleration structure, call:
6488e5c31af7Sopenharmony_ci
6489e5c31af7Sopenharmony_ciinclude::{generated}/api/protos/vkCreateAccelerationStructureKHR.adoc[]
6490e5c31af7Sopenharmony_ci
6491e5c31af7Sopenharmony_ci  * pname:device is the logical device that creates the acceleration
6492e5c31af7Sopenharmony_ci    structure object.
6493e5c31af7Sopenharmony_ci  * pname:pCreateInfo is a pointer to a
6494e5c31af7Sopenharmony_ci    slink:VkAccelerationStructureCreateInfoKHR structure containing
6495e5c31af7Sopenharmony_ci    parameters affecting creation of the acceleration structure.
6496e5c31af7Sopenharmony_ci  * pname:pAllocator controls host memory allocation as described in the
6497e5c31af7Sopenharmony_ci    <<memory-allocation, Memory Allocation>> chapter.
6498e5c31af7Sopenharmony_ci  * pname:pAccelerationStructure is a pointer to a
6499e5c31af7Sopenharmony_ci    sname:VkAccelerationStructureKHR handle in which the resulting
6500e5c31af7Sopenharmony_ci    acceleration structure object is returned.
6501e5c31af7Sopenharmony_ci
6502e5c31af7Sopenharmony_ciSimilar to other objects in Vulkan, the acceleration structure creation
6503e5c31af7Sopenharmony_cimerely creates an object with a specific "`shape`".
6504e5c31af7Sopenharmony_ciThe type and quantity of geometry that can be built into an acceleration
6505e5c31af7Sopenharmony_cistructure is determined by the parameters of
6506e5c31af7Sopenharmony_cislink:VkAccelerationStructureCreateInfoKHR.
6507e5c31af7Sopenharmony_ci
6508e5c31af7Sopenharmony_ciThe acceleration structure data is stored in the object referred to by
6509e5c31af7Sopenharmony_cisname:VkAccelerationStructureCreateInfoKHR::pname:buffer.
6510e5c31af7Sopenharmony_ciOnce memory has been bound to that buffer, it must: be populated by
6511e5c31af7Sopenharmony_ciacceleration structure build or acceleration structure copy commands such as
6512e5c31af7Sopenharmony_ciflink:vkCmdBuildAccelerationStructuresKHR,
6513e5c31af7Sopenharmony_ciflink:vkBuildAccelerationStructuresKHR,
6514e5c31af7Sopenharmony_ciflink:vkCmdCopyAccelerationStructureKHR, and
6515e5c31af7Sopenharmony_ciflink:vkCopyAccelerationStructureKHR.
6516e5c31af7Sopenharmony_ci
6517e5c31af7Sopenharmony_ci[NOTE]
6518e5c31af7Sopenharmony_ci.Note
6519e5c31af7Sopenharmony_ci====
6520e5c31af7Sopenharmony_ciThe expected usage for a trace capture/replay tool is that it will serialize
6521e5c31af7Sopenharmony_ciand later deserialize the acceleration structure data using acceleration
6522e5c31af7Sopenharmony_cistructure copy commands.
6523e5c31af7Sopenharmony_ciDuring capture the tool will use
6524e5c31af7Sopenharmony_ciflink:vkCopyAccelerationStructureToMemoryKHR or
6525e5c31af7Sopenharmony_ciflink:vkCmdCopyAccelerationStructureToMemoryKHR with a pname:mode of
6526e5c31af7Sopenharmony_ciename:VK_COPY_ACCELERATION_STRUCTURE_MODE_SERIALIZE_KHR, and
6527e5c31af7Sopenharmony_ciflink:vkCopyMemoryToAccelerationStructureKHR or
6528e5c31af7Sopenharmony_ciflink:vkCmdCopyMemoryToAccelerationStructureKHR with a pname:mode of
6529e5c31af7Sopenharmony_ciename:VK_COPY_ACCELERATION_STRUCTURE_MODE_DESERIALIZE_KHR during replay.
6530e5c31af7Sopenharmony_ci====
6531e5c31af7Sopenharmony_ci
6532e5c31af7Sopenharmony_ciThe input buffers passed to acceleration structure build commands will be
6533e5c31af7Sopenharmony_cireferenced by the implementation for the duration of the command.
6534e5c31af7Sopenharmony_ciAfter the command completes, the acceleration structure may: hold a
6535e5c31af7Sopenharmony_cireference to any acceleration structure specified by an active instance
6536e5c31af7Sopenharmony_cicontained therein.
6537e5c31af7Sopenharmony_ciApart from this referencing, acceleration structures must: be fully
6538e5c31af7Sopenharmony_ciself-contained.
6539e5c31af7Sopenharmony_ciThe application can: reuse or free any memory which was used by the command
6540e5c31af7Sopenharmony_cias an input or as scratch without affecting the results of ray traversal.
6541e5c31af7Sopenharmony_ci
6542e5c31af7Sopenharmony_ci.Valid Usage
6543e5c31af7Sopenharmony_ci****
6544e5c31af7Sopenharmony_ci  * [[VUID-vkCreateAccelerationStructureKHR-accelerationStructure-03611]]
6545e5c31af7Sopenharmony_ci    The <<features-accelerationStructure,
6546e5c31af7Sopenharmony_ci    sname:VkPhysicalDeviceAccelerationStructureFeaturesKHR::pname:accelerationStructure>>
6547e5c31af7Sopenharmony_ci    feature must: be enabled
6548e5c31af7Sopenharmony_ci  * [[VUID-vkCreateAccelerationStructureKHR-deviceAddress-03488]]
6549e5c31af7Sopenharmony_ci    If slink:VkAccelerationStructureCreateInfoKHR::pname:deviceAddress is
6550e5c31af7Sopenharmony_ci    not zero, the <<features-accelerationStructureCaptureReplay,
6551e5c31af7Sopenharmony_ci    pname:accelerationStructureCaptureReplay>> feature must: be enabled
6552e5c31af7Sopenharmony_ci  * [[VUID-vkCreateAccelerationStructureKHR-device-03489]]
6553e5c31af7Sopenharmony_ci    If pname:device was created with multiple physical devices, then the
6554e5c31af7Sopenharmony_ci    <<features-bufferDeviceAddressMultiDevice,
6555e5c31af7Sopenharmony_ci    pname:bufferDeviceAddressMultiDevice>> feature must: be enabled
6556e5c31af7Sopenharmony_ci****
6557e5c31af7Sopenharmony_ci
6558e5c31af7Sopenharmony_ciinclude::{generated}/validity/protos/vkCreateAccelerationStructureKHR.adoc[]
6559e5c31af7Sopenharmony_ci--
6560e5c31af7Sopenharmony_ci
6561e5c31af7Sopenharmony_ci[open,refpage='VkAccelerationStructureCreateInfoKHR',desc='Structure specifying the parameters of a newly created acceleration structure object',type='structs']
6562e5c31af7Sopenharmony_ci--
6563e5c31af7Sopenharmony_ci:refpage: VkAccelerationStructureCreateInfoKHR
6564e5c31af7Sopenharmony_ci
6565e5c31af7Sopenharmony_ciThe sname:VkAccelerationStructureCreateInfoKHR structure is defined as:
6566e5c31af7Sopenharmony_ci
6567e5c31af7Sopenharmony_ciinclude::{generated}/api/structs/VkAccelerationStructureCreateInfoKHR.adoc[]
6568e5c31af7Sopenharmony_ci
6569e5c31af7Sopenharmony_ci  * pname:sType is a elink:VkStructureType value identifying this structure.
6570e5c31af7Sopenharmony_ci  * pname:pNext is `NULL` or a pointer to a structure extending this
6571e5c31af7Sopenharmony_ci    structure.
6572e5c31af7Sopenharmony_ci  * pname:createFlags is a bitmask of
6573e5c31af7Sopenharmony_ci    elink:VkAccelerationStructureCreateFlagBitsKHR specifying additional
6574e5c31af7Sopenharmony_ci    creation parameters of the acceleration structure.
6575e5c31af7Sopenharmony_ci  * pname:buffer is the buffer on which the acceleration structure will be
6576e5c31af7Sopenharmony_ci    stored.
6577e5c31af7Sopenharmony_ci  * pname:offset is an offset in bytes from the base address of the buffer
6578e5c31af7Sopenharmony_ci    at which the acceleration structure will be stored, and must: be a
6579e5c31af7Sopenharmony_ci    multiple of `256`.
6580e5c31af7Sopenharmony_ci  * pname:size is the size required for the acceleration structure.
6581e5c31af7Sopenharmony_ci  * pname:type is a elink:VkAccelerationStructureTypeKHR value specifying
6582e5c31af7Sopenharmony_ci    the type of acceleration structure that will be created.
6583e5c31af7Sopenharmony_ci  * pname:deviceAddress is the device address requested for the acceleration
6584e5c31af7Sopenharmony_ci    structure if the <<features-accelerationStructureCaptureReplay,
6585e5c31af7Sopenharmony_ci    pname:accelerationStructureCaptureReplay>> feature is being used.
6586e5c31af7Sopenharmony_ci    If pname:deviceAddress is zero, no specific address is requested.
6587e5c31af7Sopenharmony_ci
6588e5c31af7Sopenharmony_ciApplications should: avoid creating acceleration structures with
6589e5c31af7Sopenharmony_ciapplication-provided addresses and implementation-provided addresses in the
6590e5c31af7Sopenharmony_cisame process, to reduce the likelihood of
6591e5c31af7Sopenharmony_ciename:VK_ERROR_INVALID_OPAQUE_CAPTURE_ADDRESS_KHR errors.
6592e5c31af7Sopenharmony_ci
6593e5c31af7Sopenharmony_ci[NOTE]
6594e5c31af7Sopenharmony_ci.Note
6595e5c31af7Sopenharmony_ci====
6596e5c31af7Sopenharmony_ciThe expected usage for this is that a trace capture/replay tool will add the
6597e5c31af7Sopenharmony_ciename:VK_BUFFER_CREATE_DEVICE_ADDRESS_CAPTURE_REPLAY_BIT flag to all buffers
6598e5c31af7Sopenharmony_cithat use ename:VK_BUFFER_USAGE_SHADER_DEVICE_ADDRESS_BIT, and will add
6599e5c31af7Sopenharmony_ciename:VK_BUFFER_USAGE_SHADER_DEVICE_ADDRESS_BIT to all buffers used as
6600e5c31af7Sopenharmony_cistorage for an acceleration structure where pname:deviceAddress is not zero.
6601e5c31af7Sopenharmony_ciThis also means that the tool will need to add
6602e5c31af7Sopenharmony_ciename:VK_MEMORY_ALLOCATE_DEVICE_ADDRESS_BIT to memory allocations to allow
6603e5c31af7Sopenharmony_cithe flag to be set where the application may not have otherwise required it.
6604e5c31af7Sopenharmony_ciDuring capture the tool will save the queried opaque device addresses in the
6605e5c31af7Sopenharmony_citrace.
6606e5c31af7Sopenharmony_ciDuring replay, the buffers will be created specifying the original address
6607e5c31af7Sopenharmony_ciso any address values stored in the trace data will remain valid.
6608e5c31af7Sopenharmony_ci
6609e5c31af7Sopenharmony_ciImplementations are expected to separate such buffers in the GPU address
6610e5c31af7Sopenharmony_cispace so normal allocations will avoid using these addresses.
6611e5c31af7Sopenharmony_ciApps/tools should avoid mixing app-provided and implementation-provided
6612e5c31af7Sopenharmony_ciaddresses for buffers created with
6613e5c31af7Sopenharmony_ciename:VK_BUFFER_CREATE_DEVICE_ADDRESS_CAPTURE_REPLAY_BIT, to avoid address
6614e5c31af7Sopenharmony_cispace allocation conflicts.
6615e5c31af7Sopenharmony_ci====
6616e5c31af7Sopenharmony_ci
6617e5c31af7Sopenharmony_ci
6618e5c31af7Sopenharmony_ciApplications should: create an acceleration structure with a specific
6619e5c31af7Sopenharmony_cielink:VkAccelerationStructureTypeKHR other than
6620e5c31af7Sopenharmony_ciename:VK_ACCELERATION_STRUCTURE_TYPE_GENERIC_KHR.
6621e5c31af7Sopenharmony_ci
6622e5c31af7Sopenharmony_ci[NOTE]
6623e5c31af7Sopenharmony_ci.Note
6624e5c31af7Sopenharmony_ci====
6625e5c31af7Sopenharmony_ciename:VK_ACCELERATION_STRUCTURE_TYPE_GENERIC_KHR is intended to be used by
6626e5c31af7Sopenharmony_ciAPI translation layers.
6627e5c31af7Sopenharmony_ciThis can be used at acceleration structure creation time in cases where the
6628e5c31af7Sopenharmony_ciactual acceleration structure type (top or bottom) is not yet known.
6629e5c31af7Sopenharmony_ciThe actual acceleration structure type must be specified as
6630e5c31af7Sopenharmony_ciename:VK_ACCELERATION_STRUCTURE_TYPE_TOP_LEVEL_KHR or
6631e5c31af7Sopenharmony_ciename:VK_ACCELERATION_STRUCTURE_TYPE_BOTTOM_LEVEL_KHR when the build is
6632e5c31af7Sopenharmony_ciperformed.
6633e5c31af7Sopenharmony_ci====
6634e5c31af7Sopenharmony_ci
6635e5c31af7Sopenharmony_ciIf the acceleration structure will be the target of a build operation, the
6636e5c31af7Sopenharmony_cirequired size for an acceleration structure can: be queried with
6637e5c31af7Sopenharmony_ciflink:vkGetAccelerationStructureBuildSizesKHR.
6638e5c31af7Sopenharmony_ciIf the acceleration structure is going to be the target of a compacting
6639e5c31af7Sopenharmony_cicopy, flink:vkCmdWriteAccelerationStructuresPropertiesKHR or
6640e5c31af7Sopenharmony_ciflink:vkWriteAccelerationStructuresPropertiesKHR can: be used to obtain the
6641e5c31af7Sopenharmony_cicompacted size required.
6642e5c31af7Sopenharmony_ci
6643e5c31af7Sopenharmony_ciifdef::VK_NV_ray_tracing_motion_blur[]
6644e5c31af7Sopenharmony_ciIf the acceleration structure will be the target of a build operation with
6645e5c31af7Sopenharmony_ciename:VK_BUILD_ACCELERATION_STRUCTURE_MOTION_BIT_NV it must: include
6646e5c31af7Sopenharmony_ciename:VK_ACCELERATION_STRUCTURE_CREATE_MOTION_BIT_NV in pname:createFlags
6647e5c31af7Sopenharmony_ciand include slink:VkAccelerationStructureMotionInfoNV as an extension
6648e5c31af7Sopenharmony_cistructure in pname:pNext with the number of instances as metadata for the
6649e5c31af7Sopenharmony_ciobject.
6650e5c31af7Sopenharmony_ciendif::VK_NV_ray_tracing_motion_blur[]
6651e5c31af7Sopenharmony_ci
6652e5c31af7Sopenharmony_ci.Valid Usage
6653e5c31af7Sopenharmony_ci****
6654e5c31af7Sopenharmony_ci  * [[VUID-VkAccelerationStructureCreateInfoKHR-deviceAddress-03612]]
6655e5c31af7Sopenharmony_ci    If pname:deviceAddress is not zero, pname:createFlags must: include
6656e5c31af7Sopenharmony_ci    ename:VK_ACCELERATION_STRUCTURE_CREATE_DEVICE_ADDRESS_CAPTURE_REPLAY_BIT_KHR
6657e5c31af7Sopenharmony_ci  * [[VUID-VkAccelerationStructureCreateInfoKHR-deviceAddress-09488]]
6658e5c31af7Sopenharmony_ci    If pname:deviceAddress is not zero, it must: have been retrieved from an
6659e5c31af7Sopenharmony_ci    identically created acceleration structure, except for pname:buffer and
6660e5c31af7Sopenharmony_ci    pname:deviceAddress
6661e5c31af7Sopenharmony_ci  * [[VUID-VkAccelerationStructureCreateInfoKHR-deviceAddress-09489]]
6662e5c31af7Sopenharmony_ci    If pname:deviceAddress is not zero, pname:buffer must: have been created
6663e5c31af7Sopenharmony_ci    identically to the pname:buffer used to create the acceleration
6664e5c31af7Sopenharmony_ci    structure from which pname:deviceAddress was retrieved, except for
6665e5c31af7Sopenharmony_ci    slink:VkBufferOpaqueCaptureAddressCreateInfo::pname:opaqueCaptureAddress
6666e5c31af7Sopenharmony_ci  * [[VUID-VkAccelerationStructureCreateInfoKHR-deviceAddress-09490]]
6667e5c31af7Sopenharmony_ci    If pname:deviceAddress is not zero, pname:buffer must: have been created
6668e5c31af7Sopenharmony_ci    with a
6669e5c31af7Sopenharmony_ci    slink:VkBufferOpaqueCaptureAddressCreateInfo::pname:opaqueCaptureAddress
6670e5c31af7Sopenharmony_ci    that was retrieved from flink:vkGetBufferOpaqueCaptureAddress for the
6671e5c31af7Sopenharmony_ci    pname:buffer that was used to create the acceleration structure from
6672e5c31af7Sopenharmony_ci    which pname:deviceAddress was retrieved
6673e5c31af7Sopenharmony_ci  * [[VUID-VkAccelerationStructureCreateInfoKHR-createFlags-03613]]
6674e5c31af7Sopenharmony_ci    If pname:createFlags includes
6675e5c31af7Sopenharmony_ci    ename:VK_ACCELERATION_STRUCTURE_CREATE_DEVICE_ADDRESS_CAPTURE_REPLAY_BIT_KHR,
6676e5c31af7Sopenharmony_ci    slink:VkPhysicalDeviceAccelerationStructureFeaturesKHR::pname:accelerationStructureCaptureReplay
6677e5c31af7Sopenharmony_ci    must: be ename:VK_TRUE
6678e5c31af7Sopenharmony_ci  * [[VUID-VkAccelerationStructureCreateInfoKHR-buffer-03614]]
6679e5c31af7Sopenharmony_ci    pname:buffer must: have been created with a pname:usage value containing
6680e5c31af7Sopenharmony_ci    ename:VK_BUFFER_USAGE_ACCELERATION_STRUCTURE_STORAGE_BIT_KHR
6681e5c31af7Sopenharmony_ci  * [[VUID-VkAccelerationStructureCreateInfoKHR-buffer-03615]]
6682e5c31af7Sopenharmony_ci    pname:buffer must: not have been created with
6683e5c31af7Sopenharmony_ci    ename:VK_BUFFER_CREATE_SPARSE_RESIDENCY_BIT
6684e5c31af7Sopenharmony_ci  * [[VUID-VkAccelerationStructureCreateInfoKHR-offset-03616]]
6685e5c31af7Sopenharmony_ci    The sum of pname:offset and pname:size must: be less than the size of
6686e5c31af7Sopenharmony_ci    pname:buffer
6687e5c31af7Sopenharmony_ci  * [[VUID-VkAccelerationStructureCreateInfoKHR-offset-03734]]
6688e5c31af7Sopenharmony_ci    pname:offset must: be a multiple of `256` bytes
6689e5c31af7Sopenharmony_ciifdef::VK_NV_ray_tracing_motion_blur[]
6690e5c31af7Sopenharmony_ci  * [[VUID-VkAccelerationStructureCreateInfoKHR-createFlags-04954]]
6691e5c31af7Sopenharmony_ci    If ename:VK_ACCELERATION_STRUCTURE_CREATE_MOTION_BIT_NV is set in
6692e5c31af7Sopenharmony_ci    pname:createFlags and pname:type is
6693e5c31af7Sopenharmony_ci    ename:VK_ACCELERATION_STRUCTURE_TYPE_TOP_LEVEL_KHR, one member of the
6694e5c31af7Sopenharmony_ci    pname:pNext chain must: be a pointer to a valid instance of
6695e5c31af7Sopenharmony_ci    slink:VkAccelerationStructureMotionInfoNV
6696e5c31af7Sopenharmony_ci  * [[VUID-VkAccelerationStructureCreateInfoKHR-createFlags-04955]]
6697e5c31af7Sopenharmony_ci    If any geometry includes
6698e5c31af7Sopenharmony_ci    sname:VkAccelerationStructureGeometryMotionTrianglesDataNV then
6699e5c31af7Sopenharmony_ci    pname:createFlags must: contain
6700e5c31af7Sopenharmony_ci    ename:VK_ACCELERATION_STRUCTURE_CREATE_MOTION_BIT_NV
6701e5c31af7Sopenharmony_ciendif::VK_NV_ray_tracing_motion_blur[]
6702e5c31af7Sopenharmony_ciifdef::VK_EXT_descriptor_buffer[]
6703e5c31af7Sopenharmony_ci  * [[VUID-VkAccelerationStructureCreateInfoKHR-createFlags-08108]]
6704e5c31af7Sopenharmony_ci    If pname:createFlags includes
6705e5c31af7Sopenharmony_ci    ename:VK_ACCELERATION_STRUCTURE_CREATE_DESCRIPTOR_BUFFER_CAPTURE_REPLAY_BIT_EXT,
6706e5c31af7Sopenharmony_ci    the <<features-descriptorBufferCaptureReplay,
6707e5c31af7Sopenharmony_ci    pname:descriptorBufferCaptureReplay>> feature must: be enabled
6708e5c31af7Sopenharmony_ci  * [[VUID-VkAccelerationStructureCreateInfoKHR-pNext-08109]]
6709e5c31af7Sopenharmony_ci    If the pname:pNext chain includes a
6710e5c31af7Sopenharmony_ci    slink:VkOpaqueCaptureDescriptorDataCreateInfoEXT structure,
6711e5c31af7Sopenharmony_ci    pname:createFlags must: contain
6712e5c31af7Sopenharmony_ci    ename:VK_ACCELERATION_STRUCTURE_CREATE_DESCRIPTOR_BUFFER_CAPTURE_REPLAY_BIT_EXT
6713e5c31af7Sopenharmony_ciendif::VK_EXT_descriptor_buffer[]
6714e5c31af7Sopenharmony_ci****
6715e5c31af7Sopenharmony_ci
6716e5c31af7Sopenharmony_ciinclude::{generated}/validity/structs/VkAccelerationStructureCreateInfoKHR.adoc[]
6717e5c31af7Sopenharmony_ci--
6718e5c31af7Sopenharmony_ci
6719e5c31af7Sopenharmony_ciifdef::VK_NV_ray_tracing_motion_blur[]
6720e5c31af7Sopenharmony_ci[open,refpage='VkAccelerationStructureMotionInfoNV',desc='Structure specifying the parameters of a newly created acceleration structure object',type='structs']
6721e5c31af7Sopenharmony_ci--
6722e5c31af7Sopenharmony_ci:refpage: VkAccelerationStructureMotionInfoNV
6723e5c31af7Sopenharmony_ci
6724e5c31af7Sopenharmony_ciThe sname:VkAccelerationStructureMotionInfoNV structure is defined as:
6725e5c31af7Sopenharmony_ci
6726e5c31af7Sopenharmony_ciinclude::{generated}/api/structs/VkAccelerationStructureMotionInfoNV.adoc[]
6727e5c31af7Sopenharmony_ci
6728e5c31af7Sopenharmony_ci  * pname:sType is a elink:VkStructureType value identifying this structure.
6729e5c31af7Sopenharmony_ci  * pname:pNext is `NULL` or a pointer to a structure extending this
6730e5c31af7Sopenharmony_ci    structure.
6731e5c31af7Sopenharmony_ci  * pname:maxInstances is the maximum number of instances that may: be used
6732e5c31af7Sopenharmony_ci    in the motion top-level acceleration structure.
6733e5c31af7Sopenharmony_ci  * pname:flags is 0 and reserved for future use.
6734e5c31af7Sopenharmony_ci
6735e5c31af7Sopenharmony_ciinclude::{generated}/validity/structs/VkAccelerationStructureMotionInfoNV.adoc[]
6736e5c31af7Sopenharmony_ci--
6737e5c31af7Sopenharmony_ci
6738e5c31af7Sopenharmony_ci[open,refpage='VkAccelerationStructureMotionInfoFlagsNV',desc='Reserved for future use',type='flags']
6739e5c31af7Sopenharmony_ci--
6740e5c31af7Sopenharmony_ciinclude::{generated}/api/flags/VkAccelerationStructureMotionInfoFlagsNV.adoc[]
6741e5c31af7Sopenharmony_ci
6742e5c31af7Sopenharmony_citname:VkAccelerationStructureMotionInfoFlagsNV is a bitmask type for setting
6743e5c31af7Sopenharmony_cia mask, but is currently reserved for future use.
6744e5c31af7Sopenharmony_ci--
6745e5c31af7Sopenharmony_ciendif::VK_NV_ray_tracing_motion_blur[]
6746e5c31af7Sopenharmony_ci
6747e5c31af7Sopenharmony_ci[open,refpage='vkGetAccelerationStructureBuildSizesKHR',desc='Retrieve the required size for an acceleration structure',type='protos']
6748e5c31af7Sopenharmony_ci--
6749e5c31af7Sopenharmony_ci:refpage: vkGetAccelerationStructureBuildSizesKHR
6750e5c31af7Sopenharmony_ci
6751e5c31af7Sopenharmony_ciTo get the build sizes for an acceleration structure, call:
6752e5c31af7Sopenharmony_ci
6753e5c31af7Sopenharmony_ciinclude::{generated}/api/protos/vkGetAccelerationStructureBuildSizesKHR.adoc[]
6754e5c31af7Sopenharmony_ci
6755e5c31af7Sopenharmony_ci  * pname:device is the logical device that will be used for creating the
6756e5c31af7Sopenharmony_ci    acceleration structure.
6757e5c31af7Sopenharmony_ci  * pname:buildType defines whether host or device operations (or both) are
6758e5c31af7Sopenharmony_ci    being queried for.
6759e5c31af7Sopenharmony_ci  * pname:pBuildInfo is a pointer to a
6760e5c31af7Sopenharmony_ci    slink:VkAccelerationStructureBuildGeometryInfoKHR structure describing
6761e5c31af7Sopenharmony_ci    parameters of a build operation.
6762e5c31af7Sopenharmony_ci  * pname:pMaxPrimitiveCounts is a pointer to an array of
6763e5c31af7Sopenharmony_ci    pname:pBuildInfo->geometryCount code:uint32_t values defining the number
6764e5c31af7Sopenharmony_ci    of primitives built into each geometry.
6765e5c31af7Sopenharmony_ci  * pname:pSizeInfo is a pointer to a
6766e5c31af7Sopenharmony_ci    slink:VkAccelerationStructureBuildSizesInfoKHR structure which returns
6767e5c31af7Sopenharmony_ci    the size required for an acceleration structure and the sizes required
6768e5c31af7Sopenharmony_ci    for the scratch buffers, given the build parameters.
6769e5c31af7Sopenharmony_ci
6770e5c31af7Sopenharmony_ciThe pname:srcAccelerationStructure, pname:dstAccelerationStructure, and
6771e5c31af7Sopenharmony_cipname:mode members of pname:pBuildInfo are ignored.
6772e5c31af7Sopenharmony_ciAny slink:VkDeviceOrHostAddressKHR or slink:VkDeviceOrHostAddressConstKHR
6773e5c31af7Sopenharmony_cimembers of pname:pBuildInfo are ignored by this command, except that the
6774e5c31af7Sopenharmony_cipname:hostAddress member of
6775e5c31af7Sopenharmony_cislink:VkAccelerationStructureGeometryTrianglesDataKHR::pname:transformData
6776e5c31af7Sopenharmony_ciwill be examined to check if it is `NULL`.
6777e5c31af7Sopenharmony_ci
6778e5c31af7Sopenharmony_ciAn acceleration structure created with the pname:accelerationStructureSize
6779e5c31af7Sopenharmony_cireturned by this command supports any build or update with a
6780e5c31af7Sopenharmony_cislink:VkAccelerationStructureBuildGeometryInfoKHR structure and array of
6781e5c31af7Sopenharmony_cislink:VkAccelerationStructureBuildRangeInfoKHR structures subject to the
6782e5c31af7Sopenharmony_cifollowing properties:
6783e5c31af7Sopenharmony_ci
6784e5c31af7Sopenharmony_ci  * The build command is a host build command, and pname:buildType is
6785e5c31af7Sopenharmony_ci    ename:VK_ACCELERATION_STRUCTURE_BUILD_TYPE_HOST_KHR or
6786e5c31af7Sopenharmony_ci    ename:VK_ACCELERATION_STRUCTURE_BUILD_TYPE_HOST_OR_DEVICE_KHR
6787e5c31af7Sopenharmony_ci  * The build command is a device build command, and pname:buildType is
6788e5c31af7Sopenharmony_ci    ename:VK_ACCELERATION_STRUCTURE_BUILD_TYPE_DEVICE_KHR or
6789e5c31af7Sopenharmony_ci    ename:VK_ACCELERATION_STRUCTURE_BUILD_TYPE_HOST_OR_DEVICE_KHR
6790e5c31af7Sopenharmony_ci  * For slink:VkAccelerationStructureBuildGeometryInfoKHR:
6791e5c31af7Sopenharmony_ci  ** Its pname:type, and pname:flags members are equal to
6792e5c31af7Sopenharmony_ci     pname:pBuildInfo->type and pname:pBuildInfo->flags, respectively.
6793e5c31af7Sopenharmony_ci  ** pname:geometryCount is less than or equal to
6794e5c31af7Sopenharmony_ci     pname:pBuildInfo->geometryCount.
6795e5c31af7Sopenharmony_ci  ** For each element of either pname:pGeometries or pname:ppGeometries at a
6796e5c31af7Sopenharmony_ci     given index, its pname:geometryType member is equal to
6797e5c31af7Sopenharmony_ci     pname:pBuildInfo->geometryType.
6798e5c31af7Sopenharmony_ci  ** For each element of either pname:pGeometries or pname:ppGeometries at a
6799e5c31af7Sopenharmony_ci     given index, its pname:flags member is equal to the corresponding
6800e5c31af7Sopenharmony_ci     member of the same element in pname:pBuildInfo.
6801e5c31af7Sopenharmony_ci  ** For each element of either pname:pGeometries or pname:ppGeometries at a
6802e5c31af7Sopenharmony_ci     given index, with a pname:geometryType member equal to
6803e5c31af7Sopenharmony_ci     ename:VK_GEOMETRY_TYPE_TRIANGLES_KHR, the pname:vertexFormat and
6804e5c31af7Sopenharmony_ci     pname:indexType members of pname:geometry.triangles are equal to the
6805e5c31af7Sopenharmony_ci     corresponding members of the same element in pname:pBuildInfo.
6806e5c31af7Sopenharmony_ci  ** For each element of either pname:pGeometries or pname:ppGeometries at a
6807e5c31af7Sopenharmony_ci     given index, with a pname:geometryType member equal to
6808e5c31af7Sopenharmony_ci     ename:VK_GEOMETRY_TYPE_TRIANGLES_KHR, the pname:maxVertex member of
6809e5c31af7Sopenharmony_ci     pname:geometry.triangles is less than or equal to the corresponding
6810e5c31af7Sopenharmony_ci     member of the same element in pname:pBuildInfo.
6811e5c31af7Sopenharmony_ci  ** For each element of either pname:pGeometries or pname:ppGeometries at a
6812e5c31af7Sopenharmony_ci     given index, with a pname:geometryType member equal to
6813e5c31af7Sopenharmony_ci     ename:VK_GEOMETRY_TYPE_TRIANGLES_KHR, if the applicable address in the
6814e5c31af7Sopenharmony_ci     pname:transformData member of pname:geometry.triangles is not `NULL`,
6815e5c31af7Sopenharmony_ci     the corresponding pname:transformData.hostAddress parameter in
6816e5c31af7Sopenharmony_ci     pname:pBuildInfo is not `NULL`.
6817e5c31af7Sopenharmony_ci  * For each slink:VkAccelerationStructureBuildRangeInfoKHR corresponding to
6818e5c31af7Sopenharmony_ci    the slink:VkAccelerationStructureBuildGeometryInfoKHR:
6819e5c31af7Sopenharmony_ci  ** Its pname:primitiveCount member is less than or equal to the
6820e5c31af7Sopenharmony_ci     corresponding element of pname:pMaxPrimitiveCounts.
6821e5c31af7Sopenharmony_ciifdef::VK_EXT_opacity_micromap[]
6822e5c31af7Sopenharmony_ci  ** For each element of either pname:pGeometries or pname:ppGeometries at a
6823e5c31af7Sopenharmony_ci     given index, with a pname:geometryType member equal to
6824e5c31af7Sopenharmony_ci     ename:VK_GEOMETRY_TYPE_TRIANGLES_KHR, if the pname:pNext chain contains
6825e5c31af7Sopenharmony_ci     slink:VkAccelerationStructureTrianglesOpacityMicromapEXT the
6826e5c31af7Sopenharmony_ci     corresponding member of pname:pBuildInfo also contains
6827e5c31af7Sopenharmony_ci     slink:VkAccelerationStructureTrianglesOpacityMicromapEXT and with an
6828e5c31af7Sopenharmony_ci     equivalent pname:micromap.
6829e5c31af7Sopenharmony_ciendif::VK_EXT_opacity_micromap[]
6830e5c31af7Sopenharmony_ciifdef::VK_NV_displacement_micromap[]
6831e5c31af7Sopenharmony_ci  ** For each element of either pname:pGeometries or pname:ppGeometries at a
6832e5c31af7Sopenharmony_ci     given index, with a pname:geometryType member equal to
6833e5c31af7Sopenharmony_ci     ename:VK_GEOMETRY_TYPE_TRIANGLES_KHR, if the pname:pNext chain contains
6834e5c31af7Sopenharmony_ci     slink:VkAccelerationStructureTrianglesDisplacementMicromapNV the
6835e5c31af7Sopenharmony_ci     corresponding member of pname:pBuildInfo also contains
6836e5c31af7Sopenharmony_ci     slink:VkAccelerationStructureTrianglesDisplacementMicromapNV and with
6837e5c31af7Sopenharmony_ci     an equivalent pname:micromap.
6838e5c31af7Sopenharmony_ciendif::VK_NV_displacement_micromap[]
6839e5c31af7Sopenharmony_ci
6840e5c31af7Sopenharmony_ciSimilarly, the pname:updateScratchSize value will support any build command
6841e5c31af7Sopenharmony_cispecifying the ename:VK_BUILD_ACCELERATION_STRUCTURE_MODE_UPDATE_KHR
6842e5c31af7Sopenharmony_cipname:mode under the above conditions, and the pname:buildScratchSize value
6843e5c31af7Sopenharmony_ciwill support any build command specifying the
6844e5c31af7Sopenharmony_ciename:VK_BUILD_ACCELERATION_STRUCTURE_MODE_BUILD_KHR pname:mode under the
6845e5c31af7Sopenharmony_ciabove conditions.
6846e5c31af7Sopenharmony_ci
6847e5c31af7Sopenharmony_ci.Valid Usage
6848e5c31af7Sopenharmony_ci****
6849e5c31af7Sopenharmony_ci  * [[VUID-vkGetAccelerationStructureBuildSizesKHR-accelerationStructure-08933]]
6850e5c31af7Sopenharmony_ci    The <<features-accelerationStructure,
6851e5c31af7Sopenharmony_ci    sname:VkPhysicalDeviceAccelerationStructureFeaturesKHR::pname:accelerationStructure>>
6852e5c31af7Sopenharmony_ci    feature must: be enabled
6853e5c31af7Sopenharmony_ci  * [[VUID-vkGetAccelerationStructureBuildSizesKHR-device-03618]]
6854e5c31af7Sopenharmony_ci    If pname:device was created with multiple physical devices, then the
6855e5c31af7Sopenharmony_ci    <<features-bufferDeviceAddressMultiDevice,
6856e5c31af7Sopenharmony_ci    pname:bufferDeviceAddressMultiDevice>> feature must: be enabled
6857e5c31af7Sopenharmony_ci  * [[VUID-vkGetAccelerationStructureBuildSizesKHR-pBuildInfo-03619]]
6858e5c31af7Sopenharmony_ci    If pname:pBuildInfo->geometryCount is not `0`, pname:pMaxPrimitiveCounts
6859e5c31af7Sopenharmony_ci    must: be a valid pointer to an array of pname:pBuildInfo->geometryCount
6860e5c31af7Sopenharmony_ci    code:uint32_t values
6861e5c31af7Sopenharmony_ci  * [[VUID-vkGetAccelerationStructureBuildSizesKHR-pBuildInfo-03785]]
6862e5c31af7Sopenharmony_ci    If pname:pBuildInfo->pGeometries or pname:pBuildInfo->ppGeometries has a
6863e5c31af7Sopenharmony_ci    pname:geometryType of ename:VK_GEOMETRY_TYPE_INSTANCES_KHR, each
6864e5c31af7Sopenharmony_ci    pname:pMaxPrimitiveCounts[i] must: be less than or equal to
6865e5c31af7Sopenharmony_ci    slink:VkPhysicalDeviceAccelerationStructurePropertiesKHR::pname:maxInstanceCount
6866e5c31af7Sopenharmony_ci****
6867e5c31af7Sopenharmony_ci
6868e5c31af7Sopenharmony_ciinclude::{generated}/validity/protos/vkGetAccelerationStructureBuildSizesKHR.adoc[]
6869e5c31af7Sopenharmony_ci--
6870e5c31af7Sopenharmony_ci
6871e5c31af7Sopenharmony_ci[open,refpage='VkAccelerationStructureBuildSizesInfoKHR',desc='Structure specifying build sizes for an acceleration structure',type='structs']
6872e5c31af7Sopenharmony_ci--
6873e5c31af7Sopenharmony_ci:refpage: VkAccelerationStructureBuildSizesInfoKHR
6874e5c31af7Sopenharmony_ci
6875e5c31af7Sopenharmony_ciThe sname:VkAccelerationStructureBuildSizesInfoKHR structure describes the
6876e5c31af7Sopenharmony_cirequired build sizes for an acceleration structure and scratch buffers and
6877e5c31af7Sopenharmony_ciis defined as:
6878e5c31af7Sopenharmony_ci
6879e5c31af7Sopenharmony_ciinclude::{generated}/api/structs/VkAccelerationStructureBuildSizesInfoKHR.adoc[]
6880e5c31af7Sopenharmony_ci
6881e5c31af7Sopenharmony_ci  * pname:sType is a elink:VkStructureType value identifying this structure.
6882e5c31af7Sopenharmony_ci  * pname:pNext is `NULL` or a pointer to a structure extending this
6883e5c31af7Sopenharmony_ci    structure.
6884e5c31af7Sopenharmony_ci  * pname:accelerationStructureSize is the size in bytes required in a
6885e5c31af7Sopenharmony_ci    slink:VkAccelerationStructureKHR for a build or update operation.
6886e5c31af7Sopenharmony_ci  * pname:updateScratchSize is the size in bytes required in a scratch
6887e5c31af7Sopenharmony_ci    buffer for an update operation.
6888e5c31af7Sopenharmony_ci  * pname:buildScratchSize is the size in bytes required in a scratch buffer
6889e5c31af7Sopenharmony_ci    for a build operation.
6890e5c31af7Sopenharmony_ci
6891e5c31af7Sopenharmony_ciinclude::{generated}/validity/structs/VkAccelerationStructureBuildSizesInfoKHR.adoc[]
6892e5c31af7Sopenharmony_ci--
6893e5c31af7Sopenharmony_ciendif::VK_KHR_acceleration_structure[]
6894e5c31af7Sopenharmony_ci
6895e5c31af7Sopenharmony_ci[open,refpage='VkAccelerationStructureTypeKHR',desc='Type of acceleration structure',type='enums',alias='VkAccelerationStructureTypeNV']
6896e5c31af7Sopenharmony_ci--
6897e5c31af7Sopenharmony_ci:refpage: VkAccelerationStructureTypeKHR
6898e5c31af7Sopenharmony_ci
6899e5c31af7Sopenharmony_ciValues which can: be set in
6900e5c31af7Sopenharmony_ciifdef::VK_KHR_acceleration_structure[]
6901e5c31af7Sopenharmony_cislink:VkAccelerationStructureCreateInfoKHR::pname:type
6902e5c31af7Sopenharmony_ciendif::VK_KHR_acceleration_structure[]
6903e5c31af7Sopenharmony_ciifdef::VK_KHR_acceleration_structure+VK_NV_ray_tracing[or]
6904e5c31af7Sopenharmony_ciifdef::VK_NV_ray_tracing[]
6905e5c31af7Sopenharmony_cislink:VkAccelerationStructureInfoNV::pname:type
6906e5c31af7Sopenharmony_ciendif::VK_NV_ray_tracing[]
6907e5c31af7Sopenharmony_cispecifying the type of acceleration structure, are:
6908e5c31af7Sopenharmony_ci
6909e5c31af7Sopenharmony_ciinclude::{generated}/api/enums/VkAccelerationStructureTypeKHR.adoc[]
6910e5c31af7Sopenharmony_ci
6911e5c31af7Sopenharmony_ciifdef::VK_NV_ray_tracing[]
6912e5c31af7Sopenharmony_cior the equivalent
6913e5c31af7Sopenharmony_ci
6914e5c31af7Sopenharmony_ciinclude::{generated}/api/enums/VkAccelerationStructureTypeNV.adoc[]
6915e5c31af7Sopenharmony_ciendif::VK_NV_ray_tracing[]
6916e5c31af7Sopenharmony_ci
6917e5c31af7Sopenharmony_ci  * ename:VK_ACCELERATION_STRUCTURE_TYPE_TOP_LEVEL_KHR is a top-level
6918e5c31af7Sopenharmony_ci    acceleration structure containing instance data referring to
6919e5c31af7Sopenharmony_ci    bottom-level acceleration structures.
6920e5c31af7Sopenharmony_ci  * ename:VK_ACCELERATION_STRUCTURE_TYPE_BOTTOM_LEVEL_KHR is a bottom-level
6921e5c31af7Sopenharmony_ci    acceleration structure containing the AABBs or geometry to be
6922e5c31af7Sopenharmony_ci    intersected.
6923e5c31af7Sopenharmony_ci  * ename:VK_ACCELERATION_STRUCTURE_TYPE_GENERIC_KHR is an acceleration
6924e5c31af7Sopenharmony_ci    structure whose type is determined at build time used for special
6925e5c31af7Sopenharmony_ci    circumstances.
6926e5c31af7Sopenharmony_ci    In these cases, the acceleration structure type is not known at creation
6927e5c31af7Sopenharmony_ci    time, but must: be specified at build time as either top or bottom.
6928e5c31af7Sopenharmony_ci--
6929e5c31af7Sopenharmony_ci
6930e5c31af7Sopenharmony_ciifdef::VK_KHR_acceleration_structure[]
6931e5c31af7Sopenharmony_ci[open,refpage='VkAccelerationStructureCreateFlagBitsKHR',desc='Bitmask specifying additional creation parameters for acceleration structure',type='enums']
6932e5c31af7Sopenharmony_ci--
6933e5c31af7Sopenharmony_ciBits which can: be set in
6934e5c31af7Sopenharmony_cislink:VkAccelerationStructureCreateInfoKHR::pname:createFlags, specifying
6935e5c31af7Sopenharmony_ciadditional creation parameters for acceleration structures, are:
6936e5c31af7Sopenharmony_ci
6937e5c31af7Sopenharmony_ciinclude::{generated}/api/enums/VkAccelerationStructureCreateFlagBitsKHR.adoc[]
6938e5c31af7Sopenharmony_ci
6939e5c31af7Sopenharmony_ci  * ename:VK_ACCELERATION_STRUCTURE_CREATE_DEVICE_ADDRESS_CAPTURE_REPLAY_BIT_KHR
6940e5c31af7Sopenharmony_ci    specifies that the acceleration structure's address can: be saved and
6941e5c31af7Sopenharmony_ci    reused on a subsequent run.
6942e5c31af7Sopenharmony_ciifdef::VK_EXT_descriptor_buffer[]
6943e5c31af7Sopenharmony_ci  * ename:VK_ACCELERATION_STRUCTURE_CREATE_DESCRIPTOR_BUFFER_CAPTURE_REPLAY_BIT_EXT
6944e5c31af7Sopenharmony_ci    specifies that the acceleration structure can: be used with descriptor
6945e5c31af7Sopenharmony_ci    buffers when capturing and replaying (e.g. for trace capture and
6946e5c31af7Sopenharmony_ci    replay), see slink:VkOpaqueCaptureDescriptorDataCreateInfoEXT for more
6947e5c31af7Sopenharmony_ci    detail.
6948e5c31af7Sopenharmony_ciendif::VK_EXT_descriptor_buffer[]
6949e5c31af7Sopenharmony_ci--
6950e5c31af7Sopenharmony_ci
6951e5c31af7Sopenharmony_ci[open,refpage='VkAccelerationStructureCreateFlagsKHR',desc='Bitmask of VkAccelerationStructureCreateFlagBitsKHR',type='flags']
6952e5c31af7Sopenharmony_ci--
6953e5c31af7Sopenharmony_ciinclude::{generated}/api/flags/VkAccelerationStructureCreateFlagsKHR.adoc[]
6954e5c31af7Sopenharmony_ci
6955e5c31af7Sopenharmony_citname:VkAccelerationStructureCreateFlagsKHR is a bitmask type for setting a
6956e5c31af7Sopenharmony_cimask of zero or more elink:VkAccelerationStructureCreateFlagBitsKHR.
6957e5c31af7Sopenharmony_ci--
6958e5c31af7Sopenharmony_ciendif::VK_KHR_acceleration_structure[]
6959e5c31af7Sopenharmony_ci
6960e5c31af7Sopenharmony_ci[open,refpage='VkBuildAccelerationStructureFlagBitsKHR',desc='Bitmask specifying additional parameters for acceleration structure builds',type='enums',alias='VkBuildAccelerationStructureFlagBitsNV']
6961e5c31af7Sopenharmony_ci--
6962e5c31af7Sopenharmony_ci:refpage: VkBuildAccelerationStructureFlagBitsKHR
6963e5c31af7Sopenharmony_ci
6964e5c31af7Sopenharmony_ciBits which can: be set in
6965e5c31af7Sopenharmony_ciifdef::VK_KHR_acceleration_structure[]
6966e5c31af7Sopenharmony_cislink:VkAccelerationStructureBuildGeometryInfoKHR::pname:flags
6967e5c31af7Sopenharmony_ciendif::VK_KHR_acceleration_structure[]
6968e5c31af7Sopenharmony_ciifdef::VK_KHR_acceleration_structure+VK_NV_ray_tracing[or]
6969e5c31af7Sopenharmony_ciifdef::VK_NV_ray_tracing[]
6970e5c31af7Sopenharmony_cislink:VkAccelerationStructureInfoNV::pname:flags
6971e5c31af7Sopenharmony_ciendif::VK_NV_ray_tracing[]
6972e5c31af7Sopenharmony_cispecifying additional parameters for acceleration structure builds, are:
6973e5c31af7Sopenharmony_ci
6974e5c31af7Sopenharmony_ciinclude::{generated}/api/enums/VkBuildAccelerationStructureFlagBitsKHR.adoc[]
6975e5c31af7Sopenharmony_ci
6976e5c31af7Sopenharmony_ciifdef::VK_NV_ray_tracing[]
6977e5c31af7Sopenharmony_cior the equivalent
6978e5c31af7Sopenharmony_ci
6979e5c31af7Sopenharmony_ciinclude::{generated}/api/enums/VkBuildAccelerationStructureFlagBitsNV.adoc[]
6980e5c31af7Sopenharmony_ciendif::VK_NV_ray_tracing[]
6981e5c31af7Sopenharmony_ci
6982e5c31af7Sopenharmony_ci  * ename:VK_BUILD_ACCELERATION_STRUCTURE_ALLOW_UPDATE_BIT_KHR indicates
6983e5c31af7Sopenharmony_ci    that the specified acceleration structure can: be updated with
6984e5c31af7Sopenharmony_ciifdef::VK_KHR_acceleration_structure[]
6985e5c31af7Sopenharmony_ci    a pname:mode of ename:VK_BUILD_ACCELERATION_STRUCTURE_MODE_UPDATE_KHR in
6986e5c31af7Sopenharmony_ci    slink:VkAccelerationStructureBuildGeometryInfoKHR
6987e5c31af7Sopenharmony_ciendif::VK_KHR_acceleration_structure[]
6988e5c31af7Sopenharmony_ciifdef::VK_KHR_acceleration_structure+VK_NV_ray_tracing[or]
6989e5c31af7Sopenharmony_ciifdef::VK_NV_ray_tracing[]
6990e5c31af7Sopenharmony_ci    an pname:update of ename:VK_TRUE in
6991e5c31af7Sopenharmony_ci    flink:vkCmdBuildAccelerationStructureNV
6992e5c31af7Sopenharmony_ciendif::VK_NV_ray_tracing[]
6993e5c31af7Sopenharmony_ci    .
6994e5c31af7Sopenharmony_ci  * ename:VK_BUILD_ACCELERATION_STRUCTURE_ALLOW_COMPACTION_BIT_KHR indicates
6995e5c31af7Sopenharmony_ci    that the specified acceleration structure can: act as the source for a
6996e5c31af7Sopenharmony_ci    copy acceleration structure command with pname:mode of
6997e5c31af7Sopenharmony_ci    ename:VK_COPY_ACCELERATION_STRUCTURE_MODE_COMPACT_KHR to produce a
6998e5c31af7Sopenharmony_ci    compacted acceleration structure.
6999e5c31af7Sopenharmony_ci  * ename:VK_BUILD_ACCELERATION_STRUCTURE_PREFER_FAST_TRACE_BIT_KHR
7000e5c31af7Sopenharmony_ci    indicates that the given acceleration structure build should: prioritize
7001e5c31af7Sopenharmony_ci    trace performance over build time.
7002e5c31af7Sopenharmony_ci  * ename:VK_BUILD_ACCELERATION_STRUCTURE_PREFER_FAST_BUILD_BIT_KHR
7003e5c31af7Sopenharmony_ci    indicates that the given acceleration structure build should: prioritize
7004e5c31af7Sopenharmony_ci    build time over trace performance.
7005e5c31af7Sopenharmony_ci  * ename:VK_BUILD_ACCELERATION_STRUCTURE_LOW_MEMORY_BIT_KHR indicates that
7006e5c31af7Sopenharmony_ci    this acceleration structure should: minimize the size of the scratch
7007e5c31af7Sopenharmony_ci    memory and the final result acceleration structure, potentially at the
7008e5c31af7Sopenharmony_ci    expense of build time or trace performance.
7009e5c31af7Sopenharmony_ciifdef::VK_EXT_opacity_micromap[]
7010e5c31af7Sopenharmony_ci  * ename:VK_BUILD_ACCELERATION_STRUCTURE_ALLOW_OPACITY_MICROMAP_UPDATE_EXT
7011e5c31af7Sopenharmony_ci    indicates that the opacity micromaps associated with the specified
7012e5c31af7Sopenharmony_ci    acceleration structure may: change with an acceleration structure
7013e5c31af7Sopenharmony_ci    update.
7014e5c31af7Sopenharmony_ci  * ename:VK_BUILD_ACCELERATION_STRUCTURE_ALLOW_OPACITY_MICROMAP_DATA_UPDATE_EXT
7015e5c31af7Sopenharmony_ci    indicates that the data of the opacity micromaps associated with the
7016e5c31af7Sopenharmony_ci    specified acceleration structure may: change with an acceleration
7017e5c31af7Sopenharmony_ci    structure update.
7018e5c31af7Sopenharmony_ci  * ename:VK_BUILD_ACCELERATION_STRUCTURE_ALLOW_DISABLE_OPACITY_MICROMAPS_EXT
7019e5c31af7Sopenharmony_ci    indicates that the specified acceleration structure may: be referenced
7020e5c31af7Sopenharmony_ci    in an instance with
7021e5c31af7Sopenharmony_ci    ename:VK_GEOMETRY_INSTANCE_DISABLE_OPACITY_MICROMAPS_EXT set.
7022e5c31af7Sopenharmony_ciendif::VK_EXT_opacity_micromap[]
7023e5c31af7Sopenharmony_ciifdef::VK_KHR_ray_tracing_position_fetch[]
7024e5c31af7Sopenharmony_ci  * ename:VK_BUILD_ACCELERATION_STRUCTURE_ALLOW_DATA_ACCESS_KHR indicates
7025e5c31af7Sopenharmony_ci    that the specified acceleration structure can: be used when fetching the
7026e5c31af7Sopenharmony_ci    vertex positions of a hit triangle.
7027e5c31af7Sopenharmony_ciendif::VK_KHR_ray_tracing_position_fetch[]
7028e5c31af7Sopenharmony_ciifdef::VK_NV_displacement_micromap[]
7029e5c31af7Sopenharmony_ci  * ename:VK_BUILD_ACCELERATION_STRUCTURE_ALLOW_DISPLACEMENT_MICROMAP_UPDATE_NV
7030e5c31af7Sopenharmony_ci    indicates that the displacement micromaps associated with the specified
7031e5c31af7Sopenharmony_ci    acceleration structure may: change with an acceleration structure
7032e5c31af7Sopenharmony_ci    update.
7033e5c31af7Sopenharmony_ciendif::VK_NV_displacement_micromap[]
7034e5c31af7Sopenharmony_ci
7035e5c31af7Sopenharmony_ci[NOTE]
7036e5c31af7Sopenharmony_ci.Note
7037e5c31af7Sopenharmony_ci====
7038e5c31af7Sopenharmony_ciename:VK_BUILD_ACCELERATION_STRUCTURE_ALLOW_UPDATE_BIT_KHR and
7039e5c31af7Sopenharmony_ciename:VK_BUILD_ACCELERATION_STRUCTURE_ALLOW_COMPACTION_BIT_KHR may: take
7040e5c31af7Sopenharmony_cimore time and memory than a normal build, and so should: only be used when
7041e5c31af7Sopenharmony_cithose features are needed.
7042e5c31af7Sopenharmony_ci====
7043e5c31af7Sopenharmony_ci--
7044e5c31af7Sopenharmony_ci
7045e5c31af7Sopenharmony_ci[open,refpage='VkBuildAccelerationStructureFlagsKHR',desc='Bitmask of VkBuildAccelerationStructureFlagBitsKHR',type='flags',alias='VkBuildAccelerationStructureFlagsNV']
7046e5c31af7Sopenharmony_ci--
7047e5c31af7Sopenharmony_ci:refpage: VkBuildAccelerationStructureFlagsKHR
7048e5c31af7Sopenharmony_ci
7049e5c31af7Sopenharmony_ciinclude::{generated}/api/flags/VkBuildAccelerationStructureFlagsKHR.adoc[]
7050e5c31af7Sopenharmony_ci
7051e5c31af7Sopenharmony_ciifdef::VK_NV_ray_tracing[]
7052e5c31af7Sopenharmony_cior the equivalent
7053e5c31af7Sopenharmony_ci
7054e5c31af7Sopenharmony_ciinclude::{generated}/api/flags/VkBuildAccelerationStructureFlagsNV.adoc[]
7055e5c31af7Sopenharmony_ciendif::VK_NV_ray_tracing[]
7056e5c31af7Sopenharmony_ci
7057e5c31af7Sopenharmony_citname:VkBuildAccelerationStructureFlagsKHR is a bitmask type for setting a
7058e5c31af7Sopenharmony_cimask of zero or more elink:VkBuildAccelerationStructureFlagBitsKHR.
7059e5c31af7Sopenharmony_ci--
7060e5c31af7Sopenharmony_ci
7061e5c31af7Sopenharmony_ciifdef::VK_NV_ray_tracing[]
7062e5c31af7Sopenharmony_ci[open,refpage='VkGeometryNV',desc='Structure specifying a geometry in a bottom-level acceleration structure',type='structs']
7063e5c31af7Sopenharmony_ci--
7064e5c31af7Sopenharmony_ci:refpage: VkGeometryNV
7065e5c31af7Sopenharmony_ci
7066e5c31af7Sopenharmony_ciThe sname:VkGeometryNV structure describes geometry in a bottom-level
7067e5c31af7Sopenharmony_ciacceleration structure and is defined as:
7068e5c31af7Sopenharmony_ci
7069e5c31af7Sopenharmony_ciinclude::{generated}/api/structs/VkGeometryNV.adoc[]
7070e5c31af7Sopenharmony_ci
7071e5c31af7Sopenharmony_ci  * pname:sType is a elink:VkStructureType value identifying this structure.
7072e5c31af7Sopenharmony_ci  * pname:pNext is `NULL` or a pointer to a structure extending this
7073e5c31af7Sopenharmony_ci    structure.
7074e5c31af7Sopenharmony_ci  * pname:geometryType specifies the elink:VkGeometryTypeKHR which this
7075e5c31af7Sopenharmony_ci    geometry refers to.
7076e5c31af7Sopenharmony_ci  * pname:geometry contains the geometry data as described in
7077e5c31af7Sopenharmony_ci    slink:VkGeometryDataNV.
7078e5c31af7Sopenharmony_ci  * pname:flags has elink:VkGeometryFlagBitsKHR describing options for this
7079e5c31af7Sopenharmony_ci    geometry.
7080e5c31af7Sopenharmony_ci
7081e5c31af7Sopenharmony_ci.Valid Usage
7082e5c31af7Sopenharmony_ci****
7083e5c31af7Sopenharmony_ci  * [[VUID-VkGeometryNV-geometryType-03503]]
7084e5c31af7Sopenharmony_ci    pname:geometryType must: be ename:VK_GEOMETRY_TYPE_TRIANGLES_NV or
7085e5c31af7Sopenharmony_ci    ename:VK_GEOMETRY_TYPE_AABBS_NV
7086e5c31af7Sopenharmony_ci****
7087e5c31af7Sopenharmony_ci
7088e5c31af7Sopenharmony_ciinclude::{generated}/validity/structs/VkGeometryNV.adoc[]
7089e5c31af7Sopenharmony_ci--
7090e5c31af7Sopenharmony_ciendif::VK_NV_ray_tracing[]
7091e5c31af7Sopenharmony_ci
7092e5c31af7Sopenharmony_ci[open,refpage='VkGeometryTypeKHR',desc='Enum specifying which type of geometry is provided',type='enums',alias='VkGeometryTypeNV']
7093e5c31af7Sopenharmony_ci--
7094e5c31af7Sopenharmony_ci:refpage: VkGeometryTypeKHR
7095e5c31af7Sopenharmony_ci
7096e5c31af7Sopenharmony_ciGeometry types are specified by elink:VkGeometryTypeKHR, which takes values:
7097e5c31af7Sopenharmony_ci
7098e5c31af7Sopenharmony_ciinclude::{generated}/api/enums/VkGeometryTypeKHR.adoc[]
7099e5c31af7Sopenharmony_ci
7100e5c31af7Sopenharmony_ciifdef::VK_NV_ray_tracing[]
7101e5c31af7Sopenharmony_cior the equivalent
7102e5c31af7Sopenharmony_ci
7103e5c31af7Sopenharmony_ciinclude::{generated}/api/enums/VkGeometryTypeNV.adoc[]
7104e5c31af7Sopenharmony_ciendif::VK_NV_ray_tracing[]
7105e5c31af7Sopenharmony_ci
7106e5c31af7Sopenharmony_ci  * ename:VK_GEOMETRY_TYPE_TRIANGLES_KHR specifies a geometry type
7107e5c31af7Sopenharmony_ci    consisting of triangles.
7108e5c31af7Sopenharmony_ci  * ename:VK_GEOMETRY_TYPE_AABBS_KHR specifies a geometry type consisting of
7109e5c31af7Sopenharmony_ci    axis-aligned bounding boxes.
7110e5c31af7Sopenharmony_ciifdef::VK_KHR_acceleration_structure[]
7111e5c31af7Sopenharmony_ci  * ename:VK_GEOMETRY_TYPE_INSTANCES_KHR specifies a geometry type
7112e5c31af7Sopenharmony_ci    consisting of acceleration structure instances.
7113e5c31af7Sopenharmony_ciendif::VK_KHR_acceleration_structure[]
7114e5c31af7Sopenharmony_ci--
7115e5c31af7Sopenharmony_ci
7116e5c31af7Sopenharmony_ci[open,refpage='VkGeometryFlagBitsKHR',desc='Bitmask specifying additional parameters for a geometry',type='enums',alias='VkGeometryFlagBitsNV']
7117e5c31af7Sopenharmony_ci--
7118e5c31af7Sopenharmony_ci:refpage: VkGeometryFlagBitsKHR
7119e5c31af7Sopenharmony_ci
7120e5c31af7Sopenharmony_ciBits specifying additional parameters for geometries in acceleration
7121e5c31af7Sopenharmony_cistructure builds, are:
7122e5c31af7Sopenharmony_ci
7123e5c31af7Sopenharmony_ciinclude::{generated}/api/enums/VkGeometryFlagBitsKHR.adoc[]
7124e5c31af7Sopenharmony_ci
7125e5c31af7Sopenharmony_ciifdef::VK_NV_ray_tracing[]
7126e5c31af7Sopenharmony_cior the equivalent
7127e5c31af7Sopenharmony_ci
7128e5c31af7Sopenharmony_ciinclude::{generated}/api/enums/VkGeometryFlagBitsNV.adoc[]
7129e5c31af7Sopenharmony_ciendif::VK_NV_ray_tracing[]
7130e5c31af7Sopenharmony_ci
7131e5c31af7Sopenharmony_ci  * ename:VK_GEOMETRY_OPAQUE_BIT_KHR indicates that this geometry does not
7132e5c31af7Sopenharmony_ci    invoke the any-hit shaders even if present in a hit group.
7133e5c31af7Sopenharmony_ci  * ename:VK_GEOMETRY_NO_DUPLICATE_ANY_HIT_INVOCATION_BIT_KHR indicates that
7134e5c31af7Sopenharmony_ci    the implementation must: only call the any-hit shader a single time for
7135e5c31af7Sopenharmony_ci    each primitive in this geometry.
7136e5c31af7Sopenharmony_ci    If this bit is absent an implementation may: invoke the any-hit shader
7137e5c31af7Sopenharmony_ci    more than once for this geometry.
7138e5c31af7Sopenharmony_ci--
7139e5c31af7Sopenharmony_ci
7140e5c31af7Sopenharmony_ci[open,refpage='VkGeometryFlagsKHR',desc='Bitmask of VkGeometryFlagBitsKHR',type='flags',alias='VkGeometryFlagsNV']
7141e5c31af7Sopenharmony_ci--
7142e5c31af7Sopenharmony_ci:refpage: VkGeometryFlagsKHR
7143e5c31af7Sopenharmony_ci
7144e5c31af7Sopenharmony_ciinclude::{generated}/api/flags/VkGeometryFlagsKHR.adoc[]
7145e5c31af7Sopenharmony_ci
7146e5c31af7Sopenharmony_ciifdef::VK_NV_ray_tracing[]
7147e5c31af7Sopenharmony_cior the equivalent
7148e5c31af7Sopenharmony_ci
7149e5c31af7Sopenharmony_ciinclude::{generated}/api/flags/VkGeometryFlagsNV.adoc[]
7150e5c31af7Sopenharmony_ciendif::VK_NV_ray_tracing[]
7151e5c31af7Sopenharmony_ci
7152e5c31af7Sopenharmony_citname:VkGeometryFlagsKHR is a bitmask type for setting a mask of zero or
7153e5c31af7Sopenharmony_cimore elink:VkGeometryFlagBitsKHR.
7154e5c31af7Sopenharmony_ci--
7155e5c31af7Sopenharmony_ci
7156e5c31af7Sopenharmony_ciifdef::VK_NV_ray_tracing[]
7157e5c31af7Sopenharmony_ci[open,refpage='VkGeometryDataNV',desc='Structure specifying geometry in a bottom-level acceleration structure',type='structs']
7158e5c31af7Sopenharmony_ci--
7159e5c31af7Sopenharmony_ci:refpage: VkGeometryDataNV
7160e5c31af7Sopenharmony_ci
7161e5c31af7Sopenharmony_ciThe sname:VkGeometryDataNV structure specifies geometry in a bottom-level
7162e5c31af7Sopenharmony_ciacceleration structure and is defined as:
7163e5c31af7Sopenharmony_ci
7164e5c31af7Sopenharmony_ciinclude::{generated}/api/structs/VkGeometryDataNV.adoc[]
7165e5c31af7Sopenharmony_ci
7166e5c31af7Sopenharmony_ci  * pname:triangles contains triangle data if
7167e5c31af7Sopenharmony_ci    slink:VkGeometryNV::pname:geometryType is
7168e5c31af7Sopenharmony_ci    ename:VK_GEOMETRY_TYPE_TRIANGLES_NV.
7169e5c31af7Sopenharmony_ci  * pname:aabbs contains axis-aligned bounding box data if
7170e5c31af7Sopenharmony_ci    slink:VkGeometryNV::pname:geometryType is
7171e5c31af7Sopenharmony_ci    ename:VK_GEOMETRY_TYPE_AABBS_NV.
7172e5c31af7Sopenharmony_ci
7173e5c31af7Sopenharmony_ciinclude::{generated}/validity/structs/VkGeometryDataNV.adoc[]
7174e5c31af7Sopenharmony_ci--
7175e5c31af7Sopenharmony_ci
7176e5c31af7Sopenharmony_ci[open,refpage='VkGeometryTrianglesNV',desc='Structure specifying a triangle geometry in a bottom-level acceleration structure',type='structs']
7177e5c31af7Sopenharmony_ci--
7178e5c31af7Sopenharmony_ci:refpage: VkGeometryTrianglesNV
7179e5c31af7Sopenharmony_ci
7180e5c31af7Sopenharmony_ciThe sname:VkGeometryTrianglesNV structure specifies triangle geometry in a
7181e5c31af7Sopenharmony_cibottom-level acceleration structure and is defined as:
7182e5c31af7Sopenharmony_ci
7183e5c31af7Sopenharmony_ciinclude::{generated}/api/structs/VkGeometryTrianglesNV.adoc[]
7184e5c31af7Sopenharmony_ci
7185e5c31af7Sopenharmony_ci  * pname:sType is a elink:VkStructureType value identifying this structure.
7186e5c31af7Sopenharmony_ci  * pname:pNext is `NULL` or a pointer to a structure extending this
7187e5c31af7Sopenharmony_ci    structure.
7188e5c31af7Sopenharmony_ci  * pname:vertexData is the buffer containing vertex data for this geometry.
7189e5c31af7Sopenharmony_ci  * pname:vertexOffset is the offset in bytes within pname:vertexData
7190e5c31af7Sopenharmony_ci    containing vertex data for this geometry.
7191e5c31af7Sopenharmony_ci  * pname:vertexCount is the number of valid vertices.
7192e5c31af7Sopenharmony_ci  * pname:vertexStride is the stride in bytes between each vertex.
7193e5c31af7Sopenharmony_ci  * pname:vertexFormat is a elink:VkFormat describing the format of each
7194e5c31af7Sopenharmony_ci    vertex element.
7195e5c31af7Sopenharmony_ci  * pname:indexData is the buffer containing index data for this geometry.
7196e5c31af7Sopenharmony_ci  * pname:indexOffset is the offset in bytes within pname:indexData
7197e5c31af7Sopenharmony_ci    containing index data for this geometry.
7198e5c31af7Sopenharmony_ci  * pname:indexCount is the number of indices to include in this geometry.
7199e5c31af7Sopenharmony_ci  * pname:indexType is a elink:VkIndexType describing the format of each
7200e5c31af7Sopenharmony_ci    index.
7201e5c31af7Sopenharmony_ci  * pname:transformData is an optional buffer containing an
7202e5c31af7Sopenharmony_ci    slink:VkTransformMatrixNV structure defining a transformation to be
7203e5c31af7Sopenharmony_ci    applied to this geometry.
7204e5c31af7Sopenharmony_ci  * pname:transformOffset is the offset in bytes in pname:transformData of
7205e5c31af7Sopenharmony_ci    the transform information described above.
7206e5c31af7Sopenharmony_ci
7207e5c31af7Sopenharmony_ciIf pname:indexType is ename:VK_INDEX_TYPE_NONE_NV, then this structure
7208e5c31af7Sopenharmony_cidescribes a set of triangles determined by pname:vertexCount.
7209e5c31af7Sopenharmony_ciOtherwise, this structure describes a set of indexed triangles determined by
7210e5c31af7Sopenharmony_cipname:indexCount.
7211e5c31af7Sopenharmony_ci
7212e5c31af7Sopenharmony_ci.Valid Usage
7213e5c31af7Sopenharmony_ci****
7214e5c31af7Sopenharmony_ci  * [[VUID-VkGeometryTrianglesNV-vertexOffset-02428]]
7215e5c31af7Sopenharmony_ci    pname:vertexOffset must: be less than the size of pname:vertexData
7216e5c31af7Sopenharmony_ci  * [[VUID-VkGeometryTrianglesNV-vertexOffset-02429]]
7217e5c31af7Sopenharmony_ci    pname:vertexOffset must: be a multiple of the component size of
7218e5c31af7Sopenharmony_ci    pname:vertexFormat
7219e5c31af7Sopenharmony_ci  * [[VUID-VkGeometryTrianglesNV-vertexFormat-02430]]
7220e5c31af7Sopenharmony_ci    pname:vertexFormat must: be one of ename:VK_FORMAT_R32G32B32_SFLOAT,
7221e5c31af7Sopenharmony_ci    ename:VK_FORMAT_R32G32_SFLOAT, ename:VK_FORMAT_R16G16B16_SFLOAT,
7222e5c31af7Sopenharmony_ci    ename:VK_FORMAT_R16G16_SFLOAT, ename:VK_FORMAT_R16G16_SNORM, or
7223e5c31af7Sopenharmony_ci    ename:VK_FORMAT_R16G16B16_SNORM
7224e5c31af7Sopenharmony_ci  * [[VUID-VkGeometryTrianglesNV-vertexStride-03818]]
7225e5c31af7Sopenharmony_ci    pname:vertexStride must: be less than or equal to [eq]#2^32^-1#
7226e5c31af7Sopenharmony_ci  * [[VUID-VkGeometryTrianglesNV-indexOffset-02431]]
7227e5c31af7Sopenharmony_ci    pname:indexOffset must: be less than the size of pname:indexData
7228e5c31af7Sopenharmony_ci  * [[VUID-VkGeometryTrianglesNV-indexOffset-02432]]
7229e5c31af7Sopenharmony_ci    pname:indexOffset must: be a multiple of the element size of
7230e5c31af7Sopenharmony_ci    pname:indexType
7231e5c31af7Sopenharmony_ci  * [[VUID-VkGeometryTrianglesNV-indexType-02433]]
7232e5c31af7Sopenharmony_ci    pname:indexType must: be ename:VK_INDEX_TYPE_UINT16,
7233e5c31af7Sopenharmony_ci    ename:VK_INDEX_TYPE_UINT32, or ename:VK_INDEX_TYPE_NONE_NV
7234e5c31af7Sopenharmony_ci  * [[VUID-VkGeometryTrianglesNV-indexData-02434]]
7235e5c31af7Sopenharmony_ci    pname:indexData must: be dlink:VK_NULL_HANDLE if pname:indexType is
7236e5c31af7Sopenharmony_ci    ename:VK_INDEX_TYPE_NONE_NV
7237e5c31af7Sopenharmony_ci  * [[VUID-VkGeometryTrianglesNV-indexData-02435]]
7238e5c31af7Sopenharmony_ci    pname:indexData must: be a valid sname:VkBuffer handle if
7239e5c31af7Sopenharmony_ci    pname:indexType is not ename:VK_INDEX_TYPE_NONE_NV
7240e5c31af7Sopenharmony_ci  * [[VUID-VkGeometryTrianglesNV-indexCount-02436]]
7241e5c31af7Sopenharmony_ci    pname:indexCount must: be `0` if pname:indexType is
7242e5c31af7Sopenharmony_ci    ename:VK_INDEX_TYPE_NONE_NV
7243e5c31af7Sopenharmony_ci  * [[VUID-VkGeometryTrianglesNV-transformOffset-02437]]
7244e5c31af7Sopenharmony_ci    pname:transformOffset must: be less than the size of pname:transformData
7245e5c31af7Sopenharmony_ci  * [[VUID-VkGeometryTrianglesNV-transformOffset-02438]]
7246e5c31af7Sopenharmony_ci    pname:transformOffset must: be a multiple of `16`
7247e5c31af7Sopenharmony_ci****
7248e5c31af7Sopenharmony_ci
7249e5c31af7Sopenharmony_ciinclude::{generated}/validity/structs/VkGeometryTrianglesNV.adoc[]
7250e5c31af7Sopenharmony_ci--
7251e5c31af7Sopenharmony_ci
7252e5c31af7Sopenharmony_ci[open,refpage='VkGeometryAABBNV',desc='Structure specifying axis-aligned bounding box geometry in a bottom-level acceleration structure',type='structs']
7253e5c31af7Sopenharmony_ci--
7254e5c31af7Sopenharmony_ci:refpage: VkGeometryAABBNV
7255e5c31af7Sopenharmony_ci
7256e5c31af7Sopenharmony_ciThe sname:VkGeometryAABBNV structure specifies axis-aligned bounding box
7257e5c31af7Sopenharmony_cigeometry in a bottom-level acceleration structure, and is defined as:
7258e5c31af7Sopenharmony_ci
7259e5c31af7Sopenharmony_ciinclude::{generated}/api/structs/VkGeometryAABBNV.adoc[]
7260e5c31af7Sopenharmony_ci
7261e5c31af7Sopenharmony_ci  * pname:sType is a elink:VkStructureType value identifying this structure.
7262e5c31af7Sopenharmony_ci  * pname:pNext is `NULL` or a pointer to a structure extending this
7263e5c31af7Sopenharmony_ci    structure.
7264e5c31af7Sopenharmony_ci  * pname:aabbData is the buffer containing axis-aligned bounding box data.
7265e5c31af7Sopenharmony_ci  * pname:numAABBs is the number of AABBs in this geometry.
7266e5c31af7Sopenharmony_ci  * pname:stride is the stride in bytes between AABBs in pname:aabbData.
7267e5c31af7Sopenharmony_ci  * pname:offset is the offset in bytes of the first AABB in pname:aabbData.
7268e5c31af7Sopenharmony_ci
7269e5c31af7Sopenharmony_ciThe AABB data in memory is six 32-bit floats consisting of the minimum x, y,
7270e5c31af7Sopenharmony_ciand z values followed by the maximum x, y, and z values.
7271e5c31af7Sopenharmony_ci
7272e5c31af7Sopenharmony_ci.Valid Usage
7273e5c31af7Sopenharmony_ci****
7274e5c31af7Sopenharmony_ci  * [[VUID-VkGeometryAABBNV-offset-02439]]
7275e5c31af7Sopenharmony_ci    pname:offset must: be less than the size of pname:aabbData
7276e5c31af7Sopenharmony_ci  * [[VUID-VkGeometryAABBNV-offset-02440]]
7277e5c31af7Sopenharmony_ci    pname:offset must: be a multiple of `8`
7278e5c31af7Sopenharmony_ci  * [[VUID-VkGeometryAABBNV-stride-02441]]
7279e5c31af7Sopenharmony_ci    pname:stride must: be a multiple of `8`
7280e5c31af7Sopenharmony_ci****
7281e5c31af7Sopenharmony_ci
7282e5c31af7Sopenharmony_ciinclude::{generated}/validity/structs/VkGeometryAABBNV.adoc[]
7283e5c31af7Sopenharmony_ci--
7284e5c31af7Sopenharmony_ciendif::VK_NV_ray_tracing[]
7285e5c31af7Sopenharmony_ci
7286e5c31af7Sopenharmony_ci[open,refpage='vkDestroyAccelerationStructureKHR',desc='Destroy an acceleration structure object',type='protos']
7287e5c31af7Sopenharmony_ci--
7288e5c31af7Sopenharmony_ci:refpage: vkDestroyAccelerationStructureKHR
7289e5c31af7Sopenharmony_ci
7290e5c31af7Sopenharmony_ciTo destroy an acceleration structure, call:
7291e5c31af7Sopenharmony_ci
7292e5c31af7Sopenharmony_ciifdef::VK_KHR_acceleration_structure[]
7293e5c31af7Sopenharmony_ciinclude::{generated}/api/protos/vkDestroyAccelerationStructureKHR.adoc[]
7294e5c31af7Sopenharmony_ciendif::VK_KHR_acceleration_structure[]
7295e5c31af7Sopenharmony_ci
7296e5c31af7Sopenharmony_ci  * pname:device is the logical device that destroys the acceleration
7297e5c31af7Sopenharmony_ci    structure.
7298e5c31af7Sopenharmony_ci  * pname:accelerationStructure is the acceleration structure to destroy.
7299e5c31af7Sopenharmony_ci  * pname:pAllocator controls host memory allocation as described in the
7300e5c31af7Sopenharmony_ci    <<memory-allocation, Memory Allocation>> chapter.
7301e5c31af7Sopenharmony_ci
7302e5c31af7Sopenharmony_ci.Valid Usage
7303e5c31af7Sopenharmony_ci****
7304e5c31af7Sopenharmony_ci  * [[VUID-vkDestroyAccelerationStructureKHR-accelerationStructure-08934]]
7305e5c31af7Sopenharmony_ci    The <<features-accelerationStructure,
7306e5c31af7Sopenharmony_ci    sname:VkPhysicalDeviceAccelerationStructureFeaturesKHR::pname:accelerationStructure>>
7307e5c31af7Sopenharmony_ci    feature must: be enabled
7308e5c31af7Sopenharmony_ci  * [[VUID-vkDestroyAccelerationStructureKHR-accelerationStructure-02442]]
7309e5c31af7Sopenharmony_ci    All submitted commands that refer to pname:accelerationStructure must:
7310e5c31af7Sopenharmony_ci    have completed execution
7311e5c31af7Sopenharmony_ciifndef::VKSC_VERSION_1_0[]
7312e5c31af7Sopenharmony_ci  * [[VUID-vkDestroyAccelerationStructureKHR-accelerationStructure-02443]]
7313e5c31af7Sopenharmony_ci    If sname:VkAllocationCallbacks were provided when
7314e5c31af7Sopenharmony_ci    pname:accelerationStructure was created, a compatible set of callbacks
7315e5c31af7Sopenharmony_ci    must: be provided here
7316e5c31af7Sopenharmony_ci  * [[VUID-vkDestroyAccelerationStructureKHR-accelerationStructure-02444]]
7317e5c31af7Sopenharmony_ci    If no sname:VkAllocationCallbacks were provided when
7318e5c31af7Sopenharmony_ci    pname:accelerationStructure was created, pname:pAllocator must: be
7319e5c31af7Sopenharmony_ci    `NULL`
7320e5c31af7Sopenharmony_ciendif::VKSC_VERSION_1_0[]
7321e5c31af7Sopenharmony_ci****
7322e5c31af7Sopenharmony_ci
7323e5c31af7Sopenharmony_ciinclude::{generated}/validity/protos/vkDestroyAccelerationStructureKHR.adoc[]
7324e5c31af7Sopenharmony_ci--
7325e5c31af7Sopenharmony_ci
7326e5c31af7Sopenharmony_ciifdef::VK_NV_ray_tracing[]
7327e5c31af7Sopenharmony_ci[open,refpage='vkDestroyAccelerationStructureNV',desc='Destroy an acceleration structure object',type='protos']
7328e5c31af7Sopenharmony_ci--
7329e5c31af7Sopenharmony_ci:refpage: vkDestroyAccelerationStructureNV
7330e5c31af7Sopenharmony_ci
7331e5c31af7Sopenharmony_ciTo destroy an acceleration structure, call:
7332e5c31af7Sopenharmony_ci
7333e5c31af7Sopenharmony_ciinclude::{generated}/api/protos/vkDestroyAccelerationStructureNV.adoc[]
7334e5c31af7Sopenharmony_ci
7335e5c31af7Sopenharmony_ci  * pname:device is the logical device that destroys the buffer.
7336e5c31af7Sopenharmony_ci  * pname:accelerationStructure is the acceleration structure to destroy.
7337e5c31af7Sopenharmony_ci  * pname:pAllocator controls host memory allocation as described in the
7338e5c31af7Sopenharmony_ci    <<memory-allocation, Memory Allocation>> chapter.
7339e5c31af7Sopenharmony_ci
7340e5c31af7Sopenharmony_ci.Valid Usage
7341e5c31af7Sopenharmony_ci****
7342e5c31af7Sopenharmony_ci  * [[VUID-vkDestroyAccelerationStructureNV-accelerationStructure-03752]]
7343e5c31af7Sopenharmony_ci    All submitted commands that refer to pname:accelerationStructure must:
7344e5c31af7Sopenharmony_ci    have completed execution
7345e5c31af7Sopenharmony_ciifndef::VKSC_VERSION_1_0[]
7346e5c31af7Sopenharmony_ci  * [[VUID-vkDestroyAccelerationStructureNV-accelerationStructure-03753]]
7347e5c31af7Sopenharmony_ci    If sname:VkAllocationCallbacks were provided when
7348e5c31af7Sopenharmony_ci    pname:accelerationStructure was created, a compatible set of callbacks
7349e5c31af7Sopenharmony_ci    must: be provided here
7350e5c31af7Sopenharmony_ci  * [[VUID-vkDestroyAccelerationStructureNV-accelerationStructure-03754]]
7351e5c31af7Sopenharmony_ci    If no sname:VkAllocationCallbacks were provided when
7352e5c31af7Sopenharmony_ci    pname:accelerationStructure was created, pname:pAllocator must: be
7353e5c31af7Sopenharmony_ci    `NULL`
7354e5c31af7Sopenharmony_ciendif::VKSC_VERSION_1_0[]
7355e5c31af7Sopenharmony_ci****
7356e5c31af7Sopenharmony_ci
7357e5c31af7Sopenharmony_ciinclude::{generated}/validity/protos/vkDestroyAccelerationStructureNV.adoc[]
7358e5c31af7Sopenharmony_ci--
7359e5c31af7Sopenharmony_ci
7360e5c31af7Sopenharmony_ci[open,refpage='vkGetAccelerationStructureMemoryRequirementsNV',desc='Get acceleration structure memory requirements',type='protos']
7361e5c31af7Sopenharmony_ci--
7362e5c31af7Sopenharmony_ci:refpage: vkGetAccelerationStructureMemoryRequirementsNV
7363e5c31af7Sopenharmony_ci
7364e5c31af7Sopenharmony_ciAn acceleration structure has memory requirements for the structure object
7365e5c31af7Sopenharmony_ciitself, scratch space for the build, and scratch space for the update.
7366e5c31af7Sopenharmony_ci
7367e5c31af7Sopenharmony_ciScratch space is allocated as a sname:VkBuffer, so for
7368e5c31af7Sopenharmony_ciename:VK_ACCELERATION_STRUCTURE_MEMORY_REQUIREMENTS_TYPE_BUILD_SCRATCH_NV
7369e5c31af7Sopenharmony_ciand
7370e5c31af7Sopenharmony_ciename:VK_ACCELERATION_STRUCTURE_MEMORY_REQUIREMENTS_TYPE_UPDATE_SCRATCH_NV
7371e5c31af7Sopenharmony_cithe pname:pMemoryRequirements->alignment and
7372e5c31af7Sopenharmony_cipname:pMemoryRequirements->memoryTypeBits values returned by this call must:
7373e5c31af7Sopenharmony_cibe filled with zero, and should: be ignored by the application.
7374e5c31af7Sopenharmony_ci
7375e5c31af7Sopenharmony_ciTo query the memory requirements, call:
7376e5c31af7Sopenharmony_ci
7377e5c31af7Sopenharmony_ciinclude::{generated}/api/protos/vkGetAccelerationStructureMemoryRequirementsNV.adoc[]
7378e5c31af7Sopenharmony_ci
7379e5c31af7Sopenharmony_ci  * pname:device is the logical device on which the acceleration structure
7380e5c31af7Sopenharmony_ci    was created.
7381e5c31af7Sopenharmony_ci  * pname:pInfo is a pointer to a
7382e5c31af7Sopenharmony_ci    slink:VkAccelerationStructureMemoryRequirementsInfoNV structure
7383e5c31af7Sopenharmony_ci    specifying the acceleration structure to get memory requirements for.
7384e5c31af7Sopenharmony_ci  * pname:pMemoryRequirements is a pointer to a
7385e5c31af7Sopenharmony_ci    slink:VkMemoryRequirements2KHR structure in which the requested
7386e5c31af7Sopenharmony_ci    acceleration structure memory requirements are returned.
7387e5c31af7Sopenharmony_ci
7388e5c31af7Sopenharmony_ciinclude::{generated}/validity/protos/vkGetAccelerationStructureMemoryRequirementsNV.adoc[]
7389e5c31af7Sopenharmony_ci--
7390e5c31af7Sopenharmony_ci
7391e5c31af7Sopenharmony_ci[open,refpage='VkAccelerationStructureMemoryRequirementsInfoNV',desc='Structure specifying acceleration to query for memory requirements',type='structs']
7392e5c31af7Sopenharmony_ci--
7393e5c31af7Sopenharmony_ci:refpage: VkAccelerationStructureMemoryRequirementsInfoNV
7394e5c31af7Sopenharmony_ci
7395e5c31af7Sopenharmony_ciThe sname:VkAccelerationStructureMemoryRequirementsInfoNV structure is
7396e5c31af7Sopenharmony_cidefined as:
7397e5c31af7Sopenharmony_ci
7398e5c31af7Sopenharmony_ciinclude::{generated}/api/structs/VkAccelerationStructureMemoryRequirementsInfoNV.adoc[]
7399e5c31af7Sopenharmony_ci
7400e5c31af7Sopenharmony_ci  * pname:sType is a elink:VkStructureType value identifying this structure.
7401e5c31af7Sopenharmony_ci  * pname:pNext is `NULL` or a pointer to a structure extending this
7402e5c31af7Sopenharmony_ci    structure.
7403e5c31af7Sopenharmony_ci  * pname:type selects the type of memory requirement being queried.
7404e5c31af7Sopenharmony_ci    ename:VK_ACCELERATION_STRUCTURE_MEMORY_REQUIREMENTS_TYPE_OBJECT_NV
7405e5c31af7Sopenharmony_ci    returns the memory requirements for the object itself.
7406e5c31af7Sopenharmony_ci    ename:VK_ACCELERATION_STRUCTURE_MEMORY_REQUIREMENTS_TYPE_BUILD_SCRATCH_NV
7407e5c31af7Sopenharmony_ci    returns the memory requirements for the scratch memory when doing a
7408e5c31af7Sopenharmony_ci    build.
7409e5c31af7Sopenharmony_ci    ename:VK_ACCELERATION_STRUCTURE_MEMORY_REQUIREMENTS_TYPE_UPDATE_SCRATCH_NV
7410e5c31af7Sopenharmony_ci    returns the memory requirements for the scratch memory when doing an
7411e5c31af7Sopenharmony_ci    update.
7412e5c31af7Sopenharmony_ci  * pname:accelerationStructure is the acceleration structure to be queried
7413e5c31af7Sopenharmony_ci    for memory requirements.
7414e5c31af7Sopenharmony_ci
7415e5c31af7Sopenharmony_ciinclude::{generated}/validity/structs/VkAccelerationStructureMemoryRequirementsInfoNV.adoc[]
7416e5c31af7Sopenharmony_ci--
7417e5c31af7Sopenharmony_ci
7418e5c31af7Sopenharmony_ci[open,refpage='VkAccelerationStructureMemoryRequirementsTypeNV',desc='Acceleration structure memory requirement type',type='enums']
7419e5c31af7Sopenharmony_ci--
7420e5c31af7Sopenharmony_ci:refpage: VkAccelerationStructureMemoryRequirementsTypeNV
7421e5c31af7Sopenharmony_ci
7422e5c31af7Sopenharmony_ciPossible values of pname:type in
7423e5c31af7Sopenharmony_cisname:VkAccelerationStructureMemoryRequirementsInfoNV are:,
7424e5c31af7Sopenharmony_ci
7425e5c31af7Sopenharmony_ciinclude::{generated}/api/enums/VkAccelerationStructureMemoryRequirementsTypeNV.adoc[]
7426e5c31af7Sopenharmony_ci
7427e5c31af7Sopenharmony_ci  * ename:VK_ACCELERATION_STRUCTURE_MEMORY_REQUIREMENTS_TYPE_OBJECT_NV
7428e5c31af7Sopenharmony_ci    requests the memory requirement for the sname:VkAccelerationStructureNV
7429e5c31af7Sopenharmony_ci    backing store.
7430e5c31af7Sopenharmony_ci  * ename:VK_ACCELERATION_STRUCTURE_MEMORY_REQUIREMENTS_TYPE_BUILD_SCRATCH_NV
7431e5c31af7Sopenharmony_ci    requests the memory requirement for scratch space during the initial
7432e5c31af7Sopenharmony_ci    build.
7433e5c31af7Sopenharmony_ci  * ename:VK_ACCELERATION_STRUCTURE_MEMORY_REQUIREMENTS_TYPE_UPDATE_SCRATCH_NV
7434e5c31af7Sopenharmony_ci    requests the memory requirement for scratch space during an update.
7435e5c31af7Sopenharmony_ci--
7436e5c31af7Sopenharmony_ciendif::VK_NV_ray_tracing[]
7437e5c31af7Sopenharmony_ci
7438e5c31af7Sopenharmony_ciifdef::VK_KHR_acceleration_structure[]
7439e5c31af7Sopenharmony_ci[open,refpage='VkAccelerationStructureBuildTypeKHR',desc='Acceleration structure build type',type='enums']
7440e5c31af7Sopenharmony_ci--
7441e5c31af7Sopenharmony_ci:refpage: VkAccelerationStructureBuildTypeKHR
7442e5c31af7Sopenharmony_ci
7443e5c31af7Sopenharmony_ciPossible values of pname:buildType in
7444e5c31af7Sopenharmony_ciflink:vkGetAccelerationStructureBuildSizesKHR are:
7445e5c31af7Sopenharmony_ci
7446e5c31af7Sopenharmony_ciinclude::{generated}/api/enums/VkAccelerationStructureBuildTypeKHR.adoc[]
7447e5c31af7Sopenharmony_ci
7448e5c31af7Sopenharmony_ci  * ename:VK_ACCELERATION_STRUCTURE_BUILD_TYPE_HOST_KHR requests the memory
7449e5c31af7Sopenharmony_ci    requirement for operations performed by the host.
7450e5c31af7Sopenharmony_ci  * ename:VK_ACCELERATION_STRUCTURE_BUILD_TYPE_DEVICE_KHR requests the
7451e5c31af7Sopenharmony_ci    memory requirement for operations performed by the device.
7452e5c31af7Sopenharmony_ci  * ename:VK_ACCELERATION_STRUCTURE_BUILD_TYPE_HOST_OR_DEVICE_KHR requests
7453e5c31af7Sopenharmony_ci    the memory requirement for operations performed by either the host, or
7454e5c31af7Sopenharmony_ci    the device.
7455e5c31af7Sopenharmony_ci--
7456e5c31af7Sopenharmony_ciendif::VK_KHR_acceleration_structure[]
7457e5c31af7Sopenharmony_ci
7458e5c31af7Sopenharmony_ciifdef::VK_NV_ray_tracing[]
7459e5c31af7Sopenharmony_ci[open,refpage='vkBindAccelerationStructureMemoryNV',desc='Bind acceleration structure memory',type='protos']
7460e5c31af7Sopenharmony_ci--
7461e5c31af7Sopenharmony_ci:refpage: vkBindAccelerationStructureMemoryNV
7462e5c31af7Sopenharmony_ci
7463e5c31af7Sopenharmony_ciTo attach memory to one or more acceleration structures at a time, call:
7464e5c31af7Sopenharmony_ci
7465e5c31af7Sopenharmony_ciinclude::{generated}/api/protos/vkBindAccelerationStructureMemoryNV.adoc[]
7466e5c31af7Sopenharmony_ci
7467e5c31af7Sopenharmony_ci  * pname:device is the logical device that owns the acceleration structures
7468e5c31af7Sopenharmony_ci    and memory.
7469e5c31af7Sopenharmony_ci  * pname:bindInfoCount is the number of elements in pname:pBindInfos.
7470e5c31af7Sopenharmony_ci  * pname:pBindInfos is a pointer to an array of
7471e5c31af7Sopenharmony_ci    slink:VkBindAccelerationStructureMemoryInfoNV structures describing
7472e5c31af7Sopenharmony_ci    acceleration structures and memory to bind.
7473e5c31af7Sopenharmony_ci
7474e5c31af7Sopenharmony_ciinclude::{generated}/validity/protos/vkBindAccelerationStructureMemoryNV.adoc[]
7475e5c31af7Sopenharmony_ci--
7476e5c31af7Sopenharmony_ci
7477e5c31af7Sopenharmony_ci[open,refpage='VkBindAccelerationStructureMemoryInfoNV',desc='Structure specifying acceleration structure memory binding',type='structs']
7478e5c31af7Sopenharmony_ci--
7479e5c31af7Sopenharmony_ci:refpage: VkBindAccelerationStructureMemoryInfoNV
7480e5c31af7Sopenharmony_ci
7481e5c31af7Sopenharmony_ciThe sname:VkBindAccelerationStructureMemoryInfoNV structure is defined as:
7482e5c31af7Sopenharmony_ci
7483e5c31af7Sopenharmony_ciinclude::{generated}/api/structs/VkBindAccelerationStructureMemoryInfoNV.adoc[]
7484e5c31af7Sopenharmony_ci
7485e5c31af7Sopenharmony_ci  * pname:sType is a elink:VkStructureType value identifying this structure.
7486e5c31af7Sopenharmony_ci  * pname:pNext is `NULL` or a pointer to a structure extending this
7487e5c31af7Sopenharmony_ci    structure.
7488e5c31af7Sopenharmony_ci  * pname:accelerationStructure is the acceleration structure to be attached
7489e5c31af7Sopenharmony_ci    to memory.
7490e5c31af7Sopenharmony_ci  * pname:memory is a sname:VkDeviceMemory object describing the device
7491e5c31af7Sopenharmony_ci    memory to attach.
7492e5c31af7Sopenharmony_ci  * pname:memoryOffset is the start offset of the region of memory that is
7493e5c31af7Sopenharmony_ci    to be bound to the acceleration structure.
7494e5c31af7Sopenharmony_ci    The number of bytes returned in the
7495e5c31af7Sopenharmony_ci    slink:VkMemoryRequirements::pname:size member in pname:memory, starting
7496e5c31af7Sopenharmony_ci    from pname:memoryOffset bytes, will be bound to the specified
7497e5c31af7Sopenharmony_ci    acceleration structure.
7498e5c31af7Sopenharmony_ci  * pname:deviceIndexCount is the number of elements in
7499e5c31af7Sopenharmony_ci    pname:pDeviceIndices.
7500e5c31af7Sopenharmony_ci  * pname:pDeviceIndices is a pointer to an array of device indices.
7501e5c31af7Sopenharmony_ci
7502e5c31af7Sopenharmony_ci.Valid Usage
7503e5c31af7Sopenharmony_ci****
7504e5c31af7Sopenharmony_ci  * [[VUID-VkBindAccelerationStructureMemoryInfoNV-accelerationStructure-03620]]
7505e5c31af7Sopenharmony_ci    pname:accelerationStructure must: not already be backed by a memory
7506e5c31af7Sopenharmony_ci    object
7507e5c31af7Sopenharmony_ci  * [[VUID-VkBindAccelerationStructureMemoryInfoNV-memoryOffset-03621]]
7508e5c31af7Sopenharmony_ci    pname:memoryOffset must: be less than the size of pname:memory
7509e5c31af7Sopenharmony_ci  * [[VUID-VkBindAccelerationStructureMemoryInfoNV-memory-03622]]
7510e5c31af7Sopenharmony_ci    pname:memory must: have been allocated using one of the memory types
7511e5c31af7Sopenharmony_ci    allowed in the pname:memoryTypeBits member of the
7512e5c31af7Sopenharmony_ci    slink:VkMemoryRequirements structure returned from a call to
7513e5c31af7Sopenharmony_ci    flink:vkGetAccelerationStructureMemoryRequirementsNV with
7514e5c31af7Sopenharmony_ci    pname:accelerationStructure and pname:type of
7515e5c31af7Sopenharmony_ci    ename:VK_ACCELERATION_STRUCTURE_MEMORY_REQUIREMENTS_TYPE_OBJECT_NV
7516e5c31af7Sopenharmony_ci  * [[VUID-VkBindAccelerationStructureMemoryInfoNV-memoryOffset-03623]]
7517e5c31af7Sopenharmony_ci    pname:memoryOffset must: be an integer multiple of the pname:alignment
7518e5c31af7Sopenharmony_ci    member of the slink:VkMemoryRequirements structure returned from a call
7519e5c31af7Sopenharmony_ci    to flink:vkGetAccelerationStructureMemoryRequirementsNV with
7520e5c31af7Sopenharmony_ci    pname:accelerationStructure and pname:type of
7521e5c31af7Sopenharmony_ci    ename:VK_ACCELERATION_STRUCTURE_MEMORY_REQUIREMENTS_TYPE_OBJECT_NV
7522e5c31af7Sopenharmony_ci  * [[VUID-VkBindAccelerationStructureMemoryInfoNV-size-03624]]
7523e5c31af7Sopenharmony_ci    The pname:size member of the sname:VkMemoryRequirements structure
7524e5c31af7Sopenharmony_ci    returned from a call to
7525e5c31af7Sopenharmony_ci    flink:vkGetAccelerationStructureMemoryRequirementsNV with
7526e5c31af7Sopenharmony_ci    pname:accelerationStructure and pname:type of
7527e5c31af7Sopenharmony_ci    ename:VK_ACCELERATION_STRUCTURE_MEMORY_REQUIREMENTS_TYPE_OBJECT_NV must:
7528e5c31af7Sopenharmony_ci    be less than or equal to the size of pname:memory minus
7529e5c31af7Sopenharmony_ci    pname:memoryOffset
7530e5c31af7Sopenharmony_ci****
7531e5c31af7Sopenharmony_ci
7532e5c31af7Sopenharmony_ciinclude::{generated}/validity/structs/VkBindAccelerationStructureMemoryInfoNV.adoc[]
7533e5c31af7Sopenharmony_ci--
7534e5c31af7Sopenharmony_ci
7535e5c31af7Sopenharmony_ci[open,refpage='vkGetAccelerationStructureHandleNV',desc='Get opaque acceleration structure handle',type='protos']
7536e5c31af7Sopenharmony_ci--
7537e5c31af7Sopenharmony_ci:refpage: vkGetAccelerationStructureHandleNV
7538e5c31af7Sopenharmony_ci
7539e5c31af7Sopenharmony_ciTo allow constructing geometry instances with device code if desired, we
7540e5c31af7Sopenharmony_cineed to be able to query a opaque handle for an acceleration structure.
7541e5c31af7Sopenharmony_ciThis handle is a value of 8 bytes.
7542e5c31af7Sopenharmony_ciTo get this handle, call:
7543e5c31af7Sopenharmony_ci
7544e5c31af7Sopenharmony_ciinclude::{generated}/api/protos/vkGetAccelerationStructureHandleNV.adoc[]
7545e5c31af7Sopenharmony_ci
7546e5c31af7Sopenharmony_ci  * pname:device is the logical device that owns the acceleration
7547e5c31af7Sopenharmony_ci    structures.
7548e5c31af7Sopenharmony_ci  * pname:accelerationStructure is the acceleration structure.
7549e5c31af7Sopenharmony_ci  * pname:dataSize is the size in bytes of the buffer pointed to by
7550e5c31af7Sopenharmony_ci    pname:pData.
7551e5c31af7Sopenharmony_ci  * pname:pData is a pointer to a user-allocated buffer where the results
7552e5c31af7Sopenharmony_ci    will be written.
7553e5c31af7Sopenharmony_ci
7554e5c31af7Sopenharmony_ci.Valid Usage
7555e5c31af7Sopenharmony_ci****
7556e5c31af7Sopenharmony_ci  * [[VUID-vkGetAccelerationStructureHandleNV-dataSize-02240]]
7557e5c31af7Sopenharmony_ci    pname:dataSize must: be large enough to contain the result of the query,
7558e5c31af7Sopenharmony_ci    as described above
7559e5c31af7Sopenharmony_ci  * [[VUID-vkGetAccelerationStructureHandleNV-accelerationStructure-02787]]
7560e5c31af7Sopenharmony_ci    pname:accelerationStructure must: be bound completely and contiguously
7561e5c31af7Sopenharmony_ci    to a single sname:VkDeviceMemory object via
7562e5c31af7Sopenharmony_ci    flink:vkBindAccelerationStructureMemoryNV
7563e5c31af7Sopenharmony_ci****
7564e5c31af7Sopenharmony_ci
7565e5c31af7Sopenharmony_ciinclude::{generated}/validity/protos/vkGetAccelerationStructureHandleNV.adoc[]
7566e5c31af7Sopenharmony_ci--
7567e5c31af7Sopenharmony_ciendif::VK_NV_ray_tracing[]
7568e5c31af7Sopenharmony_ci
7569e5c31af7Sopenharmony_ciifdef::VK_KHR_acceleration_structure[]
7570e5c31af7Sopenharmony_ci[open,refpage='vkGetAccelerationStructureDeviceAddressKHR',desc='Query an address of a acceleration structure',type='protos']
7571e5c31af7Sopenharmony_ci--
7572e5c31af7Sopenharmony_ci:refpage: vkGetAccelerationStructureDeviceAddressKHR
7573e5c31af7Sopenharmony_ci
7574e5c31af7Sopenharmony_ciTo query the 64-bit device address for an acceleration structure, call:
7575e5c31af7Sopenharmony_ci
7576e5c31af7Sopenharmony_ciinclude::{generated}/api/protos/vkGetAccelerationStructureDeviceAddressKHR.adoc[]
7577e5c31af7Sopenharmony_ci
7578e5c31af7Sopenharmony_ci  * pname:device is the logical device that the acceleration structure was
7579e5c31af7Sopenharmony_ci    created on.
7580e5c31af7Sopenharmony_ci  * pname:pInfo is a pointer to a
7581e5c31af7Sopenharmony_ci    slink:VkAccelerationStructureDeviceAddressInfoKHR structure specifying
7582e5c31af7Sopenharmony_ci    the acceleration structure to retrieve an address for.
7583e5c31af7Sopenharmony_ci
7584e5c31af7Sopenharmony_ciThe 64-bit return value is an address of the acceleration structure, which
7585e5c31af7Sopenharmony_cican be used for device and shader operations that involve acceleration
7586e5c31af7Sopenharmony_cistructures, such as
7587e5c31af7Sopenharmony_ciifdef::VK_KHR_ray_tracing_pipeline,VK_KHR_ray_query[]
7588e5c31af7Sopenharmony_ciray traversal and
7589e5c31af7Sopenharmony_ciendif::VK_KHR_ray_tracing_pipeline,VK_KHR_ray_query[]
7590e5c31af7Sopenharmony_ciacceleration structure building.
7591e5c31af7Sopenharmony_ci
7592e5c31af7Sopenharmony_ciIf the acceleration structure was created with a non-zero value of
7593e5c31af7Sopenharmony_cislink:VkAccelerationStructureCreateInfoKHR::pname:deviceAddress, the return
7594e5c31af7Sopenharmony_civalue will be the same address.
7595e5c31af7Sopenharmony_ci
7596e5c31af7Sopenharmony_ciIf the acceleration structure was created with a pname:type of
7597e5c31af7Sopenharmony_ciename:VK_ACCELERATION_STRUCTURE_TYPE_GENERIC_KHR, the returned address must:
7598e5c31af7Sopenharmony_cibe consistent with the relative offset to other acceleration structures with
7599e5c31af7Sopenharmony_cipname:type ename:VK_ACCELERATION_STRUCTURE_TYPE_GENERIC_KHR allocated with
7600e5c31af7Sopenharmony_cithe same slink:VkBuffer.
7601e5c31af7Sopenharmony_ciThat is, the difference in returned addresses between the two must: be the
7602e5c31af7Sopenharmony_cisame as the difference in offsets provided at acceleration structure
7603e5c31af7Sopenharmony_cicreation.
7604e5c31af7Sopenharmony_ci
7605e5c31af7Sopenharmony_ciThe returned address must: be aligned to 256 bytes.
7606e5c31af7Sopenharmony_ci
7607e5c31af7Sopenharmony_ci[NOTE]
7608e5c31af7Sopenharmony_ci.Note
7609e5c31af7Sopenharmony_ci====
7610e5c31af7Sopenharmony_ciThe acceleration structure device address may: be different from the buffer
7611e5c31af7Sopenharmony_cidevice address corresponding to the acceleration structure's start offset in
7612e5c31af7Sopenharmony_ciits storage buffer for acceleration structure types other than
7613e5c31af7Sopenharmony_ciename:VK_ACCELERATION_STRUCTURE_TYPE_GENERIC_KHR.
7614e5c31af7Sopenharmony_ci====
7615e5c31af7Sopenharmony_ci
7616e5c31af7Sopenharmony_ci.Valid Usage
7617e5c31af7Sopenharmony_ci****
7618e5c31af7Sopenharmony_ci  * [[VUID-vkGetAccelerationStructureDeviceAddressKHR-accelerationStructure-08935]]
7619e5c31af7Sopenharmony_ci    The <<features-accelerationStructure,
7620e5c31af7Sopenharmony_ci    sname:VkPhysicalDeviceAccelerationStructureFeaturesKHR::pname:accelerationStructure>>
7621e5c31af7Sopenharmony_ci    feature must: be enabled
7622e5c31af7Sopenharmony_ci  * [[VUID-vkGetAccelerationStructureDeviceAddressKHR-device-03504]]
7623e5c31af7Sopenharmony_ci    If pname:device was created with multiple physical devices, then the
7624e5c31af7Sopenharmony_ci    <<features-bufferDeviceAddressMultiDevice,
7625e5c31af7Sopenharmony_ci    pname:bufferDeviceAddressMultiDevice>> feature must: be enabled
7626e5c31af7Sopenharmony_ci****
7627e5c31af7Sopenharmony_ci
7628e5c31af7Sopenharmony_ciinclude::{generated}/validity/protos/vkGetAccelerationStructureDeviceAddressKHR.adoc[]
7629e5c31af7Sopenharmony_ci--
7630e5c31af7Sopenharmony_ci
7631e5c31af7Sopenharmony_ci[open,refpage='VkAccelerationStructureDeviceAddressInfoKHR',desc='Structure specifying the acceleration structure to query an address for',type='structs']
7632e5c31af7Sopenharmony_ci--
7633e5c31af7Sopenharmony_ci:refpage: VkAccelerationStructureDeviceAddressInfoKHR
7634e5c31af7Sopenharmony_ci
7635e5c31af7Sopenharmony_ciThe sname:VkAccelerationStructureDeviceAddressInfoKHR structure is defined
7636e5c31af7Sopenharmony_cias:
7637e5c31af7Sopenharmony_ci
7638e5c31af7Sopenharmony_ciinclude::{generated}/api/structs/VkAccelerationStructureDeviceAddressInfoKHR.adoc[]
7639e5c31af7Sopenharmony_ci
7640e5c31af7Sopenharmony_ci  * pname:sType is a elink:VkStructureType value identifying this structure.
7641e5c31af7Sopenharmony_ci  * pname:pNext is `NULL` or a pointer to a structure extending this
7642e5c31af7Sopenharmony_ci    structure.
7643e5c31af7Sopenharmony_ci  * pname:accelerationStructure specifies the acceleration structure whose
7644e5c31af7Sopenharmony_ci    address is being queried.
7645e5c31af7Sopenharmony_ci
7646e5c31af7Sopenharmony_ciinclude::{generated}/validity/structs/VkAccelerationStructureDeviceAddressInfoKHR.adoc[]
7647e5c31af7Sopenharmony_ci--
7648e5c31af7Sopenharmony_ciendif::VK_KHR_acceleration_structure[]
7649e5c31af7Sopenharmony_ciendif::VK_NV_ray_tracing,VK_KHR_acceleration_structure[]
7650e5c31af7Sopenharmony_ci
7651e5c31af7Sopenharmony_ci
7652e5c31af7Sopenharmony_ciifdef::VK_EXT_opacity_micromap[]
7653e5c31af7Sopenharmony_ci[[resources-micromaps]]
7654e5c31af7Sopenharmony_ci== Micromaps
7655e5c31af7Sopenharmony_ci
7656e5c31af7Sopenharmony_ci[open,refpage='VkMicromapEXT',desc='Opaque handle to a micromap object',type='handles']
7657e5c31af7Sopenharmony_ci--
7658e5c31af7Sopenharmony_ci:refpage: VkMicromapEXT
7659e5c31af7Sopenharmony_ci
7660e5c31af7Sopenharmony_ciMicromaps are opaque data structures that are built by the implementation to
7661e5c31af7Sopenharmony_ciencode sub-triangle data to be included in an acceleration structure.
7662e5c31af7Sopenharmony_ci
7663e5c31af7Sopenharmony_ciMicromaps are represented by sname:VkMicromapEXT handles:
7664e5c31af7Sopenharmony_ci
7665e5c31af7Sopenharmony_ciinclude::{generated}/api/handles/VkMicromapEXT.adoc[]
7666e5c31af7Sopenharmony_ci--
7667e5c31af7Sopenharmony_ci
7668e5c31af7Sopenharmony_ci
7669e5c31af7Sopenharmony_ci[open,refpage='vkCreateMicromapEXT',desc='Create a new micromap object',type='protos']
7670e5c31af7Sopenharmony_ci--
7671e5c31af7Sopenharmony_ci:refpage: vkCreateMicromapEXT
7672e5c31af7Sopenharmony_ci
7673e5c31af7Sopenharmony_ciTo create a micromap, call:
7674e5c31af7Sopenharmony_ci
7675e5c31af7Sopenharmony_ciinclude::{generated}/api/protos/vkCreateMicromapEXT.adoc[]
7676e5c31af7Sopenharmony_ci
7677e5c31af7Sopenharmony_ci  * pname:device is the logical device that creates the acceleration
7678e5c31af7Sopenharmony_ci    structure object.
7679e5c31af7Sopenharmony_ci  * pname:pCreateInfo is a pointer to a slink:VkMicromapCreateInfoEXT
7680e5c31af7Sopenharmony_ci    structure containing parameters affecting creation of the micromap.
7681e5c31af7Sopenharmony_ci  * pname:pAllocator controls host memory allocation as described in the
7682e5c31af7Sopenharmony_ci    <<memory-allocation, Memory Allocation>> chapter.
7683e5c31af7Sopenharmony_ci  * pname:pMicromap is a pointer to a sname:VkMicromapEXT handle in which
7684e5c31af7Sopenharmony_ci    the resulting micromap object is returned.
7685e5c31af7Sopenharmony_ci
7686e5c31af7Sopenharmony_ciSimilar to other objects in Vulkan, the micromap creation merely creates an
7687e5c31af7Sopenharmony_ciobject with a specific "`shape`".
7688e5c31af7Sopenharmony_ciThe type and quantity of geometry that can be built into a micromap is
7689e5c31af7Sopenharmony_cidetermined by the parameters of slink:VkMicromapCreateInfoEXT.
7690e5c31af7Sopenharmony_ci
7691e5c31af7Sopenharmony_ciThe micromap data is stored in the object referred to by
7692e5c31af7Sopenharmony_cisname:VkMicromapCreateInfoEXT::pname:buffer.
7693e5c31af7Sopenharmony_ciOnce memory has been bound to that buffer, it must: be populated by micromap
7694e5c31af7Sopenharmony_cibuild or micromap copy commands such as flink:vkCmdBuildMicromapsEXT,
7695e5c31af7Sopenharmony_ciflink:vkBuildMicromapsEXT, flink:vkCmdCopyMicromapEXT, and
7696e5c31af7Sopenharmony_ciflink:vkCopyMicromapEXT.
7697e5c31af7Sopenharmony_ci
7698e5c31af7Sopenharmony_ci[NOTE]
7699e5c31af7Sopenharmony_ci.Note
7700e5c31af7Sopenharmony_ci====
7701e5c31af7Sopenharmony_ciThe expected usage for a trace capture/replay tool is that it will serialize
7702e5c31af7Sopenharmony_ciand later deserialize the micromap data using micromap copy commands.
7703e5c31af7Sopenharmony_ciDuring capture the tool will use flink:vkCopyMicromapToMemoryEXT or
7704e5c31af7Sopenharmony_ciflink:vkCmdCopyMicromapToMemoryEXT with a pname:mode of
7705e5c31af7Sopenharmony_ciename:VK_COPY_MICROMAP_MODE_SERIALIZE_EXT, and
7706e5c31af7Sopenharmony_ciflink:vkCopyMemoryToMicromapEXT or flink:vkCmdCopyMemoryToMicromapEXT with a
7707e5c31af7Sopenharmony_cipname:mode of ename:VK_COPY_MICROMAP_MODE_DESERIALIZE_EXT during replay.
7708e5c31af7Sopenharmony_ci====
7709e5c31af7Sopenharmony_ci
7710e5c31af7Sopenharmony_ciThe input buffers passed to micromap build commands will be referenced by
7711e5c31af7Sopenharmony_cithe implementation for the duration of the command.
7712e5c31af7Sopenharmony_ciMicromaps must: be fully self-contained.
7713e5c31af7Sopenharmony_ciThe application can: reuse or free any memory which was used by the command
7714e5c31af7Sopenharmony_cias an input or as scratch without affecting the results of a subsequent
7715e5c31af7Sopenharmony_ciacceleration structure build using the micromap or traversal of that
7716e5c31af7Sopenharmony_ciacceleration structure.
7717e5c31af7Sopenharmony_ci
7718e5c31af7Sopenharmony_ci.Valid Usage
7719e5c31af7Sopenharmony_ci****
7720e5c31af7Sopenharmony_ci  * [[VUID-vkCreateMicromapEXT-micromap-07430]]
7721e5c31af7Sopenharmony_ci    The <<features-micromap, pname:micromap>> feature must: be enabled
7722e5c31af7Sopenharmony_ci  * [[VUID-vkCreateMicromapEXT-deviceAddress-07431]]
7723e5c31af7Sopenharmony_ci    If slink:VkMicromapCreateInfoEXT::pname:deviceAddress is not zero, the
7724e5c31af7Sopenharmony_ci    <<features-micromapCaptureReplay, pname:micromapCaptureReplay>> feature
7725e5c31af7Sopenharmony_ci    must: be enabled
7726e5c31af7Sopenharmony_ci  * [[VUID-vkCreateMicromapEXT-device-07432]]
7727e5c31af7Sopenharmony_ci    If pname:device was created with multiple physical devices, then the
7728e5c31af7Sopenharmony_ci    <<features-bufferDeviceAddressMultiDevice,
7729e5c31af7Sopenharmony_ci    pname:bufferDeviceAddressMultiDevice>> feature must: be enabled
7730e5c31af7Sopenharmony_ci****
7731e5c31af7Sopenharmony_ci
7732e5c31af7Sopenharmony_ciinclude::{generated}/validity/protos/vkCreateMicromapEXT.adoc[]
7733e5c31af7Sopenharmony_ci--
7734e5c31af7Sopenharmony_ci
7735e5c31af7Sopenharmony_ci[open,refpage='VkMicromapCreateInfoEXT',desc='Structure specifying the parameters of a newly created micromap object',type='structs']
7736e5c31af7Sopenharmony_ci--
7737e5c31af7Sopenharmony_ci:refpage: VkMicromapCreateInfoEXT
7738e5c31af7Sopenharmony_ci
7739e5c31af7Sopenharmony_ciThe sname:VkMicromapCreateInfoEXT structure is defined as:
7740e5c31af7Sopenharmony_ci
7741e5c31af7Sopenharmony_ciinclude::{generated}/api/structs/VkMicromapCreateInfoEXT.adoc[]
7742e5c31af7Sopenharmony_ci
7743e5c31af7Sopenharmony_ci  * pname:sType is a elink:VkStructureType value identifying this structure.
7744e5c31af7Sopenharmony_ci  * pname:pNext is `NULL` or a pointer to a structure extending this
7745e5c31af7Sopenharmony_ci    structure.
7746e5c31af7Sopenharmony_ci  * pname:createFlags is a bitmask of elink:VkMicromapCreateFlagBitsEXT
7747e5c31af7Sopenharmony_ci    specifying additional creation parameters of the micromap.
7748e5c31af7Sopenharmony_ci  * pname:buffer is the buffer on which the micromap will be stored.
7749e5c31af7Sopenharmony_ci  * pname:offset is an offset in bytes from the base address of the buffer
7750e5c31af7Sopenharmony_ci    at which the micromap will be stored, and must: be a multiple of `256`.
7751e5c31af7Sopenharmony_ci  * pname:size is the size required for the micromap.
7752e5c31af7Sopenharmony_ci  * pname:type is a elink:VkMicromapTypeEXT value specifying the type of
7753e5c31af7Sopenharmony_ci    micromap that will be created.
7754e5c31af7Sopenharmony_ci  * pname:deviceAddress is the device address requested for the micromap if
7755e5c31af7Sopenharmony_ci    the <<features-micromapCaptureReplay, pname:micromapCaptureReplay>>
7756e5c31af7Sopenharmony_ci    feature is being used.
7757e5c31af7Sopenharmony_ci
7758e5c31af7Sopenharmony_ciIf pname:deviceAddress is zero, no specific address is requested.
7759e5c31af7Sopenharmony_ci
7760e5c31af7Sopenharmony_ciIf pname:deviceAddress is not zero, pname:deviceAddress must: be an address
7761e5c31af7Sopenharmony_ciretrieved from an identically created micromap on the same implementation.
7762e5c31af7Sopenharmony_ciThe micromap must: also be placed on an identically created pname:buffer and
7763e5c31af7Sopenharmony_ciat the same pname:offset.
7764e5c31af7Sopenharmony_ci
7765e5c31af7Sopenharmony_ciApplications should: avoid creating micromaps with application-provided
7766e5c31af7Sopenharmony_ciaddresses and implementation-provided addresses in the same process, to
7767e5c31af7Sopenharmony_cireduce the likelihood of ename:VK_ERROR_INVALID_OPAQUE_CAPTURE_ADDRESS_KHR
7768e5c31af7Sopenharmony_cierrors.
7769e5c31af7Sopenharmony_ci
7770e5c31af7Sopenharmony_ci[NOTE]
7771e5c31af7Sopenharmony_ci.Note
7772e5c31af7Sopenharmony_ci====
7773e5c31af7Sopenharmony_ciThe expected usage for this is that a trace capture/replay tool will add the
7774e5c31af7Sopenharmony_ciename:VK_BUFFER_CREATE_DEVICE_ADDRESS_CAPTURE_REPLAY_BIT flag to all buffers
7775e5c31af7Sopenharmony_cithat use ename:VK_BUFFER_USAGE_SHADER_DEVICE_ADDRESS_BIT, and will add
7776e5c31af7Sopenharmony_ciename:VK_BUFFER_USAGE_SHADER_DEVICE_ADDRESS_BIT to all buffers used as
7777e5c31af7Sopenharmony_cistorage for a micromap where pname:deviceAddress is not zero.
7778e5c31af7Sopenharmony_ciThis also means that the tool will need to add
7779e5c31af7Sopenharmony_ciename:VK_MEMORY_ALLOCATE_DEVICE_ADDRESS_BIT to memory allocations to allow
7780e5c31af7Sopenharmony_cithe flag to be set where the application may not have otherwise required it.
7781e5c31af7Sopenharmony_ciDuring capture the tool will save the queried opaque device addresses in the
7782e5c31af7Sopenharmony_citrace.
7783e5c31af7Sopenharmony_ciDuring replay, the buffers will be created specifying the original address
7784e5c31af7Sopenharmony_ciso any address values stored in the trace data will remain valid.
7785e5c31af7Sopenharmony_ci
7786e5c31af7Sopenharmony_ciImplementations are expected to separate such buffers in the GPU address
7787e5c31af7Sopenharmony_cispace so normal allocations will avoid using these addresses.
7788e5c31af7Sopenharmony_ciApps/tools should avoid mixing app-provided and implementation-provided
7789e5c31af7Sopenharmony_ciaddresses for buffers created with
7790e5c31af7Sopenharmony_ciename:VK_BUFFER_CREATE_DEVICE_ADDRESS_CAPTURE_REPLAY_BIT, to avoid address
7791e5c31af7Sopenharmony_cispace allocation conflicts.
7792e5c31af7Sopenharmony_ci====
7793e5c31af7Sopenharmony_ci
7794e5c31af7Sopenharmony_ci
7795e5c31af7Sopenharmony_ciIf the micromap will be the target of a build operation, the required size
7796e5c31af7Sopenharmony_cifor a micromap can: be queried with flink:vkGetMicromapBuildSizesEXT.
7797e5c31af7Sopenharmony_ci
7798e5c31af7Sopenharmony_ci.Valid Usage
7799e5c31af7Sopenharmony_ci****
7800e5c31af7Sopenharmony_ci  * [[VUID-VkMicromapCreateInfoEXT-deviceAddress-07433]]
7801e5c31af7Sopenharmony_ci    If pname:deviceAddress is not zero, pname:createFlags must: include
7802e5c31af7Sopenharmony_ci    ename:VK_MICROMAP_CREATE_DEVICE_ADDRESS_CAPTURE_REPLAY_BIT_EXT
7803e5c31af7Sopenharmony_ci  * [[VUID-VkMicromapCreateInfoEXT-createFlags-07434]]
7804e5c31af7Sopenharmony_ci    If pname:createFlags includes
7805e5c31af7Sopenharmony_ci    ename:VK_MICROMAP_CREATE_DEVICE_ADDRESS_CAPTURE_REPLAY_BIT_EXT,
7806e5c31af7Sopenharmony_ci    slink:VkPhysicalDeviceOpacityMicromapFeaturesEXT::pname:micromapCaptureReplay
7807e5c31af7Sopenharmony_ci    must: be ename:VK_TRUE
7808e5c31af7Sopenharmony_ci  * [[VUID-VkMicromapCreateInfoEXT-buffer-07435]]
7809e5c31af7Sopenharmony_ci    pname:buffer must: have been created with a pname:usage value containing
7810e5c31af7Sopenharmony_ci    ename:VK_BUFFER_USAGE_MICROMAP_STORAGE_BIT_EXT
7811e5c31af7Sopenharmony_ci  * [[VUID-VkMicromapCreateInfoEXT-buffer-07436]]
7812e5c31af7Sopenharmony_ci    pname:buffer must: not have been created with
7813e5c31af7Sopenharmony_ci    ename:VK_BUFFER_CREATE_SPARSE_RESIDENCY_BIT
7814e5c31af7Sopenharmony_ci  * [[VUID-VkMicromapCreateInfoEXT-offset-07437]]
7815e5c31af7Sopenharmony_ci    The sum of pname:offset and pname:size must: be less than the size of
7816e5c31af7Sopenharmony_ci    pname:buffer
7817e5c31af7Sopenharmony_ci  * [[VUID-VkMicromapCreateInfoEXT-offset-07438]]
7818e5c31af7Sopenharmony_ci    pname:offset must: be a multiple of `256` bytes
7819e5c31af7Sopenharmony_ci****
7820e5c31af7Sopenharmony_ci
7821e5c31af7Sopenharmony_ciinclude::{generated}/validity/structs/VkMicromapCreateInfoEXT.adoc[]
7822e5c31af7Sopenharmony_ci--
7823e5c31af7Sopenharmony_ci
7824e5c31af7Sopenharmony_ci[open,refpage='vkGetMicromapBuildSizesEXT',desc='Retrieve the required size for a micromap',type='protos']
7825e5c31af7Sopenharmony_ci--
7826e5c31af7Sopenharmony_ci:refpage: vkGetMicromapBuildSizesEXT
7827e5c31af7Sopenharmony_ci
7828e5c31af7Sopenharmony_ciTo get the build sizes for a micromap, call:
7829e5c31af7Sopenharmony_ci
7830e5c31af7Sopenharmony_ciinclude::{generated}/api/protos/vkGetMicromapBuildSizesEXT.adoc[]
7831e5c31af7Sopenharmony_ci
7832e5c31af7Sopenharmony_ci  * pname:device is the logical device that will be used for creating the
7833e5c31af7Sopenharmony_ci    micromap.
7834e5c31af7Sopenharmony_ci  * pname:buildType defines whether host or device operations (or both) are
7835e5c31af7Sopenharmony_ci    being queried for.
7836e5c31af7Sopenharmony_ci  * pname:pBuildInfo is a pointer to a slink:VkMicromapBuildInfoEXT
7837e5c31af7Sopenharmony_ci    structure describing parameters of a build operation.
7838e5c31af7Sopenharmony_ci  * pname:pSizeInfo is a pointer to a slink:VkMicromapBuildSizesInfoEXT
7839e5c31af7Sopenharmony_ci    structure which returns the size required for a micromap and the sizes
7840e5c31af7Sopenharmony_ci    required for the scratch buffers, given the build parameters.
7841e5c31af7Sopenharmony_ci
7842e5c31af7Sopenharmony_ciThe pname:dstMicromap and pname:mode members of pname:pBuildInfo are
7843e5c31af7Sopenharmony_ciignored.
7844e5c31af7Sopenharmony_ciAny slink:VkDeviceOrHostAddressKHR members of pname:pBuildInfo are ignored
7845e5c31af7Sopenharmony_ciby this command.
7846e5c31af7Sopenharmony_ci
7847e5c31af7Sopenharmony_ciA micromap created with the pname:micromapSize returned by this command
7848e5c31af7Sopenharmony_cisupports any build with a slink:VkMicromapBuildInfoEXT structure subject to
7849e5c31af7Sopenharmony_cithe following properties:
7850e5c31af7Sopenharmony_ci
7851e5c31af7Sopenharmony_ci  * The build command is a host build command, and pname:buildType is
7852e5c31af7Sopenharmony_ci    ename:VK_ACCELERATION_STRUCTURE_BUILD_TYPE_HOST_KHR or
7853e5c31af7Sopenharmony_ci    ename:VK_ACCELERATION_STRUCTURE_BUILD_TYPE_HOST_OR_DEVICE_KHR
7854e5c31af7Sopenharmony_ci  * The build command is a device build command, and pname:buildType is
7855e5c31af7Sopenharmony_ci    ename:VK_ACCELERATION_STRUCTURE_BUILD_TYPE_DEVICE_KHR or
7856e5c31af7Sopenharmony_ci    ename:VK_ACCELERATION_STRUCTURE_BUILD_TYPE_HOST_OR_DEVICE_KHR
7857e5c31af7Sopenharmony_ci  * For slink:VkMicromapBuildInfoEXT:
7858e5c31af7Sopenharmony_ci  ** Its pname:type, and pname:flags members are equal to
7859e5c31af7Sopenharmony_ci     pname:pBuildInfo->type and pname:pBuildInfo->flags, respectively.
7860e5c31af7Sopenharmony_ci  ** The sum of usage information in either pname:pUsageCounts or
7861e5c31af7Sopenharmony_ci     pname:ppUsageCounts is equal to the sum of usage information in either
7862e5c31af7Sopenharmony_ci     pname:pBuildInfo->pUsageCounts or pname:pBuildInfo->ppUsageCounts.
7863e5c31af7Sopenharmony_ci
7864e5c31af7Sopenharmony_ciSimilarly, the pname:buildScratchSize value will support any build command
7865e5c31af7Sopenharmony_cispecifying the ename:VK_BUILD_MICROMAP_MODE_BUILD_EXT pname:mode under the
7866e5c31af7Sopenharmony_ciabove conditions.
7867e5c31af7Sopenharmony_ci
7868e5c31af7Sopenharmony_ci.Valid Usage
7869e5c31af7Sopenharmony_ci****
7870e5c31af7Sopenharmony_ci  * [[VUID-vkGetMicromapBuildSizesEXT-dstMicromap-09180]]
7871e5c31af7Sopenharmony_ci    slink:VkMicromapBuildInfoEXT::pname:dstMicromap must: have been created
7872e5c31af7Sopenharmony_ci    from pname:device
7873e5c31af7Sopenharmony_ci  * [[VUID-vkGetMicromapBuildSizesEXT-micromap-07439]]
7874e5c31af7Sopenharmony_ci    The <<features-micromap, pname:micromap>> feature must: be enabled
7875e5c31af7Sopenharmony_ci  * [[VUID-vkGetMicromapBuildSizesEXT-device-07440]]
7876e5c31af7Sopenharmony_ci    If pname:device was created with multiple physical devices, then the
7877e5c31af7Sopenharmony_ci    <<features-bufferDeviceAddressMultiDevice,
7878e5c31af7Sopenharmony_ci    pname:bufferDeviceAddressMultiDevice>> feature must: be enabled
7879e5c31af7Sopenharmony_ci****
7880e5c31af7Sopenharmony_ci
7881e5c31af7Sopenharmony_ciinclude::{generated}/validity/protos/vkGetMicromapBuildSizesEXT.adoc[]
7882e5c31af7Sopenharmony_ci--
7883e5c31af7Sopenharmony_ci
7884e5c31af7Sopenharmony_ci[open,refpage='VkMicromapBuildSizesInfoEXT',desc='Structure specifying build sizes for a micromap',type='structs']
7885e5c31af7Sopenharmony_ci--
7886e5c31af7Sopenharmony_ci:refpage: VkMicromapBuildSizesInfoEXT
7887e5c31af7Sopenharmony_ci
7888e5c31af7Sopenharmony_ciThe sname:VkMicromapBuildSizesInfoEXT structure describes the required build
7889e5c31af7Sopenharmony_cisizes for a micromap and scratch buffers and is defined as:
7890e5c31af7Sopenharmony_ci
7891e5c31af7Sopenharmony_ciinclude::{generated}/api/structs/VkMicromapBuildSizesInfoEXT.adoc[]
7892e5c31af7Sopenharmony_ci
7893e5c31af7Sopenharmony_ci  * pname:sType is a elink:VkStructureType value identifying this structure.
7894e5c31af7Sopenharmony_ci  * pname:pNext is `NULL` or a pointer to a structure extending this
7895e5c31af7Sopenharmony_ci    structure.
7896e5c31af7Sopenharmony_ci  * pname:micromapSize is the size in bytes required in a
7897e5c31af7Sopenharmony_ci    slink:VkMicromapEXT for a build or update operation.
7898e5c31af7Sopenharmony_ci  * pname:buildScratchSize is the size in bytes required in a scratch buffer
7899e5c31af7Sopenharmony_ci    for a build operation.
7900e5c31af7Sopenharmony_ci  * pname:discardable indicates whether or not the micromap object may be
7901e5c31af7Sopenharmony_ci    destroyed after an acceleration structure build or update.
7902e5c31af7Sopenharmony_ci    A false value means that acceleration structures built with this
7903e5c31af7Sopenharmony_ci    micromap may: contain references to the data contained therein, and the
7904e5c31af7Sopenharmony_ci    application must: not destroy the micromap until ray traversal has
7905e5c31af7Sopenharmony_ci    concluded.
7906e5c31af7Sopenharmony_ci    A true value means that the information in the micromap will be copied
7907e5c31af7Sopenharmony_ci    by value into the acceleration structure, and the micromap may: be
7908e5c31af7Sopenharmony_ci    destroyed after the acceleration structure build concludes.
7909e5c31af7Sopenharmony_ci
7910e5c31af7Sopenharmony_ciinclude::{generated}/validity/structs/VkMicromapBuildSizesInfoEXT.adoc[]
7911e5c31af7Sopenharmony_ci--
7912e5c31af7Sopenharmony_ci
7913e5c31af7Sopenharmony_ci[open,refpage='VkMicromapTypeEXT',desc='Type of micromap',type='enums']
7914e5c31af7Sopenharmony_ci--
7915e5c31af7Sopenharmony_ci:refpage: VkMicromapTypeEXT
7916e5c31af7Sopenharmony_ci
7917e5c31af7Sopenharmony_ciValues which can: be set in slink:VkMicromapCreateInfoEXT::pname:type
7918e5c31af7Sopenharmony_cispecifying the type of micromap, are:
7919e5c31af7Sopenharmony_ci
7920e5c31af7Sopenharmony_ciinclude::{generated}/api/enums/VkMicromapTypeEXT.adoc[]
7921e5c31af7Sopenharmony_ci
7922e5c31af7Sopenharmony_ci  * ename:VK_MICROMAP_TYPE_OPACITY_MICROMAP_EXT is a micromap containing
7923e5c31af7Sopenharmony_ci    data to control the opacity of a triangle.
7924e5c31af7Sopenharmony_ciifdef::VK_NV_displacement_micromap[]
7925e5c31af7Sopenharmony_ci  * ename:VK_MICROMAP_TYPE_DISPLACEMENT_MICROMAP_NV is a micromap containing
7926e5c31af7Sopenharmony_ci    data to control the displacement of subtriangles within a triangle.
7927e5c31af7Sopenharmony_ciendif::VK_NV_displacement_micromap[]
7928e5c31af7Sopenharmony_ci
7929e5c31af7Sopenharmony_ci--
7930e5c31af7Sopenharmony_ci
7931e5c31af7Sopenharmony_ci[open,refpage='VkMicromapCreateFlagBitsEXT',desc='Bitmask specifying additional creation parameters for micromap',type='enums']
7932e5c31af7Sopenharmony_ci--
7933e5c31af7Sopenharmony_ciBits which can: be set in slink:VkMicromapCreateInfoEXT::pname:createFlags,
7934e5c31af7Sopenharmony_cispecifying additional creation parameters for micromaps, are:
7935e5c31af7Sopenharmony_ci
7936e5c31af7Sopenharmony_ciinclude::{generated}/api/enums/VkMicromapCreateFlagBitsEXT.adoc[]
7937e5c31af7Sopenharmony_ci
7938e5c31af7Sopenharmony_ci  * ename:VK_MICROMAP_CREATE_DEVICE_ADDRESS_CAPTURE_REPLAY_BIT_EXT specifies
7939e5c31af7Sopenharmony_ci    that the micromap's address can: be saved and reused on a subsequent
7940e5c31af7Sopenharmony_ci    run.
7941e5c31af7Sopenharmony_ci--
7942e5c31af7Sopenharmony_ci
7943e5c31af7Sopenharmony_ci[open,refpage='VkMicromapCreateFlagsEXT',desc='Bitmask of VkMicromapCreateFlagBitsEXT',type='flags']
7944e5c31af7Sopenharmony_ci--
7945e5c31af7Sopenharmony_ciinclude::{generated}/api/flags/VkMicromapCreateFlagsEXT.adoc[]
7946e5c31af7Sopenharmony_ci
7947e5c31af7Sopenharmony_citname:VkMicromapCreateFlagsEXT is a bitmask type for setting a mask of zero
7948e5c31af7Sopenharmony_cior more elink:VkMicromapCreateFlagBitsEXT.
7949e5c31af7Sopenharmony_ci--
7950e5c31af7Sopenharmony_ci
7951e5c31af7Sopenharmony_ci[open,refpage='VkBuildMicromapFlagBitsEXT',desc='Bitmask specifying additional parameters for micromap builds',type='enums',alias='VkBuildMicromapFlagBitsNV']
7952e5c31af7Sopenharmony_ci--
7953e5c31af7Sopenharmony_ci:refpage: VkBuildMicromapFlagBitsEXT
7954e5c31af7Sopenharmony_ci
7955e5c31af7Sopenharmony_ciBits which can: be set in slink:VkMicromapBuildInfoEXT::pname:flags
7956e5c31af7Sopenharmony_cispecifying additional parameters for micromap builds, are:
7957e5c31af7Sopenharmony_ci
7958e5c31af7Sopenharmony_ciinclude::{generated}/api/enums/VkBuildMicromapFlagBitsEXT.adoc[]
7959e5c31af7Sopenharmony_ci
7960e5c31af7Sopenharmony_ci  * ename:VK_BUILD_MICROMAP_PREFER_FAST_TRACE_BIT_EXT indicates that the
7961e5c31af7Sopenharmony_ci    given micromap build should: prioritize trace performance over build
7962e5c31af7Sopenharmony_ci    time.
7963e5c31af7Sopenharmony_ci  * ename:VK_BUILD_MICROMAP_PREFER_FAST_BUILD_BIT_EXT indicates that the
7964e5c31af7Sopenharmony_ci    given micromap build should: prioritize build time over trace
7965e5c31af7Sopenharmony_ci    performance.
7966e5c31af7Sopenharmony_ci--
7967e5c31af7Sopenharmony_ci
7968e5c31af7Sopenharmony_ci[open,refpage='VkBuildMicromapFlagsEXT',desc='Bitmask of VkBuildMicromapFlagBitsEXT',type='flags',alias='VkBuildMicromapFlagsNV']
7969e5c31af7Sopenharmony_ci--
7970e5c31af7Sopenharmony_ci:refpage: VkBuildMicromapFlagsEXT
7971e5c31af7Sopenharmony_ci
7972e5c31af7Sopenharmony_ciinclude::{generated}/api/flags/VkBuildMicromapFlagsEXT.adoc[]
7973e5c31af7Sopenharmony_ci
7974e5c31af7Sopenharmony_citname:VkBuildMicromapFlagsEXT is a bitmask type for setting a mask of zero
7975e5c31af7Sopenharmony_cior more elink:VkBuildMicromapFlagBitsEXT.
7976e5c31af7Sopenharmony_ci--
7977e5c31af7Sopenharmony_ci
7978e5c31af7Sopenharmony_ci[open,refpage='vkDestroyMicromapEXT',desc='Destroy a micromap object',type='protos']
7979e5c31af7Sopenharmony_ci--
7980e5c31af7Sopenharmony_ci:refpage: vkDestroyMicromapEXT
7981e5c31af7Sopenharmony_ci
7982e5c31af7Sopenharmony_ciTo destroy a micromap, call:
7983e5c31af7Sopenharmony_ci
7984e5c31af7Sopenharmony_ciinclude::{generated}/api/protos/vkDestroyMicromapEXT.adoc[]
7985e5c31af7Sopenharmony_ci
7986e5c31af7Sopenharmony_ci  * pname:device is the logical device that destroys the micromap.
7987e5c31af7Sopenharmony_ci  * pname:micromap is the micromap to destroy.
7988e5c31af7Sopenharmony_ci  * pname:pAllocator controls host memory allocation as described in the
7989e5c31af7Sopenharmony_ci    <<memory-allocation, Memory Allocation>> chapter.
7990e5c31af7Sopenharmony_ci
7991e5c31af7Sopenharmony_ci.Valid Usage
7992e5c31af7Sopenharmony_ci****
7993e5c31af7Sopenharmony_ci  * [[VUID-vkDestroyMicromapEXT-micromap-07441]]
7994e5c31af7Sopenharmony_ci    All submitted commands that refer to pname:micromap must: have completed
7995e5c31af7Sopenharmony_ci    execution
7996e5c31af7Sopenharmony_ci  * [[VUID-vkDestroyMicromapEXT-micromap-07442]]
7997e5c31af7Sopenharmony_ci    If sname:VkAllocationCallbacks were provided when pname:micromap was
7998e5c31af7Sopenharmony_ci    created, a compatible set of callbacks must: be provided here
7999e5c31af7Sopenharmony_ci  * [[VUID-vkDestroyMicromapEXT-micromap-07443]]
8000e5c31af7Sopenharmony_ci    If no sname:VkAllocationCallbacks were provided when pname:micromap was
8001e5c31af7Sopenharmony_ci    created, pname:pAllocator must: be `NULL`
8002e5c31af7Sopenharmony_ci****
8003e5c31af7Sopenharmony_ci
8004e5c31af7Sopenharmony_ciinclude::{generated}/validity/protos/vkDestroyMicromapEXT.adoc[]
8005e5c31af7Sopenharmony_ci--
8006e5c31af7Sopenharmony_ci
8007e5c31af7Sopenharmony_ciendif::VK_EXT_opacity_micromap[]
8008e5c31af7Sopenharmony_ci
8009e5c31af7Sopenharmony_ci
8010e5c31af7Sopenharmony_ci[[resources-association]]
8011e5c31af7Sopenharmony_ci== Resource Memory Association
8012e5c31af7Sopenharmony_ci
8013e5c31af7Sopenharmony_ciResources are initially created as _virtual allocations_ with no backing
8014e5c31af7Sopenharmony_cimemory.
8015e5c31af7Sopenharmony_ciDevice memory is allocated separately (see <<memory-device>>) and then
8016e5c31af7Sopenharmony_ciassociated with the resource.
8017e5c31af7Sopenharmony_ciThis association is done differently for sparse and non-sparse resources.
8018e5c31af7Sopenharmony_ci
8019e5c31af7Sopenharmony_ciResources created with any of the sparse creation flags are considered
8020e5c31af7Sopenharmony_cisparse resources.
8021e5c31af7Sopenharmony_ciResources created without these flags are non-sparse.
8022e5c31af7Sopenharmony_ciThe details on resource memory association for sparse resources is described
8023e5c31af7Sopenharmony_ciin <<sparsememory>>.
8024e5c31af7Sopenharmony_ci
8025e5c31af7Sopenharmony_ciNon-sparse resources must: be bound completely and contiguously to a single
8026e5c31af7Sopenharmony_cisname:VkDeviceMemory object before the resource is passed as a parameter to
8027e5c31af7Sopenharmony_ciany of the following operations:
8028e5c31af7Sopenharmony_ci
8029e5c31af7Sopenharmony_ci  * creating image or buffer views
8030e5c31af7Sopenharmony_ci  * updating descriptor sets
8031e5c31af7Sopenharmony_ci  * recording commands in a command buffer
8032e5c31af7Sopenharmony_ci
8033e5c31af7Sopenharmony_ciOnce bound, the memory binding is immutable for the lifetime of the
8034e5c31af7Sopenharmony_ciresource.
8035e5c31af7Sopenharmony_ci
8036e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_1,VK_KHR_device_group[]
8037e5c31af7Sopenharmony_ci
8038e5c31af7Sopenharmony_ciIn a logical device representing more than one physical device, buffer and
8039e5c31af7Sopenharmony_ciimage resources exist on all physical devices but can: be bound to memory
8040e5c31af7Sopenharmony_cidifferently on each.
8041e5c31af7Sopenharmony_ciEach such replicated resource is an _instance_ of the resource.
8042e5c31af7Sopenharmony_ciFor sparse resources, each instance can: be bound to memory arbitrarily
8043e5c31af7Sopenharmony_cidifferently.
8044e5c31af7Sopenharmony_ciFor non-sparse resources, each instance can: either be bound to the local or
8045e5c31af7Sopenharmony_cia peer instance of the memory, or for images can: be bound to rectangular
8046e5c31af7Sopenharmony_ciregions from the local and/or peer instances.
8047e5c31af7Sopenharmony_ciWhen a resource is used in a descriptor set, each physical device interprets
8048e5c31af7Sopenharmony_cithe descriptor according to its own instance's binding to memory.
8049e5c31af7Sopenharmony_ci
8050e5c31af7Sopenharmony_ci[NOTE]
8051e5c31af7Sopenharmony_ci.Note
8052e5c31af7Sopenharmony_ci====
8053e5c31af7Sopenharmony_ciThere are no new copy commands to transfer data between physical devices.
8054e5c31af7Sopenharmony_ciInstead, an application can: create a resource with a peer mapping and use
8055e5c31af7Sopenharmony_ciit as the source or destination of a transfer command executed by a single
8056e5c31af7Sopenharmony_ciphysical device to copy the data from one physical device to another.
8057e5c31af7Sopenharmony_ci====
8058e5c31af7Sopenharmony_ci
8059e5c31af7Sopenharmony_ciendif::VK_VERSION_1_1,VK_KHR_device_group[]
8060e5c31af7Sopenharmony_ci
8061e5c31af7Sopenharmony_ci[open,refpage='vkGetBufferMemoryRequirements',desc='Returns the memory requirements for specified Vulkan object',type='protos']
8062e5c31af7Sopenharmony_ci--
8063e5c31af7Sopenharmony_ciTo determine the memory requirements for a buffer resource, call:
8064e5c31af7Sopenharmony_ci
8065e5c31af7Sopenharmony_ciinclude::{generated}/api/protos/vkGetBufferMemoryRequirements.adoc[]
8066e5c31af7Sopenharmony_ci
8067e5c31af7Sopenharmony_ci  * pname:device is the logical device that owns the buffer.
8068e5c31af7Sopenharmony_ci  * pname:buffer is the buffer to query.
8069e5c31af7Sopenharmony_ci  * pname:pMemoryRequirements is a pointer to a slink:VkMemoryRequirements
8070e5c31af7Sopenharmony_ci    structure in which the memory requirements of the buffer object are
8071e5c31af7Sopenharmony_ci    returned.
8072e5c31af7Sopenharmony_ci
8073e5c31af7Sopenharmony_ciinclude::{generated}/validity/protos/vkGetBufferMemoryRequirements.adoc[]
8074e5c31af7Sopenharmony_ci--
8075e5c31af7Sopenharmony_ci
8076e5c31af7Sopenharmony_ci[open,refpage='vkGetImageMemoryRequirements',desc='Returns the memory requirements for specified Vulkan object',type='protos']
8077e5c31af7Sopenharmony_ci--
8078e5c31af7Sopenharmony_ciifndef::VK_VERSION_1_1,VK_KHR_sampler_ycbcr_conversion[]
8079e5c31af7Sopenharmony_ciTo determine the memory requirements for an image resource, call:
8080e5c31af7Sopenharmony_ciendif::VK_VERSION_1_1,VK_KHR_sampler_ycbcr_conversion[]
8081e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_1,VK_KHR_sampler_ycbcr_conversion[]
8082e5c31af7Sopenharmony_ciTo determine the memory requirements for an image resource which is not
8083e5c31af7Sopenharmony_cicreated with the ename:VK_IMAGE_CREATE_DISJOINT_BIT flag set, call:
8084e5c31af7Sopenharmony_ciendif::VK_VERSION_1_1,VK_KHR_sampler_ycbcr_conversion[]
8085e5c31af7Sopenharmony_ci
8086e5c31af7Sopenharmony_ciinclude::{generated}/api/protos/vkGetImageMemoryRequirements.adoc[]
8087e5c31af7Sopenharmony_ci
8088e5c31af7Sopenharmony_ci  * pname:device is the logical device that owns the image.
8089e5c31af7Sopenharmony_ci  * pname:image is the image to query.
8090e5c31af7Sopenharmony_ci  * pname:pMemoryRequirements is a pointer to a slink:VkMemoryRequirements
8091e5c31af7Sopenharmony_ci    structure in which the memory requirements of the image object are
8092e5c31af7Sopenharmony_ci    returned.
8093e5c31af7Sopenharmony_ci
8094e5c31af7Sopenharmony_ci.Valid Usage
8095e5c31af7Sopenharmony_ci****
8096e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_1,VK_KHR_sampler_ycbcr_conversion[]
8097e5c31af7Sopenharmony_ci  * [[VUID-vkGetImageMemoryRequirements-image-01588]]
8098e5c31af7Sopenharmony_ci    pname:image must: not have been created with the
8099e5c31af7Sopenharmony_ci    ename:VK_IMAGE_CREATE_DISJOINT_BIT flag set
8100e5c31af7Sopenharmony_ciendif::VK_VERSION_1_1,VK_KHR_sampler_ycbcr_conversion[]
8101e5c31af7Sopenharmony_ciifdef::VK_ANDROID_external_memory_android_hardware_buffer[]
8102e5c31af7Sopenharmony_ci  * [[VUID-vkGetImageMemoryRequirements-image-04004]]
8103e5c31af7Sopenharmony_ci    If pname:image was created with the
8104e5c31af7Sopenharmony_ci    ename:VK_EXTERNAL_MEMORY_HANDLE_TYPE_ANDROID_HARDWARE_BUFFER_BIT_ANDROID
8105e5c31af7Sopenharmony_ci    external memory handle type, then pname:image must: be bound to memory
8106e5c31af7Sopenharmony_ciendif::VK_ANDROID_external_memory_android_hardware_buffer[]
8107e5c31af7Sopenharmony_ciifdef::VK_QNX_external_memory_screen_buffer[]
8108e5c31af7Sopenharmony_ci  * [[VUID-vkGetImageMemoryRequirements-image-08960]]
8109e5c31af7Sopenharmony_ci    If pname:image was created with the
8110e5c31af7Sopenharmony_ci    ename:VK_EXTERNAL_MEMORY_HANDLE_TYPE_SCREEN_BUFFER_BIT_QNX external
8111e5c31af7Sopenharmony_ci    memory handle type, then pname:image must: be bound to memory
8112e5c31af7Sopenharmony_ciendif::VK_QNX_external_memory_screen_buffer[]
8113e5c31af7Sopenharmony_ci****
8114e5c31af7Sopenharmony_ci
8115e5c31af7Sopenharmony_ciinclude::{generated}/validity/protos/vkGetImageMemoryRequirements.adoc[]
8116e5c31af7Sopenharmony_ci--
8117e5c31af7Sopenharmony_ci
8118e5c31af7Sopenharmony_ci[open,refpage='VkMemoryRequirements',desc='Structure specifying memory requirements',type='structs']
8119e5c31af7Sopenharmony_ci--
8120e5c31af7Sopenharmony_ciThe sname:VkMemoryRequirements structure is defined as:
8121e5c31af7Sopenharmony_ci
8122e5c31af7Sopenharmony_ciinclude::{generated}/api/structs/VkMemoryRequirements.adoc[]
8123e5c31af7Sopenharmony_ci
8124e5c31af7Sopenharmony_ci  * pname:size is the size, in bytes, of the memory allocation required: for
8125e5c31af7Sopenharmony_ci    the resource.
8126e5c31af7Sopenharmony_ci  * pname:alignment is the alignment, in bytes, of the offset within the
8127e5c31af7Sopenharmony_ci    allocation required: for the resource.
8128e5c31af7Sopenharmony_ci  * pname:memoryTypeBits is a bitmask and contains one bit set for every
8129e5c31af7Sopenharmony_ci    supported memory type for the resource.
8130e5c31af7Sopenharmony_ci    Bit `i` is set if and only if the memory type `i` in the
8131e5c31af7Sopenharmony_ci    sname:VkPhysicalDeviceMemoryProperties structure for the physical device
8132e5c31af7Sopenharmony_ci    is supported for the resource.
8133e5c31af7Sopenharmony_ci
8134e5c31af7Sopenharmony_ciinclude::{generated}/validity/structs/VkMemoryRequirements.adoc[]
8135e5c31af7Sopenharmony_ci--
8136e5c31af7Sopenharmony_ci
8137e5c31af7Sopenharmony_ciifdef::VK_ANDROID_external_memory_android_hardware_buffer[]
8138e5c31af7Sopenharmony_ciThe precise size of images that will be bound to external Android hardware
8139e5c31af7Sopenharmony_cibuffer memory is unknown until the memory has been imported or allocated, so
8140e5c31af7Sopenharmony_ciapplications must: not call flink:vkGetImageMemoryRequirements or
8141e5c31af7Sopenharmony_ciflink:vkGetImageMemoryRequirements2 with such an slink:VkImage before it has
8142e5c31af7Sopenharmony_cibeen bound to memory.
8143e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_3,VK_KHR_maintenance4[]
8144e5c31af7Sopenharmony_ciFor this reason, applications also must: not call
8145e5c31af7Sopenharmony_ciflink:vkGetDeviceImageMemoryRequirements with a slink:VkImageCreateInfo
8146e5c31af7Sopenharmony_cidescribing an external Android hardware buffer.
8147e5c31af7Sopenharmony_ciendif::VK_VERSION_1_3,VK_KHR_maintenance4[]
8148e5c31af7Sopenharmony_ciWhen importing Android hardware buffer memory, the pname:allocationSize can:
8149e5c31af7Sopenharmony_cibe determined by calling flink:vkGetAndroidHardwareBufferPropertiesANDROID.
8150e5c31af7Sopenharmony_ciWhen allocating new memory for a slink:VkImage that can: be exported to an
8151e5c31af7Sopenharmony_ciAndroid hardware buffer, the memory's pname:allocationSize must: be zero;
8152e5c31af7Sopenharmony_cithe actual size will be determined by the dedicated image's parameters.
8153e5c31af7Sopenharmony_ciAfter the memory has been allocated, the amount of space allocated from the
8154e5c31af7Sopenharmony_cimemory's heap can: be obtained by getting the image's memory requirements or
8155e5c31af7Sopenharmony_ciby calling flink:vkGetAndroidHardwareBufferPropertiesANDROID with the
8156e5c31af7Sopenharmony_ciAndroid hardware buffer exported from the memory.
8157e5c31af7Sopenharmony_ci
8158e5c31af7Sopenharmony_ciWhen allocating new memory for a slink:VkBuffer that can: be exported to an
8159e5c31af7Sopenharmony_ciAndroid hardware buffer an application may: still call
8160e5c31af7Sopenharmony_ciflink:vkGetBufferMemoryRequirements or flink:vkGetBufferMemoryRequirements2
8161e5c31af7Sopenharmony_ciwith slink:VkBuffer before it has been bound to memory.
8162e5c31af7Sopenharmony_ciendif::VK_ANDROID_external_memory_android_hardware_buffer[]
8163e5c31af7Sopenharmony_ci
8164e5c31af7Sopenharmony_ciifdef::VK_KHR_external_memory_win32[]
8165e5c31af7Sopenharmony_ciIf the resource being queried was created with the
8166e5c31af7Sopenharmony_ciename:VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_TEXTURE_BIT,
8167e5c31af7Sopenharmony_ciename:VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_TEXTURE_KMT_BIT, or
8168e5c31af7Sopenharmony_ciename:VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D12_RESOURCE_BIT external memory
8169e5c31af7Sopenharmony_cihandle type, the value of pname:size has no meaning and should: be ignored.
8170e5c31af7Sopenharmony_ciendif::VK_KHR_external_memory_win32[]
8171e5c31af7Sopenharmony_ci
8172e5c31af7Sopenharmony_ciThe implementation guarantees certain properties about the memory
8173e5c31af7Sopenharmony_cirequirements returned by
8174e5c31af7Sopenharmony_ciifdef::VK_KHR_get_memory_requirements2[]
8175e5c31af7Sopenharmony_ciflink:vkGetBufferMemoryRequirements2, flink:vkGetImageMemoryRequirements2,
8176e5c31af7Sopenharmony_ciendif::VK_KHR_get_memory_requirements2[]
8177e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_3,VK_KHR_maintenance4[]
8178e5c31af7Sopenharmony_ciflink:vkGetDeviceBufferMemoryRequirements,
8179e5c31af7Sopenharmony_ciflink:vkGetDeviceImageMemoryRequirements,
8180e5c31af7Sopenharmony_ciendif::VK_VERSION_1_3,VK_KHR_maintenance4[]
8181e5c31af7Sopenharmony_ciflink:vkGetBufferMemoryRequirements and flink:vkGetImageMemoryRequirements:
8182e5c31af7Sopenharmony_ci
8183e5c31af7Sopenharmony_ci  * The pname:memoryTypeBits member always contains at least one bit set.
8184e5c31af7Sopenharmony_ci  * If pname:buffer is a sname:VkBuffer not created with the
8185e5c31af7Sopenharmony_ci    ename:VK_BUFFER_CREATE_SPARSE_BINDING_BIT or
8186e5c31af7Sopenharmony_ci    ename:VK_BUFFER_CREATE_PROTECTED_BIT bits set, or if pname:image is a
8187e5c31af7Sopenharmony_ci    <<glossary-linear-resource,linear>> image that was not created with the
8188e5c31af7Sopenharmony_ci    ename:VK_IMAGE_CREATE_PROTECTED_BIT bit set, then the
8189e5c31af7Sopenharmony_ci    pname:memoryTypeBits member always contains at least one bit set
8190e5c31af7Sopenharmony_ci    corresponding to a sname:VkMemoryType with a pname:propertyFlags that
8191e5c31af7Sopenharmony_ci    has both the ename:VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT bit and the
8192e5c31af7Sopenharmony_ci    ename:VK_MEMORY_PROPERTY_HOST_COHERENT_BIT bit set.
8193e5c31af7Sopenharmony_ci    In other words, mappable coherent memory can: always be attached to
8194e5c31af7Sopenharmony_ci    these objects.
8195e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_1,VK_KHR_external_memory[]
8196e5c31af7Sopenharmony_ci  * If pname:buffer was created with
8197e5c31af7Sopenharmony_ci    slink:VkExternalMemoryBufferCreateInfo::pname:handleTypes set to `0` or
8198e5c31af7Sopenharmony_ci    pname:image was created with
8199e5c31af7Sopenharmony_ci    slink:VkExternalMemoryImageCreateInfo::pname:handleTypes set to `0`, the
8200e5c31af7Sopenharmony_ciendif::VK_VERSION_1_1,VK_KHR_external_memory[]
8201e5c31af7Sopenharmony_ciifndef::VK_VERSION_1_1,VK_KHR_external_memory[]
8202e5c31af7Sopenharmony_ci  * The
8203e5c31af7Sopenharmony_ciendif::VK_VERSION_1_1,VK_KHR_external_memory[]
8204e5c31af7Sopenharmony_ci    pname:memoryTypeBits member always contains at least one bit set
8205e5c31af7Sopenharmony_ci    corresponding to a sname:VkMemoryType with a pname:propertyFlags that
8206e5c31af7Sopenharmony_ci    has the ename:VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT bit set.
8207e5c31af7Sopenharmony_ci  * The pname:memoryTypeBits member is identical for all sname:VkBuffer
8208e5c31af7Sopenharmony_ci    objects created with the same value for the pname:flags and pname:usage
8209e5c31af7Sopenharmony_ci    members in the slink:VkBufferCreateInfo structure
8210e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_1,VK_KHR_external_memory[]
8211e5c31af7Sopenharmony_ci    and the pname:handleTypes member of the
8212e5c31af7Sopenharmony_ci    slink:VkExternalMemoryBufferCreateInfo structure
8213e5c31af7Sopenharmony_ciendif::VK_VERSION_1_1,VK_KHR_external_memory[]
8214e5c31af7Sopenharmony_ci    passed to flink:vkCreateBuffer.
8215e5c31af7Sopenharmony_ci    Further, if code:usage1 and code:usage2 of type tlink:VkBufferUsageFlags
8216e5c31af7Sopenharmony_ci    are such that the bits set in code:usage2 are a subset of the bits set
8217e5c31af7Sopenharmony_ci    in code:usage1, and they have the same
8218e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_1,VK_KHR_external_memory[]
8219e5c31af7Sopenharmony_ci    pname:flags and
8220e5c31af7Sopenharmony_ci    slink:VkExternalMemoryBufferCreateInfo::pname:handleTypes,
8221e5c31af7Sopenharmony_ciendif::VK_VERSION_1_1,VK_KHR_external_memory[]
8222e5c31af7Sopenharmony_ciifndef::VK_VERSION_1_1,VK_KHR_external_memory[]
8223e5c31af7Sopenharmony_ci    pname:flags,
8224e5c31af7Sopenharmony_ciendif::VK_VERSION_1_1,VK_KHR_external_memory[]
8225e5c31af7Sopenharmony_ci    then the bits set in pname:memoryTypeBits returned for code:usage1 must:
8226e5c31af7Sopenharmony_ci    be a subset of the bits set in pname:memoryTypeBits returned for
8227e5c31af7Sopenharmony_ci    code:usage2, for all values of pname:flags.
8228e5c31af7Sopenharmony_ci  * The pname:alignment member is a power of two.
8229e5c31af7Sopenharmony_ci  * The pname:alignment member is identical for all sname:VkBuffer objects
8230e5c31af7Sopenharmony_ci    created with the same combination of values for the pname:usage and
8231e5c31af7Sopenharmony_ci    pname:flags members in the slink:VkBufferCreateInfo structure passed to
8232e5c31af7Sopenharmony_ci    flink:vkCreateBuffer.
8233e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_3,VK_KHR_maintenance4[]
8234e5c31af7Sopenharmony_ci  * If the <<features-maintenance4, pname:maintenance4>> feature is enabled,
8235e5c31af7Sopenharmony_ci    then the pname:alignment member is identical for all sname:VkImage
8236e5c31af7Sopenharmony_ci    objects created with the same combination of values for the pname:flags,
8237e5c31af7Sopenharmony_ci    pname:imageType, pname:format, pname:extent, pname:mipLevels,
8238e5c31af7Sopenharmony_ci    pname:arrayLayers, pname:samples, pname:tiling and pname:usage members
8239e5c31af7Sopenharmony_ci    in the slink:VkImageCreateInfo structure passed to flink:vkCreateImage.
8240e5c31af7Sopenharmony_ciendif::VK_VERSION_1_3,VK_KHR_maintenance4[]
8241e5c31af7Sopenharmony_ci  * The pname:alignment member satisfies the buffer descriptor offset
8242e5c31af7Sopenharmony_ci    alignment requirements associated with the sname:VkBuffer's pname:usage:
8243e5c31af7Sopenharmony_ci  ** If pname:usage included ename:VK_BUFFER_USAGE_UNIFORM_TEXEL_BUFFER_BIT
8244e5c31af7Sopenharmony_ci     or ename:VK_BUFFER_USAGE_STORAGE_TEXEL_BUFFER_BIT, pname:alignment
8245e5c31af7Sopenharmony_ci     must: be an integer multiple of
8246e5c31af7Sopenharmony_ci     sname:VkPhysicalDeviceLimits::pname:minTexelBufferOffsetAlignment.
8247e5c31af7Sopenharmony_ci  ** If pname:usage included ename:VK_BUFFER_USAGE_UNIFORM_BUFFER_BIT,
8248e5c31af7Sopenharmony_ci     pname:alignment must: be an integer multiple of
8249e5c31af7Sopenharmony_ci     sname:VkPhysicalDeviceLimits::pname:minUniformBufferOffsetAlignment.
8250e5c31af7Sopenharmony_ci  ** If pname:usage included ename:VK_BUFFER_USAGE_STORAGE_BUFFER_BIT,
8251e5c31af7Sopenharmony_ci     pname:alignment must: be an integer multiple of
8252e5c31af7Sopenharmony_ci     sname:VkPhysicalDeviceLimits::pname:minStorageBufferOffsetAlignment.
8253e5c31af7Sopenharmony_ci  * For images created with a color format, the pname:memoryTypeBits member
8254e5c31af7Sopenharmony_ci    is identical for all sname:VkImage objects created with the same
8255e5c31af7Sopenharmony_ci    combination of values for the pname:tiling member, the
8256e5c31af7Sopenharmony_ci    ename:VK_IMAGE_CREATE_SPARSE_BINDING_BIT bit of the pname:flags member,
8257e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_1,VK_KHR_device_group[]
8258e5c31af7Sopenharmony_ci    the ename:VK_IMAGE_CREATE_SPLIT_INSTANCE_BIND_REGIONS_BIT bit of the
8259e5c31af7Sopenharmony_ci    pname:flags member,
8260e5c31af7Sopenharmony_ciendif::VK_VERSION_1_1,VK_KHR_device_group[]
8261e5c31af7Sopenharmony_ciifdef::VK_EXT_host_image_copy[]
8262e5c31af7Sopenharmony_ci    the ename:VK_IMAGE_USAGE_HOST_TRANSFER_BIT_EXT bit of the pname:usage
8263e5c31af7Sopenharmony_ci    member if the
8264e5c31af7Sopenharmony_ci    slink:VkPhysicalDeviceHostImageCopyPropertiesEXT::pname:identicalMemoryTypeRequirements
8265e5c31af7Sopenharmony_ci    property is ename:VK_FALSE,
8266e5c31af7Sopenharmony_ciendif::VK_EXT_host_image_copy[]
8267e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_1,VK_KHR_external_memory[]
8268e5c31af7Sopenharmony_ci    pname:handleTypes member of slink:VkExternalMemoryImageCreateInfo,
8269e5c31af7Sopenharmony_ciendif::VK_VERSION_1_1,VK_KHR_external_memory[]
8270e5c31af7Sopenharmony_ci    and the ename:VK_IMAGE_USAGE_TRANSIENT_ATTACHMENT_BIT of the pname:usage
8271e5c31af7Sopenharmony_ci    member in the slink:VkImageCreateInfo structure passed to
8272e5c31af7Sopenharmony_ci    flink:vkCreateImage.
8273e5c31af7Sopenharmony_ci  * For images created with a depth/stencil format, the pname:memoryTypeBits
8274e5c31af7Sopenharmony_ci    member is identical for all sname:VkImage objects created with the same
8275e5c31af7Sopenharmony_ci    combination of values for the pname:format member, the pname:tiling
8276e5c31af7Sopenharmony_ci    member, the ename:VK_IMAGE_CREATE_SPARSE_BINDING_BIT bit of the
8277e5c31af7Sopenharmony_ci    pname:flags member,
8278e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_1,VK_KHR_device_group[]
8279e5c31af7Sopenharmony_ci    the ename:VK_IMAGE_CREATE_SPLIT_INSTANCE_BIND_REGIONS_BIT bit of the
8280e5c31af7Sopenharmony_ci    pname:flags member,
8281e5c31af7Sopenharmony_ciendif::VK_VERSION_1_1,VK_KHR_device_group[]
8282e5c31af7Sopenharmony_ciifdef::VK_EXT_host_image_copy[]
8283e5c31af7Sopenharmony_ci    the ename:VK_IMAGE_USAGE_HOST_TRANSFER_BIT_EXT bit of the pname:usage
8284e5c31af7Sopenharmony_ci    member if the
8285e5c31af7Sopenharmony_ci    slink:VkPhysicalDeviceHostImageCopyPropertiesEXT::pname:identicalMemoryTypeRequirements
8286e5c31af7Sopenharmony_ci    property is ename:VK_FALSE,
8287e5c31af7Sopenharmony_ciendif::VK_EXT_host_image_copy[]
8288e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_1,VK_KHR_external_memory[]
8289e5c31af7Sopenharmony_ci    pname:handleTypes member of slink:VkExternalMemoryImageCreateInfo,
8290e5c31af7Sopenharmony_ciendif::VK_VERSION_1_1,VK_KHR_external_memory[]
8291e5c31af7Sopenharmony_ci    and the ename:VK_IMAGE_USAGE_TRANSIENT_ATTACHMENT_BIT of the pname:usage
8292e5c31af7Sopenharmony_ci    member in the slink:VkImageCreateInfo structure passed to
8293e5c31af7Sopenharmony_ci    flink:vkCreateImage.
8294e5c31af7Sopenharmony_ci  * If the memory requirements are for a sname:VkImage, the
8295e5c31af7Sopenharmony_ci    pname:memoryTypeBits member must: not refer to a sname:VkMemoryType with
8296e5c31af7Sopenharmony_ci    a pname:propertyFlags that has the
8297e5c31af7Sopenharmony_ci    ename:VK_MEMORY_PROPERTY_LAZILY_ALLOCATED_BIT bit set if the pname:image
8298e5c31af7Sopenharmony_ci    did not have ename:VK_IMAGE_USAGE_TRANSIENT_ATTACHMENT_BIT bit set in
8299e5c31af7Sopenharmony_ci    the pname:usage member of the slink:VkImageCreateInfo structure passed
8300e5c31af7Sopenharmony_ci    to flink:vkCreateImage.
8301e5c31af7Sopenharmony_ci  * If the memory requirements are for a sname:VkBuffer, the
8302e5c31af7Sopenharmony_ci    pname:memoryTypeBits member must: not refer to a sname:VkMemoryType with
8303e5c31af7Sopenharmony_ci    a pname:propertyFlags that has the
8304e5c31af7Sopenharmony_ci    ename:VK_MEMORY_PROPERTY_LAZILY_ALLOCATED_BIT bit set.
8305e5c31af7Sopenharmony_ci+
8306e5c31af7Sopenharmony_ci[NOTE]
8307e5c31af7Sopenharmony_ci.Note
8308e5c31af7Sopenharmony_ci====
8309e5c31af7Sopenharmony_ciThe implication of this requirement is that lazily allocated memory is
8310e5c31af7Sopenharmony_cidisallowed for buffers in all cases.
8311e5c31af7Sopenharmony_ci====
8312e5c31af7Sopenharmony_ci  * The pname:size member is identical for all sname:VkBuffer objects
8313e5c31af7Sopenharmony_ci    created with the same combination of creation parameters specified in
8314e5c31af7Sopenharmony_ci    slink:VkBufferCreateInfo and its pname:pNext chain.
8315e5c31af7Sopenharmony_ci  * The pname:size member is identical for all sname:VkImage objects created
8316e5c31af7Sopenharmony_ci    with the same combination of creation parameters specified in
8317e5c31af7Sopenharmony_ci    slink:VkImageCreateInfo and its pname:pNext chain.
8318e5c31af7Sopenharmony_ci+
8319e5c31af7Sopenharmony_ci[NOTE]
8320e5c31af7Sopenharmony_ci.Note
8321e5c31af7Sopenharmony_ci====
8322e5c31af7Sopenharmony_ciThis, however, does not imply that they interpret the contents of the bound
8323e5c31af7Sopenharmony_cimemory identically with each other.
8324e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_1,VK_KHR_bind_memory2[]
8325e5c31af7Sopenharmony_ciThat additional guarantee, however, can: be explicitly requested using
8326e5c31af7Sopenharmony_ciename:VK_IMAGE_CREATE_ALIAS_BIT.
8327e5c31af7Sopenharmony_ciendif::VK_VERSION_1_1,VK_KHR_bind_memory2[]
8328e5c31af7Sopenharmony_ci====
8329e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_3,VK_KHR_maintenance4[]
8330e5c31af7Sopenharmony_ci  * If the <<features-maintenance4, pname:maintenance4>> feature is enabled,
8331e5c31af7Sopenharmony_ci    these additional guarantees apply:
8332e5c31af7Sopenharmony_ci  ** For a sname:VkBuffer, the pname:size memory requirement is never
8333e5c31af7Sopenharmony_ci     greater than that of another sname:VkBuffer created with a greater or
8334e5c31af7Sopenharmony_ci     equal pname:size specified in slink:VkBufferCreateInfo, all other
8335e5c31af7Sopenharmony_ci     creation parameters being identical.
8336e5c31af7Sopenharmony_ci  ** For a sname:VkBuffer, the pname:size memory requirement is never
8337e5c31af7Sopenharmony_ci     greater than the result of aligning
8338e5c31af7Sopenharmony_ci     slink:VkBufferCreateInfo::pname:size with the pname:alignment memory
8339e5c31af7Sopenharmony_ci     requirement.
8340e5c31af7Sopenharmony_ci  ** For a slink:VkImage, the pname:size memory requirement is never greater
8341e5c31af7Sopenharmony_ci     than that of another slink:VkImage created with a greater or equal
8342e5c31af7Sopenharmony_ci     value in each of pname:extent.width, pname:extent.height, and
8343e5c31af7Sopenharmony_ci     pname:extent.depth; all other creation parameters being identical.
8344e5c31af7Sopenharmony_ci  ** The memory requirements returned by
8345e5c31af7Sopenharmony_ci     flink:vkGetDeviceBufferMemoryRequirements are identical to those that
8346e5c31af7Sopenharmony_ci     would be returned by flink:vkGetBufferMemoryRequirements2 if it were
8347e5c31af7Sopenharmony_ci     called with a sname:VkBuffer created with the same
8348e5c31af7Sopenharmony_ci     slink:VkBufferCreateInfo values.
8349e5c31af7Sopenharmony_ci  ** The memory requirements returned by
8350e5c31af7Sopenharmony_ci     flink:vkGetDeviceImageMemoryRequirements are identical to those that
8351e5c31af7Sopenharmony_ci     would be returned by flink:vkGetImageMemoryRequirements2 if it were
8352e5c31af7Sopenharmony_ci     called with a sname:VkImage created with the same
8353e5c31af7Sopenharmony_ci     slink:VkImageCreateInfo values.
8354e5c31af7Sopenharmony_ciendif::VK_VERSION_1_3,VK_KHR_maintenance4[]
8355e5c31af7Sopenharmony_ci
8356e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_1,VK_KHR_get_memory_requirements2[]
8357e5c31af7Sopenharmony_ci[open,refpage='vkGetBufferMemoryRequirements2',desc='Returns the memory requirements for specified Vulkan object',type='protos']
8358e5c31af7Sopenharmony_ci--
8359e5c31af7Sopenharmony_ciTo determine the memory requirements for a buffer resource, call:
8360e5c31af7Sopenharmony_ci
8361e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_1[]
8362e5c31af7Sopenharmony_ciinclude::{generated}/api/protos/vkGetBufferMemoryRequirements2.adoc[]
8363e5c31af7Sopenharmony_ciendif::VK_VERSION_1_1[]
8364e5c31af7Sopenharmony_ci
8365e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_1+VK_KHR_get_memory_requirements2[or the equivalent command]
8366e5c31af7Sopenharmony_ci
8367e5c31af7Sopenharmony_ciifdef::VK_KHR_get_memory_requirements2[]
8368e5c31af7Sopenharmony_ciinclude::{generated}/api/protos/vkGetBufferMemoryRequirements2KHR.adoc[]
8369e5c31af7Sopenharmony_ciendif::VK_KHR_get_memory_requirements2[]
8370e5c31af7Sopenharmony_ci
8371e5c31af7Sopenharmony_ci  * pname:device is the logical device that owns the buffer.
8372e5c31af7Sopenharmony_ci  * pname:pInfo is a pointer to a slink:VkBufferMemoryRequirementsInfo2
8373e5c31af7Sopenharmony_ci    structure containing parameters required for the memory requirements
8374e5c31af7Sopenharmony_ci    query.
8375e5c31af7Sopenharmony_ci  * pname:pMemoryRequirements is a pointer to a slink:VkMemoryRequirements2
8376e5c31af7Sopenharmony_ci    structure in which the memory requirements of the buffer object are
8377e5c31af7Sopenharmony_ci    returned.
8378e5c31af7Sopenharmony_ci
8379e5c31af7Sopenharmony_ciinclude::{generated}/validity/protos/vkGetBufferMemoryRequirements2.adoc[]
8380e5c31af7Sopenharmony_ci--
8381e5c31af7Sopenharmony_ci
8382e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_3,VK_KHR_maintenance4[]
8383e5c31af7Sopenharmony_ci[open,refpage='vkGetDeviceBufferMemoryRequirements',desc='Returns the memory requirements for specified Vulkan object',type='protos',alias='vkGetDeviceBufferMemoryRequirementsKHR']
8384e5c31af7Sopenharmony_ci--
8385e5c31af7Sopenharmony_ciTo determine the memory requirements for a buffer resource without creating
8386e5c31af7Sopenharmony_cian object, call:
8387e5c31af7Sopenharmony_ci
8388e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_3[]
8389e5c31af7Sopenharmony_ciinclude::{generated}/api/protos/vkGetDeviceBufferMemoryRequirements.adoc[]
8390e5c31af7Sopenharmony_ciendif::VK_VERSION_1_3[]
8391e5c31af7Sopenharmony_ci
8392e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_3+VK_KHR_maintenance4[or the equivalent command]
8393e5c31af7Sopenharmony_ci
8394e5c31af7Sopenharmony_ciifdef::VK_KHR_maintenance4[]
8395e5c31af7Sopenharmony_ciinclude::{generated}/api/protos/vkGetDeviceBufferMemoryRequirementsKHR.adoc[]
8396e5c31af7Sopenharmony_ciendif::VK_KHR_maintenance4[]
8397e5c31af7Sopenharmony_ci
8398e5c31af7Sopenharmony_ci  * pname:device is the logical device intended to own the buffer.
8399e5c31af7Sopenharmony_ci  * pname:pInfo is a pointer to a slink:VkDeviceBufferMemoryRequirements
8400e5c31af7Sopenharmony_ci    structure containing parameters required for the memory requirements
8401e5c31af7Sopenharmony_ci    query.
8402e5c31af7Sopenharmony_ci  * pname:pMemoryRequirements is a pointer to a slink:VkMemoryRequirements2
8403e5c31af7Sopenharmony_ci    structure in which the memory requirements of the buffer object are
8404e5c31af7Sopenharmony_ci    returned.
8405e5c31af7Sopenharmony_ci
8406e5c31af7Sopenharmony_ciinclude::{generated}/validity/protos/vkGetDeviceBufferMemoryRequirements.adoc[]
8407e5c31af7Sopenharmony_ci--
8408e5c31af7Sopenharmony_ciendif::VK_VERSION_1_3,VK_KHR_maintenance4[]
8409e5c31af7Sopenharmony_ci
8410e5c31af7Sopenharmony_ci[open,refpage='VkBufferMemoryRequirementsInfo2',desc='(None)',type='structs']
8411e5c31af7Sopenharmony_ci--
8412e5c31af7Sopenharmony_ciThe sname:VkBufferMemoryRequirementsInfo2 structure is defined as:
8413e5c31af7Sopenharmony_ci
8414e5c31af7Sopenharmony_ciinclude::{generated}/api/structs/VkBufferMemoryRequirementsInfo2.adoc[]
8415e5c31af7Sopenharmony_ci
8416e5c31af7Sopenharmony_ciifdef::VK_KHR_get_memory_requirements2[]
8417e5c31af7Sopenharmony_cior the equivalent
8418e5c31af7Sopenharmony_ci
8419e5c31af7Sopenharmony_ciinclude::{generated}/api/structs/VkBufferMemoryRequirementsInfo2KHR.adoc[]
8420e5c31af7Sopenharmony_ciendif::VK_KHR_get_memory_requirements2[]
8421e5c31af7Sopenharmony_ci
8422e5c31af7Sopenharmony_ci  * pname:sType is a elink:VkStructureType value identifying this structure.
8423e5c31af7Sopenharmony_ci  * pname:pNext is `NULL` or a pointer to a structure extending this
8424e5c31af7Sopenharmony_ci    structure.
8425e5c31af7Sopenharmony_ci  * pname:buffer is the buffer to query.
8426e5c31af7Sopenharmony_ci
8427e5c31af7Sopenharmony_ciinclude::{generated}/validity/structs/VkBufferMemoryRequirementsInfo2.adoc[]
8428e5c31af7Sopenharmony_ci--
8429e5c31af7Sopenharmony_ci
8430e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_3,VK_KHR_maintenance4[]
8431e5c31af7Sopenharmony_ci[open,refpage='VkDeviceBufferMemoryRequirements',desc='(None)',type='structs',alias='VkDeviceBufferMemoryRequirementsKHR']
8432e5c31af7Sopenharmony_ci--
8433e5c31af7Sopenharmony_ciThe sname:VkDeviceBufferMemoryRequirements structure is defined as:
8434e5c31af7Sopenharmony_ci
8435e5c31af7Sopenharmony_ciinclude::{generated}/api/structs/VkDeviceBufferMemoryRequirements.adoc[]
8436e5c31af7Sopenharmony_ci
8437e5c31af7Sopenharmony_ciifdef::VK_KHR_maintenance4[]
8438e5c31af7Sopenharmony_cior the equivalent
8439e5c31af7Sopenharmony_ci
8440e5c31af7Sopenharmony_ciinclude::{generated}/api/structs/VkDeviceBufferMemoryRequirementsKHR.adoc[]
8441e5c31af7Sopenharmony_ciendif::VK_KHR_maintenance4[]
8442e5c31af7Sopenharmony_ci
8443e5c31af7Sopenharmony_ci  * pname:sType is a elink:VkStructureType value identifying this structure.
8444e5c31af7Sopenharmony_ci  * pname:pNext is `NULL` or a pointer to a structure extending this
8445e5c31af7Sopenharmony_ci    structure.
8446e5c31af7Sopenharmony_ci  * pname:pCreateInfo is a pointer to a slink:VkBufferCreateInfo structure
8447e5c31af7Sopenharmony_ci    containing parameters affecting creation of the buffer to query.
8448e5c31af7Sopenharmony_ci
8449e5c31af7Sopenharmony_ciinclude::{generated}/validity/structs/VkDeviceBufferMemoryRequirements.adoc[]
8450e5c31af7Sopenharmony_ci--
8451e5c31af7Sopenharmony_ciendif::VK_VERSION_1_3,VK_KHR_maintenance4[]
8452e5c31af7Sopenharmony_ci
8453e5c31af7Sopenharmony_ci[open,refpage='vkGetImageMemoryRequirements2',desc='Returns the memory requirements for specified Vulkan object',type='protos']
8454e5c31af7Sopenharmony_ci--
8455e5c31af7Sopenharmony_ciTo determine the memory requirements for an image resource, call:
8456e5c31af7Sopenharmony_ci
8457e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_1[]
8458e5c31af7Sopenharmony_ciinclude::{generated}/api/protos/vkGetImageMemoryRequirements2.adoc[]
8459e5c31af7Sopenharmony_ciendif::VK_VERSION_1_1[]
8460e5c31af7Sopenharmony_ci
8461e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_1+VK_KHR_get_memory_requirements2[or the equivalent command]
8462e5c31af7Sopenharmony_ci
8463e5c31af7Sopenharmony_ciifdef::VK_KHR_get_memory_requirements2[]
8464e5c31af7Sopenharmony_ciinclude::{generated}/api/protos/vkGetImageMemoryRequirements2KHR.adoc[]
8465e5c31af7Sopenharmony_ciendif::VK_KHR_get_memory_requirements2[]
8466e5c31af7Sopenharmony_ci
8467e5c31af7Sopenharmony_ci  * pname:device is the logical device that owns the image.
8468e5c31af7Sopenharmony_ci  * pname:pInfo is a pointer to a slink:VkImageMemoryRequirementsInfo2
8469e5c31af7Sopenharmony_ci    structure containing parameters required for the memory requirements
8470e5c31af7Sopenharmony_ci    query.
8471e5c31af7Sopenharmony_ci  * pname:pMemoryRequirements is a pointer to a slink:VkMemoryRequirements2
8472e5c31af7Sopenharmony_ci    structure in which the memory requirements of the image object are
8473e5c31af7Sopenharmony_ci    returned.
8474e5c31af7Sopenharmony_ci
8475e5c31af7Sopenharmony_ciinclude::{generated}/validity/protos/vkGetImageMemoryRequirements2.adoc[]
8476e5c31af7Sopenharmony_ci--
8477e5c31af7Sopenharmony_ci
8478e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_3,VK_KHR_maintenance4[]
8479e5c31af7Sopenharmony_ci[open,refpage='vkGetDeviceImageMemoryRequirements',desc='Returns the memory requirements for specified Vulkan object',type='protos',alias='vkGetDeviceImageMemoryRequirementsKHR']
8480e5c31af7Sopenharmony_ci--
8481e5c31af7Sopenharmony_ciTo determine the memory requirements for an image resource without creating
8482e5c31af7Sopenharmony_cian object, call:
8483e5c31af7Sopenharmony_ci
8484e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_3[]
8485e5c31af7Sopenharmony_ciinclude::{generated}/api/protos/vkGetDeviceImageMemoryRequirements.adoc[]
8486e5c31af7Sopenharmony_ciendif::VK_VERSION_1_3[]
8487e5c31af7Sopenharmony_ci
8488e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_3+VK_KHR_maintenance4[or the equivalent command]
8489e5c31af7Sopenharmony_ci
8490e5c31af7Sopenharmony_ciifdef::VK_KHR_maintenance4[]
8491e5c31af7Sopenharmony_ciinclude::{generated}/api/protos/vkGetDeviceImageMemoryRequirementsKHR.adoc[]
8492e5c31af7Sopenharmony_ciendif::VK_KHR_maintenance4[]
8493e5c31af7Sopenharmony_ci
8494e5c31af7Sopenharmony_ci  * pname:device is the logical device intended to own the image.
8495e5c31af7Sopenharmony_ci  * pname:pInfo is a pointer to a slink:VkDeviceImageMemoryRequirements
8496e5c31af7Sopenharmony_ci    structure containing parameters required for the memory requirements
8497e5c31af7Sopenharmony_ci    query.
8498e5c31af7Sopenharmony_ci  * pname:pMemoryRequirements is a pointer to a slink:VkMemoryRequirements2
8499e5c31af7Sopenharmony_ci    structure in which the memory requirements of the image object are
8500e5c31af7Sopenharmony_ci    returned.
8501e5c31af7Sopenharmony_ci
8502e5c31af7Sopenharmony_ciinclude::{generated}/validity/protos/vkGetDeviceImageMemoryRequirements.adoc[]
8503e5c31af7Sopenharmony_ci--
8504e5c31af7Sopenharmony_ciendif::VK_VERSION_1_3,VK_KHR_maintenance4[]
8505e5c31af7Sopenharmony_ci
8506e5c31af7Sopenharmony_ci[open,refpage='VkImageMemoryRequirementsInfo2',desc='(None)',type='structs']
8507e5c31af7Sopenharmony_ci--
8508e5c31af7Sopenharmony_ciThe sname:VkImageMemoryRequirementsInfo2 structure is defined as:
8509e5c31af7Sopenharmony_ci
8510e5c31af7Sopenharmony_ciinclude::{generated}/api/structs/VkImageMemoryRequirementsInfo2.adoc[]
8511e5c31af7Sopenharmony_ci
8512e5c31af7Sopenharmony_ciifdef::VK_KHR_get_memory_requirements2[]
8513e5c31af7Sopenharmony_cior the equivalent
8514e5c31af7Sopenharmony_ci
8515e5c31af7Sopenharmony_ciinclude::{generated}/api/structs/VkImageMemoryRequirementsInfo2KHR.adoc[]
8516e5c31af7Sopenharmony_ciendif::VK_KHR_get_memory_requirements2[]
8517e5c31af7Sopenharmony_ci
8518e5c31af7Sopenharmony_ci  * pname:sType is a elink:VkStructureType value identifying this structure.
8519e5c31af7Sopenharmony_ci  * pname:pNext is `NULL` or a pointer to a structure extending this
8520e5c31af7Sopenharmony_ci    structure.
8521e5c31af7Sopenharmony_ci  * pname:image is the image to query.
8522e5c31af7Sopenharmony_ci
8523e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_1,VK_KHR_sampler_ycbcr_conversion[]
8524e5c31af7Sopenharmony_ci
8525e5c31af7Sopenharmony_ci.Valid Usage
8526e5c31af7Sopenharmony_ci****
8527e5c31af7Sopenharmony_ci  * [[VUID-VkImageMemoryRequirementsInfo2-image-01589]]
8528e5c31af7Sopenharmony_ci    If pname:image was created with a _multi-planar_ format and the
8529e5c31af7Sopenharmony_ci    ename:VK_IMAGE_CREATE_DISJOINT_BIT flag, there must: be a
8530e5c31af7Sopenharmony_ci    slink:VkImagePlaneMemoryRequirementsInfo included in the pname:pNext
8531e5c31af7Sopenharmony_ci    chain of the slink:VkImageMemoryRequirementsInfo2 structure
8532e5c31af7Sopenharmony_ciifdef::VK_EXT_image_drm_format_modifier[]
8533e5c31af7Sopenharmony_ci  * [[VUID-VkImageMemoryRequirementsInfo2-image-02279]]
8534e5c31af7Sopenharmony_ci    If pname:image was created with ename:VK_IMAGE_CREATE_DISJOINT_BIT and
8535e5c31af7Sopenharmony_ci    with ename:VK_IMAGE_TILING_DRM_FORMAT_MODIFIER_EXT, then there must: be
8536e5c31af7Sopenharmony_ci    a slink:VkImagePlaneMemoryRequirementsInfo included in the pname:pNext
8537e5c31af7Sopenharmony_ci    chain of the slink:VkImageMemoryRequirementsInfo2 structure
8538e5c31af7Sopenharmony_ciendif::VK_EXT_image_drm_format_modifier[]
8539e5c31af7Sopenharmony_ci  * [[VUID-VkImageMemoryRequirementsInfo2-image-01590]]
8540e5c31af7Sopenharmony_ci    If pname:image was not created with the
8541e5c31af7Sopenharmony_ci    ename:VK_IMAGE_CREATE_DISJOINT_BIT flag, there must: not be a
8542e5c31af7Sopenharmony_ci    slink:VkImagePlaneMemoryRequirementsInfo included in the pname:pNext
8543e5c31af7Sopenharmony_ci    chain of the slink:VkImageMemoryRequirementsInfo2 structure
8544e5c31af7Sopenharmony_ciifndef::VK_EXT_image_drm_format_modifier[]
8545e5c31af7Sopenharmony_ci  * [[VUID-VkImageMemoryRequirementsInfo2-image-01591]]
8546e5c31af7Sopenharmony_ci    If pname:image was created with a single-plane format, there must: not
8547e5c31af7Sopenharmony_ci    be a slink:VkImagePlaneMemoryRequirementsInfo included in the
8548e5c31af7Sopenharmony_ci    pname:pNext chain of the slink:VkImageMemoryRequirementsInfo2 structure
8549e5c31af7Sopenharmony_ciendif::VK_EXT_image_drm_format_modifier[]
8550e5c31af7Sopenharmony_ciifdef::VK_EXT_image_drm_format_modifier[]
8551e5c31af7Sopenharmony_ci  * [[VUID-VkImageMemoryRequirementsInfo2-image-02280]]
8552e5c31af7Sopenharmony_ci    If pname:image was created with a single-plane format and with any
8553e5c31af7Sopenharmony_ci    pname:tiling other than ename:VK_IMAGE_TILING_DRM_FORMAT_MODIFIER_EXT,
8554e5c31af7Sopenharmony_ci    then there must: not be a slink:VkImagePlaneMemoryRequirementsInfo
8555e5c31af7Sopenharmony_ci    included in the pname:pNext chain of the
8556e5c31af7Sopenharmony_ci    slink:VkImageMemoryRequirementsInfo2 structure
8557e5c31af7Sopenharmony_ciendif::VK_EXT_image_drm_format_modifier[]
8558e5c31af7Sopenharmony_ciifdef::VK_ANDROID_external_memory_android_hardware_buffer[]
8559e5c31af7Sopenharmony_ci  * [[VUID-VkImageMemoryRequirementsInfo2-image-01897]]
8560e5c31af7Sopenharmony_ci    If pname:image was created with the
8561e5c31af7Sopenharmony_ci    ename:VK_EXTERNAL_MEMORY_HANDLE_TYPE_ANDROID_HARDWARE_BUFFER_BIT_ANDROID
8562e5c31af7Sopenharmony_ci    external memory handle type, then pname:image must: be bound to memory
8563e5c31af7Sopenharmony_ciendif::VK_ANDROID_external_memory_android_hardware_buffer[]
8564e5c31af7Sopenharmony_ciifdef::VK_QNX_external_memory_screen_buffer[]
8565e5c31af7Sopenharmony_ci  * [[VUID-VkImageMemoryRequirementsInfo2-image-08961]]
8566e5c31af7Sopenharmony_ci    If pname:image was created with the
8567e5c31af7Sopenharmony_ci    ename:VK_EXTERNAL_MEMORY_HANDLE_TYPE_SCREEN_BUFFER_BIT_QNX external
8568e5c31af7Sopenharmony_ci    memory handle type, then pname:image must: be bound to memory
8569e5c31af7Sopenharmony_ciendif::VK_QNX_external_memory_screen_buffer[]
8570e5c31af7Sopenharmony_ci****
8571e5c31af7Sopenharmony_ci
8572e5c31af7Sopenharmony_ciendif::VK_VERSION_1_1,VK_KHR_sampler_ycbcr_conversion[]
8573e5c31af7Sopenharmony_ci
8574e5c31af7Sopenharmony_ciinclude::{generated}/validity/structs/VkImageMemoryRequirementsInfo2.adoc[]
8575e5c31af7Sopenharmony_ci--
8576e5c31af7Sopenharmony_ci
8577e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_3,VK_KHR_maintenance4[]
8578e5c31af7Sopenharmony_ci[open,refpage='VkDeviceImageMemoryRequirements',desc='(None)',type='structs',alias='VkDeviceImageMemoryRequirementsKHR']
8579e5c31af7Sopenharmony_ci--
8580e5c31af7Sopenharmony_ciThe sname:VkDeviceImageMemoryRequirements structure is defined as:
8581e5c31af7Sopenharmony_ci
8582e5c31af7Sopenharmony_ciinclude::{generated}/api/structs/VkDeviceImageMemoryRequirements.adoc[]
8583e5c31af7Sopenharmony_ci
8584e5c31af7Sopenharmony_ciifdef::VK_KHR_maintenance4[]
8585e5c31af7Sopenharmony_cior the equivalent
8586e5c31af7Sopenharmony_ci
8587e5c31af7Sopenharmony_ciinclude::{generated}/api/structs/VkDeviceImageMemoryRequirementsKHR.adoc[]
8588e5c31af7Sopenharmony_ciendif::VK_KHR_maintenance4[]
8589e5c31af7Sopenharmony_ci
8590e5c31af7Sopenharmony_ci  * pname:sType is a elink:VkStructureType value identifying this structure.
8591e5c31af7Sopenharmony_ci  * pname:pNext is `NULL` or a pointer to a structure extending this
8592e5c31af7Sopenharmony_ci    structure.
8593e5c31af7Sopenharmony_ci  * pname:pCreateInfo is a pointer to a slink:VkImageCreateInfo structure
8594e5c31af7Sopenharmony_ci    containing parameters affecting creation of the image to query.
8595e5c31af7Sopenharmony_ci  * pname:planeAspect is a elink:VkImageAspectFlagBits value specifying the
8596e5c31af7Sopenharmony_ci    aspect corresponding to the image plane to query.
8597e5c31af7Sopenharmony_ci    This parameter is ignored unless
8598e5c31af7Sopenharmony_ciifdef::VK_EXT_image_drm_format_modifier[]
8599e5c31af7Sopenharmony_ci    pname:pCreateInfo->tiling is
8600e5c31af7Sopenharmony_ci    ename:VK_IMAGE_TILING_DRM_FORMAT_MODIFIER_EXT, or
8601e5c31af7Sopenharmony_ciendif::VK_EXT_image_drm_format_modifier[]
8602e5c31af7Sopenharmony_ci    pname:pCreateInfo->flags has ename:VK_IMAGE_CREATE_DISJOINT_BIT set.
8603e5c31af7Sopenharmony_ci
8604e5c31af7Sopenharmony_ci.Valid Usage
8605e5c31af7Sopenharmony_ci****
8606e5c31af7Sopenharmony_ci  * [[VUID-VkDeviceImageMemoryRequirements-pCreateInfo-06416]]
8607e5c31af7Sopenharmony_ci    The pname:pCreateInfo->pNext chain must: not contain a
8608e5c31af7Sopenharmony_ci    slink:VkImageSwapchainCreateInfoKHR structure
8609e5c31af7Sopenharmony_ciifdef::VK_EXT_image_drm_format_modifier[]
8610e5c31af7Sopenharmony_ci  * [[VUID-VkDeviceImageMemoryRequirements-pCreateInfo-06776]]
8611e5c31af7Sopenharmony_ci    The pname:pCreateInfo->pNext chain must: not contain a
8612e5c31af7Sopenharmony_ci    slink:VkImageDrmFormatModifierExplicitCreateInfoEXT structure
8613e5c31af7Sopenharmony_ciendif::VK_EXT_image_drm_format_modifier[]
8614e5c31af7Sopenharmony_ciifdef::VK_ANDROID_external_memory_android_hardware_buffer[]
8615e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_3,VK_KHR_maintenance4[]
8616e5c31af7Sopenharmony_ci  * [[VUID-VkDeviceImageMemoryRequirements-pNext-06996]]
8617e5c31af7Sopenharmony_ci    Applications also must: not call
8618e5c31af7Sopenharmony_ci    flink:vkGetDeviceImageMemoryRequirements with a slink:VkImageCreateInfo
8619e5c31af7Sopenharmony_ci    whose pname:pNext chain includes a slink:VkExternalFormatANDROID
8620e5c31af7Sopenharmony_ci    structure with non-zero pname:externalFormat
8621e5c31af7Sopenharmony_ciendif::VK_VERSION_1_3,VK_KHR_maintenance4[]
8622e5c31af7Sopenharmony_ciendif::VK_ANDROID_external_memory_android_hardware_buffer[]
8623e5c31af7Sopenharmony_ciifdef::VK_QNX_external_memory_screen_buffer[]
8624e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_3,VK_KHR_maintenance4[]
8625e5c31af7Sopenharmony_ci  * [[VUID-VkDeviceImageMemoryRequirements-pNext-08962]]
8626e5c31af7Sopenharmony_ci    Applications also must: not call
8627e5c31af7Sopenharmony_ci    flink:vkGetDeviceImageMemoryRequirements with a slink:VkImageCreateInfo
8628e5c31af7Sopenharmony_ci    whose pname:pNext chain includes a slink:VkExternalFormatQNX structure
8629e5c31af7Sopenharmony_ci    with non-zero pname:externalFormat
8630e5c31af7Sopenharmony_ciendif::VK_VERSION_1_3,VK_KHR_maintenance4[]
8631e5c31af7Sopenharmony_ciendif::VK_QNX_external_memory_screen_buffer[]
8632e5c31af7Sopenharmony_ci  * [[VUID-VkDeviceImageMemoryRequirements-pCreateInfo-06417]]
8633e5c31af7Sopenharmony_ci    If pname:pCreateInfo->format specifies a _multi-planar_ format and
8634e5c31af7Sopenharmony_ci    pname:pCreateInfo->flags has ename:VK_IMAGE_CREATE_DISJOINT_BIT set then
8635e5c31af7Sopenharmony_ci    pname:planeAspect must: not be ename:VK_IMAGE_ASPECT_NONE_KHR
8636e5c31af7Sopenharmony_ci  * [[VUID-VkDeviceImageMemoryRequirements-pCreateInfo-06419]]
8637e5c31af7Sopenharmony_ci    If pname:pCreateInfo->flags has ename:VK_IMAGE_CREATE_DISJOINT_BIT set
8638e5c31af7Sopenharmony_ci    and if the pname:pCreateInfo->tiling is ename:VK_IMAGE_TILING_LINEAR or
8639e5c31af7Sopenharmony_ci    ename:VK_IMAGE_TILING_OPTIMAL, then pname:planeAspect must: be a single
8640e5c31af7Sopenharmony_ci    valid <<formats-planes-image-aspect,multi-planar aspect mask>> bit
8641e5c31af7Sopenharmony_ciifdef::VK_EXT_image_drm_format_modifier[]
8642e5c31af7Sopenharmony_ci  * [[VUID-VkDeviceImageMemoryRequirements-pCreateInfo-06420]]
8643e5c31af7Sopenharmony_ci    If pname:pCreateInfo->tiling is
8644e5c31af7Sopenharmony_ci    ename:VK_IMAGE_TILING_DRM_FORMAT_MODIFIER_EXT, then pname:planeAspect
8645e5c31af7Sopenharmony_ci    must: be a single valid _memory plane_ for the image (that is,
8646e5c31af7Sopenharmony_ci    pname:aspectMask must: specify a plane index that is less than the
8647e5c31af7Sopenharmony_ci    slink:VkDrmFormatModifierPropertiesEXT::pname:drmFormatModifierPlaneCount
8648e5c31af7Sopenharmony_ci    associated with the image's pname:format and
8649e5c31af7Sopenharmony_ci    slink:VkImageDrmFormatModifierPropertiesEXT::pname:drmFormatModifier)
8650e5c31af7Sopenharmony_ciendif::VK_EXT_image_drm_format_modifier[]
8651e5c31af7Sopenharmony_ci****
8652e5c31af7Sopenharmony_ci
8653e5c31af7Sopenharmony_ciinclude::{generated}/validity/structs/VkDeviceImageMemoryRequirements.adoc[]
8654e5c31af7Sopenharmony_ci--
8655e5c31af7Sopenharmony_ciendif::VK_VERSION_1_3,VK_KHR_maintenance4[]
8656e5c31af7Sopenharmony_ci
8657e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_1,VK_KHR_sampler_ycbcr_conversion[]
8658e5c31af7Sopenharmony_ci[open,refpage='VkImagePlaneMemoryRequirementsInfo',desc='Structure specifying image plane for memory requirements',type='structs']
8659e5c31af7Sopenharmony_ci--
8660e5c31af7Sopenharmony_ciTo determine the memory requirements for a plane of a disjoint image, add a
8661e5c31af7Sopenharmony_cisname:VkImagePlaneMemoryRequirementsInfo structure to the pname:pNext chain
8662e5c31af7Sopenharmony_ciof the sname:VkImageMemoryRequirementsInfo2 structure.
8663e5c31af7Sopenharmony_ci
8664e5c31af7Sopenharmony_ciThe sname:VkImagePlaneMemoryRequirementsInfo structure is defined as:
8665e5c31af7Sopenharmony_ci
8666e5c31af7Sopenharmony_ciinclude::{generated}/api/structs/VkImagePlaneMemoryRequirementsInfo.adoc[]
8667e5c31af7Sopenharmony_ci
8668e5c31af7Sopenharmony_ciifdef::VK_KHR_sampler_ycbcr_conversion[]
8669e5c31af7Sopenharmony_cior the equivalent
8670e5c31af7Sopenharmony_ci
8671e5c31af7Sopenharmony_ciinclude::{generated}/api/structs/VkImagePlaneMemoryRequirementsInfoKHR.adoc[]
8672e5c31af7Sopenharmony_ciendif::VK_KHR_sampler_ycbcr_conversion[]
8673e5c31af7Sopenharmony_ci
8674e5c31af7Sopenharmony_ci  * pname:sType is a elink:VkStructureType value identifying this structure.
8675e5c31af7Sopenharmony_ci  * pname:pNext is `NULL` or a pointer to a structure extending this
8676e5c31af7Sopenharmony_ci    structure.
8677e5c31af7Sopenharmony_ci  * pname:planeAspect is a elink:VkImageAspectFlagBits value specifying the
8678e5c31af7Sopenharmony_ci    aspect corresponding to the image plane to query.
8679e5c31af7Sopenharmony_ci
8680e5c31af7Sopenharmony_ci.Valid Usage
8681e5c31af7Sopenharmony_ci****
8682e5c31af7Sopenharmony_ci  * [[VUID-VkImagePlaneMemoryRequirementsInfo-planeAspect-02281]]
8683e5c31af7Sopenharmony_ci    If the image's pname:tiling is ename:VK_IMAGE_TILING_LINEAR or
8684e5c31af7Sopenharmony_ci    ename:VK_IMAGE_TILING_OPTIMAL, then pname:planeAspect must: be a single
8685e5c31af7Sopenharmony_ci    valid <<formats-planes-image-aspect,multi-planar aspect mask>> bit
8686e5c31af7Sopenharmony_ciifdef::VK_EXT_image_drm_format_modifier[]
8687e5c31af7Sopenharmony_ci  * [[VUID-VkImagePlaneMemoryRequirementsInfo-planeAspect-02282]]
8688e5c31af7Sopenharmony_ci    If the image's pname:tiling is
8689e5c31af7Sopenharmony_ci    ename:VK_IMAGE_TILING_DRM_FORMAT_MODIFIER_EXT, then pname:planeAspect
8690e5c31af7Sopenharmony_ci    must: be a single valid _memory plane_ for the image (that is,
8691e5c31af7Sopenharmony_ci    pname:aspectMask must: specify a plane index that is less than the
8692e5c31af7Sopenharmony_ci    slink:VkDrmFormatModifierPropertiesEXT::pname:drmFormatModifierPlaneCount
8693e5c31af7Sopenharmony_ci    associated with the image's pname:format and
8694e5c31af7Sopenharmony_ci    slink:VkImageDrmFormatModifierPropertiesEXT::pname:drmFormatModifier)
8695e5c31af7Sopenharmony_ciendif::VK_EXT_image_drm_format_modifier[]
8696e5c31af7Sopenharmony_ci****
8697e5c31af7Sopenharmony_ci
8698e5c31af7Sopenharmony_ciinclude::{generated}/validity/structs/VkImagePlaneMemoryRequirementsInfo.adoc[]
8699e5c31af7Sopenharmony_ci--
8700e5c31af7Sopenharmony_ciendif::VK_VERSION_1_1,VK_KHR_sampler_ycbcr_conversion[]
8701e5c31af7Sopenharmony_ci
8702e5c31af7Sopenharmony_ci[open,refpage='VkMemoryRequirements2',desc='Structure specifying memory requirements',type='structs']
8703e5c31af7Sopenharmony_ci--
8704e5c31af7Sopenharmony_ciThe sname:VkMemoryRequirements2 structure is defined as:
8705e5c31af7Sopenharmony_ci
8706e5c31af7Sopenharmony_ciinclude::{generated}/api/structs/VkMemoryRequirements2.adoc[]
8707e5c31af7Sopenharmony_ci
8708e5c31af7Sopenharmony_ciifdef::VK_KHR_get_memory_requirements2[]
8709e5c31af7Sopenharmony_cior the equivalent
8710e5c31af7Sopenharmony_ci
8711e5c31af7Sopenharmony_ciinclude::{generated}/api/structs/VkMemoryRequirements2KHR.adoc[]
8712e5c31af7Sopenharmony_ciendif::VK_KHR_get_memory_requirements2[]
8713e5c31af7Sopenharmony_ci
8714e5c31af7Sopenharmony_ci  * pname:sType is a elink:VkStructureType value identifying this structure.
8715e5c31af7Sopenharmony_ci  * pname:pNext is `NULL` or a pointer to a structure extending this
8716e5c31af7Sopenharmony_ci    structure.
8717e5c31af7Sopenharmony_ci  * pname:memoryRequirements is a slink:VkMemoryRequirements structure
8718e5c31af7Sopenharmony_ci    describing the memory requirements of the resource.
8719e5c31af7Sopenharmony_ci
8720e5c31af7Sopenharmony_ciinclude::{generated}/validity/structs/VkMemoryRequirements2.adoc[]
8721e5c31af7Sopenharmony_ci--
8722e5c31af7Sopenharmony_ciendif::VK_VERSION_1_1,VK_KHR_get_memory_requirements2[]
8723e5c31af7Sopenharmony_ci
8724e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_1,VK_KHR_dedicated_allocation[]
8725e5c31af7Sopenharmony_ci[open,refpage='VkMemoryDedicatedRequirements',desc='Structure describing dedicated allocation requirements of buffer and image resources',type='structs']
8726e5c31af7Sopenharmony_ci--
8727e5c31af7Sopenharmony_ciThe sname:VkMemoryDedicatedRequirements structure is defined as:
8728e5c31af7Sopenharmony_ci
8729e5c31af7Sopenharmony_ciinclude::{generated}/api/structs/VkMemoryDedicatedRequirements.adoc[]
8730e5c31af7Sopenharmony_ci
8731e5c31af7Sopenharmony_ciifdef::VK_KHR_dedicated_allocation[]
8732e5c31af7Sopenharmony_cior the equivalent
8733e5c31af7Sopenharmony_ci
8734e5c31af7Sopenharmony_ciinclude::{generated}/api/structs/VkMemoryDedicatedRequirementsKHR.adoc[]
8735e5c31af7Sopenharmony_ciendif::VK_KHR_dedicated_allocation[]
8736e5c31af7Sopenharmony_ci
8737e5c31af7Sopenharmony_ci  * pname:sType is a elink:VkStructureType value identifying this structure.
8738e5c31af7Sopenharmony_ci  * pname:pNext is `NULL` or a pointer to a structure extending this
8739e5c31af7Sopenharmony_ci    structure.
8740e5c31af7Sopenharmony_ci  * pname:prefersDedicatedAllocation specifies that the implementation would
8741e5c31af7Sopenharmony_ci    prefer a dedicated allocation for this resource.
8742e5c31af7Sopenharmony_ci    The application is still free to suballocate the resource but it may:
8743e5c31af7Sopenharmony_ci    get better performance if a dedicated allocation is used.
8744e5c31af7Sopenharmony_ci  * pname:requiresDedicatedAllocation specifies that a dedicated allocation
8745e5c31af7Sopenharmony_ci    is required for this resource.
8746e5c31af7Sopenharmony_ci
8747e5c31af7Sopenharmony_ciTo determine the dedicated allocation requirements of a buffer or image
8748e5c31af7Sopenharmony_ciresource, add a slink:VkMemoryDedicatedRequirements structure to the
8749e5c31af7Sopenharmony_cipname:pNext chain of the slink:VkMemoryRequirements2 structure passed as the
8750e5c31af7Sopenharmony_cipname:pMemoryRequirements parameter of flink:vkGetBufferMemoryRequirements2
8751e5c31af7Sopenharmony_cior flink:vkGetImageMemoryRequirements2, respectively.
8752e5c31af7Sopenharmony_ci
8753e5c31af7Sopenharmony_ciConstraints on the values returned for buffer resources are:
8754e5c31af7Sopenharmony_ci
8755e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_1,VK_KHR_external_memory[]
8756e5c31af7Sopenharmony_ci  * pname:requiresDedicatedAllocation may: be ename:VK_TRUE if the
8757e5c31af7Sopenharmony_ci    pname:pNext chain of slink:VkBufferCreateInfo for the call to
8758e5c31af7Sopenharmony_ci    fname:vkCreateBuffer used to create the buffer being queried included a
8759e5c31af7Sopenharmony_ci    slink:VkExternalMemoryBufferCreateInfo structure, and any of the handle
8760e5c31af7Sopenharmony_ci    types specified in
8761e5c31af7Sopenharmony_ci    slink:VkExternalMemoryBufferCreateInfo::pname:handleTypes requires
8762e5c31af7Sopenharmony_ci    dedicated allocation, as reported by
8763e5c31af7Sopenharmony_ci    flink:vkGetPhysicalDeviceExternalBufferProperties in
8764e5c31af7Sopenharmony_ci    sname:VkExternalBufferProperties::pname:externalMemoryProperties.externalMemoryFeatures.
8765e5c31af7Sopenharmony_ci    Otherwise, pname:requiresDedicatedAllocation will be ename:VK_FALSE.
8766e5c31af7Sopenharmony_ci
8767e5c31af7Sopenharmony_ciendif::VK_VERSION_1_1,VK_KHR_external_memory[]
8768e5c31af7Sopenharmony_ciifndef::VK_VERSION_1_1,VK_KHR_external_memory[]
8769e5c31af7Sopenharmony_ci  * pname:requiresDedicatedAllocation will be ename:VK_FALSE
8770e5c31af7Sopenharmony_ciendif::VK_VERSION_1_1,VK_KHR_external_memory[]
8771e5c31af7Sopenharmony_ci  * When the implementation sets pname:requiresDedicatedAllocation to
8772e5c31af7Sopenharmony_ci    ename:VK_TRUE, it must: also set pname:prefersDedicatedAllocation to
8773e5c31af7Sopenharmony_ci    ename:VK_TRUE.
8774e5c31af7Sopenharmony_ci  * If ename:VK_BUFFER_CREATE_SPARSE_BINDING_BIT was set in
8775e5c31af7Sopenharmony_ci    slink:VkBufferCreateInfo::pname:flags when pname:buffer was created,
8776e5c31af7Sopenharmony_ci    then both pname:prefersDedicatedAllocation and
8777e5c31af7Sopenharmony_ci    pname:requiresDedicatedAllocation will be ename:VK_FALSE.
8778e5c31af7Sopenharmony_ci
8779e5c31af7Sopenharmony_ciConstraints on the values returned for image resources are:
8780e5c31af7Sopenharmony_ci
8781e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_1,VK_KHR_external_memory[]
8782e5c31af7Sopenharmony_ci  * pname:requiresDedicatedAllocation may: be ename:VK_TRUE if the
8783e5c31af7Sopenharmony_ci    pname:pNext chain of slink:VkImageCreateInfo for the call to
8784e5c31af7Sopenharmony_ci    flink:vkCreateImage used to create the image being queried included a
8785e5c31af7Sopenharmony_ci    slink:VkExternalMemoryImageCreateInfo structure, and any of the handle
8786e5c31af7Sopenharmony_ci    types specified in
8787e5c31af7Sopenharmony_ci    slink:VkExternalMemoryImageCreateInfo::pname:handleTypes requires
8788e5c31af7Sopenharmony_ci    dedicated allocation, as reported by
8789e5c31af7Sopenharmony_ci    flink:vkGetPhysicalDeviceImageFormatProperties2 in
8790e5c31af7Sopenharmony_ci    sname:VkExternalImageFormatProperties::pname:externalMemoryProperties.externalMemoryFeatures.
8791e5c31af7Sopenharmony_ciendif::VK_VERSION_1_1,VK_KHR_external_memory[]
8792e5c31af7Sopenharmony_ciifdef::VK_EXT_image_drm_format_modifier[]
8793e5c31af7Sopenharmony_ci  * pname:requiresDedicatedAllocation may: be ename:VK_TRUE if the image's
8794e5c31af7Sopenharmony_ci    tiling is ename:VK_IMAGE_TILING_DRM_FORMAT_MODIFIER_EXT.
8795e5c31af7Sopenharmony_ciendif::VK_EXT_image_drm_format_modifier[]
8796e5c31af7Sopenharmony_ci  * pname:requiresDedicatedAllocation will
8797e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_1,VK_KHR_external_memory,VK_EXT_image_drm_format_modifier[]
8798e5c31af7Sopenharmony_ci    otherwise
8799e5c31af7Sopenharmony_ciendif::VK_VERSION_1_1,VK_KHR_external_memory,VK_EXT_image_drm_format_modifier[]
8800e5c31af7Sopenharmony_ci    be ename:VK_FALSE
8801e5c31af7Sopenharmony_ci  * If ename:VK_IMAGE_CREATE_SPARSE_BINDING_BIT was set in
8802e5c31af7Sopenharmony_ci    slink:VkImageCreateInfo::pname:flags when pname:image was created, then
8803e5c31af7Sopenharmony_ci    both pname:prefersDedicatedAllocation and
8804e5c31af7Sopenharmony_ci    pname:requiresDedicatedAllocation will be ename:VK_FALSE.
8805e5c31af7Sopenharmony_ci
8806e5c31af7Sopenharmony_ciinclude::{generated}/validity/structs/VkMemoryDedicatedRequirements.adoc[]
8807e5c31af7Sopenharmony_ci--
8808e5c31af7Sopenharmony_ciendif::VK_VERSION_1_1,VK_KHR_dedicated_allocation[]
8809e5c31af7Sopenharmony_ci
8810e5c31af7Sopenharmony_ci[open,refpage='vkBindBufferMemory',desc='Bind device memory to a buffer object',type='protos']
8811e5c31af7Sopenharmony_ci--
8812e5c31af7Sopenharmony_ci:refpage: vkBindBufferMemory
8813e5c31af7Sopenharmony_ci
8814e5c31af7Sopenharmony_ciTo attach memory to a buffer object, call:
8815e5c31af7Sopenharmony_ci
8816e5c31af7Sopenharmony_ciinclude::{generated}/api/protos/vkBindBufferMemory.adoc[]
8817e5c31af7Sopenharmony_ci
8818e5c31af7Sopenharmony_ci  * pname:device is the logical device that owns the buffer and memory.
8819e5c31af7Sopenharmony_ci  * pname:buffer is the buffer to be attached to memory.
8820e5c31af7Sopenharmony_ci  * pname:memory is a slink:VkDeviceMemory object describing the device
8821e5c31af7Sopenharmony_ci    memory to attach.
8822e5c31af7Sopenharmony_ci  * pname:memoryOffset is the start offset of the region of pname:memory
8823e5c31af7Sopenharmony_ci    which is to be bound to the buffer.
8824e5c31af7Sopenharmony_ci    The number of bytes returned in the
8825e5c31af7Sopenharmony_ci    sname:VkMemoryRequirements::pname:size member in pname:memory, starting
8826e5c31af7Sopenharmony_ci    from pname:memoryOffset bytes, will be bound to the specified buffer.
8827e5c31af7Sopenharmony_ci
8828e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_1,VK_KHR_bind_memory2[]
8829e5c31af7Sopenharmony_cifname:vkBindBufferMemory is equivalent to passing the same parameters
8830e5c31af7Sopenharmony_cithrough slink:VkBindBufferMemoryInfo to flink:vkBindBufferMemory2.
8831e5c31af7Sopenharmony_ciendif::VK_VERSION_1_1,VK_KHR_bind_memory2[]
8832e5c31af7Sopenharmony_ci
8833e5c31af7Sopenharmony_ciifdef::VK_NV_external_memory_sci_buf[]
8834e5c31af7Sopenharmony_ciIf the pname:memory was obtained by a memory import operation with
8835e5c31af7Sopenharmony_cislink:VkExternalMemoryBufferCreateInfo::pname:handleTypes assigned to
8836e5c31af7Sopenharmony_ciename:VK_EXTERNAL_MEMORY_HANDLE_TYPE_SCI_BUF_BIT_NV, the properties of
8837e5c31af7Sopenharmony_cipname:buffer and the pname:memoryoffset must: be compatible with the
8838e5c31af7Sopenharmony_ciattributes used to create stext:NvSciBufObj, otherwise the implementation
8839e5c31af7Sopenharmony_ciwill return ename:VK_ERROR_VALIDATION_FAILED.
8840e5c31af7Sopenharmony_ciendif::VK_NV_external_memory_sci_buf[]
8841e5c31af7Sopenharmony_ci
8842e5c31af7Sopenharmony_ciinclude::{chapters}/commonvalidity/no_dynamic_allocations_common.adoc[]
8843e5c31af7Sopenharmony_ci
8844e5c31af7Sopenharmony_ci.Valid Usage
8845e5c31af7Sopenharmony_ci****
8846e5c31af7Sopenharmony_ciinclude::{chapters}/commonvalidity/bind_buffer_common.adoc[]
8847e5c31af7Sopenharmony_ci****
8848e5c31af7Sopenharmony_ci
8849e5c31af7Sopenharmony_ciinclude::{generated}/validity/protos/vkBindBufferMemory.adoc[]
8850e5c31af7Sopenharmony_ci--
8851e5c31af7Sopenharmony_ci
8852e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_1,VK_KHR_bind_memory2[]
8853e5c31af7Sopenharmony_ci[open,refpage='vkBindBufferMemory2',desc='Bind device memory to buffer objects',type='protos']
8854e5c31af7Sopenharmony_ci--
8855e5c31af7Sopenharmony_ci:refpage: vkBindBufferMemory2
8856e5c31af7Sopenharmony_ci
8857e5c31af7Sopenharmony_ciTo attach memory to buffer objects for one or more buffers at a time, call:
8858e5c31af7Sopenharmony_ci
8859e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_1[]
8860e5c31af7Sopenharmony_ciinclude::{generated}/api/protos/vkBindBufferMemory2.adoc[]
8861e5c31af7Sopenharmony_ciendif::VK_VERSION_1_1[]
8862e5c31af7Sopenharmony_ci
8863e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_1+VK_KHR_bind_memory2[or the equivalent command]
8864e5c31af7Sopenharmony_ci
8865e5c31af7Sopenharmony_ciifdef::VK_KHR_bind_memory2[]
8866e5c31af7Sopenharmony_ciinclude::{generated}/api/protos/vkBindBufferMemory2KHR.adoc[]
8867e5c31af7Sopenharmony_ciendif::VK_KHR_bind_memory2[]
8868e5c31af7Sopenharmony_ci
8869e5c31af7Sopenharmony_ci  * pname:device is the logical device that owns the buffers and memory.
8870e5c31af7Sopenharmony_ci  * pname:bindInfoCount is the number of elements in pname:pBindInfos.
8871e5c31af7Sopenharmony_ci  * pname:pBindInfos is a pointer to an array of pname:bindInfoCount
8872e5c31af7Sopenharmony_ci    slink:VkBindBufferMemoryInfo structures describing buffers and memory to
8873e5c31af7Sopenharmony_ci    bind.
8874e5c31af7Sopenharmony_ci
8875e5c31af7Sopenharmony_ciOn some implementations, it may: be more efficient to batch memory bindings
8876e5c31af7Sopenharmony_ciinto a single command.
8877e5c31af7Sopenharmony_ci
8878e5c31af7Sopenharmony_ciifdef::VK_KHR_maintenance6[]
8879e5c31af7Sopenharmony_ciIf the <<features-maintenance6, pname:maintenance6>> feature is enabled,
8880e5c31af7Sopenharmony_cithis command must: attempt to perform all of the memory binding operations
8881e5c31af7Sopenharmony_cidescribed by pname:pBindInfos, and must: not early exit on the first
8882e5c31af7Sopenharmony_cifailure.
8883e5c31af7Sopenharmony_ciendif::VK_KHR_maintenance6[]
8884e5c31af7Sopenharmony_ci
8885e5c31af7Sopenharmony_ciIf any of the memory binding operations described by pname:pBindInfos fail,
8886e5c31af7Sopenharmony_cithe elink:VkResult returned by this command must: be the return value of any
8887e5c31af7Sopenharmony_cione of the memory binding operations which did not return ename:VK_SUCCESS.
8888e5c31af7Sopenharmony_ci
8889e5c31af7Sopenharmony_ci[NOTE]
8890e5c31af7Sopenharmony_ci.Note
8891e5c31af7Sopenharmony_ci====
8892e5c31af7Sopenharmony_ciIf the fname:vkBindBufferMemory2 command failed,
8893e5c31af7Sopenharmony_ciifdef::VK_KHR_maintenance6[]
8894e5c31af7Sopenharmony_cislink:VkBindMemoryStatusKHR structures were not included in the pname:pNext
8895e5c31af7Sopenharmony_cichains of each element of pname:pBindInfos,
8896e5c31af7Sopenharmony_ciendif::VK_KHR_maintenance6[]
8897e5c31af7Sopenharmony_ciand pname:bindInfoCount was greater than one, then the buffers referenced by
8898e5c31af7Sopenharmony_cipname:pBindInfos will be in an indeterminate state, and must not be used.
8899e5c31af7Sopenharmony_ci
8900e5c31af7Sopenharmony_ciApplications should destroy these buffers.
8901e5c31af7Sopenharmony_ci====
8902e5c31af7Sopenharmony_ci
8903e5c31af7Sopenharmony_ciinclude::{chapters}/commonvalidity/no_dynamic_allocations_common.adoc[]
8904e5c31af7Sopenharmony_ci
8905e5c31af7Sopenharmony_ciinclude::{generated}/validity/protos/vkBindBufferMemory2.adoc[]
8906e5c31af7Sopenharmony_ci--
8907e5c31af7Sopenharmony_ci
8908e5c31af7Sopenharmony_ci[open,refpage='VkBindBufferMemoryInfo',desc='Structure specifying how to bind a buffer to memory',type='structs']
8909e5c31af7Sopenharmony_ci--
8910e5c31af7Sopenharmony_ci:refpage: VkBindBufferMemoryInfo
8911e5c31af7Sopenharmony_ci
8912e5c31af7Sopenharmony_cisname:VkBindBufferMemoryInfo contains members corresponding to the
8913e5c31af7Sopenharmony_ciparameters of flink:vkBindBufferMemory.
8914e5c31af7Sopenharmony_ci
8915e5c31af7Sopenharmony_ciThe sname:VkBindBufferMemoryInfo structure is defined as:
8916e5c31af7Sopenharmony_ci
8917e5c31af7Sopenharmony_ciinclude::{generated}/api/structs/VkBindBufferMemoryInfo.adoc[]
8918e5c31af7Sopenharmony_ci
8919e5c31af7Sopenharmony_ciifdef::VK_KHR_bind_memory2[]
8920e5c31af7Sopenharmony_cior the equivalent
8921e5c31af7Sopenharmony_ci
8922e5c31af7Sopenharmony_ciinclude::{generated}/api/structs/VkBindBufferMemoryInfoKHR.adoc[]
8923e5c31af7Sopenharmony_ciendif::VK_KHR_bind_memory2[]
8924e5c31af7Sopenharmony_ci
8925e5c31af7Sopenharmony_ci  * pname:sType is a elink:VkStructureType value identifying this structure.
8926e5c31af7Sopenharmony_ci  * pname:pNext is `NULL` or a pointer to a structure extending this
8927e5c31af7Sopenharmony_ci    structure.
8928e5c31af7Sopenharmony_ci  * pname:buffer is the buffer to be attached to memory.
8929e5c31af7Sopenharmony_ci  * pname:memory is a slink:VkDeviceMemory object describing the device
8930e5c31af7Sopenharmony_ci    memory to attach.
8931e5c31af7Sopenharmony_ci  * pname:memoryOffset is the start offset of the region of pname:memory
8932e5c31af7Sopenharmony_ci    which is to be bound to the buffer.
8933e5c31af7Sopenharmony_ci    The number of bytes returned in the
8934e5c31af7Sopenharmony_ci    sname:VkMemoryRequirements::pname:size member in pname:memory, starting
8935e5c31af7Sopenharmony_ci    from pname:memoryOffset bytes, will be bound to the specified buffer.
8936e5c31af7Sopenharmony_ci
8937e5c31af7Sopenharmony_ci.Valid Usage
8938e5c31af7Sopenharmony_ci****
8939e5c31af7Sopenharmony_ciinclude::{chapters}/commonvalidity/bind_buffer_common.adoc[]
8940e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_1,VK_KHR_device_group[]
8941e5c31af7Sopenharmony_ci  * [[VUID-VkBindBufferMemoryInfo-pNext-01605]]
8942e5c31af7Sopenharmony_ci    If the pname:pNext chain includes a
8943e5c31af7Sopenharmony_ci    slink:VkBindBufferMemoryDeviceGroupInfo structure, all instances of
8944e5c31af7Sopenharmony_ci    pname:memory specified by
8945e5c31af7Sopenharmony_ci    slink:VkBindBufferMemoryDeviceGroupInfo::pname:pDeviceIndices must: have
8946e5c31af7Sopenharmony_ci    been allocated
8947e5c31af7Sopenharmony_ciendif::VK_VERSION_1_1,VK_KHR_device_group[]
8948e5c31af7Sopenharmony_ci****
8949e5c31af7Sopenharmony_ci
8950e5c31af7Sopenharmony_ciinclude::{generated}/validity/structs/VkBindBufferMemoryInfo.adoc[]
8951e5c31af7Sopenharmony_ci--
8952e5c31af7Sopenharmony_ci
8953e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_1,VK_KHR_device_group[]
8954e5c31af7Sopenharmony_ci[open,refpage='VkBindBufferMemoryDeviceGroupInfo',desc='Structure specifying device within a group to bind to',type='structs']
8955e5c31af7Sopenharmony_ci--
8956e5c31af7Sopenharmony_ciThe sname:VkBindBufferMemoryDeviceGroupInfo structure is defined as:
8957e5c31af7Sopenharmony_ci
8958e5c31af7Sopenharmony_ciinclude::{generated}/api/structs/VkBindBufferMemoryDeviceGroupInfo.adoc[]
8959e5c31af7Sopenharmony_ci
8960e5c31af7Sopenharmony_ciifdef::VK_KHR_device_group[]
8961e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_1,VK_KHR_bind_memory2[]
8962e5c31af7Sopenharmony_cior the equivalent
8963e5c31af7Sopenharmony_ci
8964e5c31af7Sopenharmony_ciinclude::{generated}/api/structs/VkBindBufferMemoryDeviceGroupInfoKHR.adoc[]
8965e5c31af7Sopenharmony_ciendif::VK_VERSION_1_1,VK_KHR_bind_memory2[]
8966e5c31af7Sopenharmony_ciendif::VK_KHR_device_group[]
8967e5c31af7Sopenharmony_ci
8968e5c31af7Sopenharmony_ci  * pname:sType is a elink:VkStructureType value identifying this structure.
8969e5c31af7Sopenharmony_ci  * pname:pNext is `NULL` or a pointer to a structure extending this
8970e5c31af7Sopenharmony_ci    structure.
8971e5c31af7Sopenharmony_ci  * pname:deviceIndexCount is the number of elements in
8972e5c31af7Sopenharmony_ci    pname:pDeviceIndices.
8973e5c31af7Sopenharmony_ci  * pname:pDeviceIndices is a pointer to an array of device indices.
8974e5c31af7Sopenharmony_ci
8975e5c31af7Sopenharmony_ciIf the pname:pNext chain of slink:VkBindBufferMemoryInfo includes a
8976e5c31af7Sopenharmony_cisname:VkBindBufferMemoryDeviceGroupInfo structure, then that structure
8977e5c31af7Sopenharmony_cidetermines how memory is bound to buffers across multiple devices in a
8978e5c31af7Sopenharmony_cidevice group.
8979e5c31af7Sopenharmony_ci
8980e5c31af7Sopenharmony_ciIf pname:deviceIndexCount is greater than zero, then on device index [eq]#i#
8981e5c31af7Sopenharmony_cithe buffer is attached to the instance of pname:memory on the physical
8982e5c31af7Sopenharmony_cidevice with device index [eq]#pname:pDeviceIndices[i]#.
8983e5c31af7Sopenharmony_ci
8984e5c31af7Sopenharmony_ciIf pname:deviceIndexCount is zero and pname:memory comes from a memory heap
8985e5c31af7Sopenharmony_ciwith the ename:VK_MEMORY_HEAP_MULTI_INSTANCE_BIT bit set, then it is as if
8986e5c31af7Sopenharmony_cipname:pDeviceIndices contains consecutive indices from zero to the number of
8987e5c31af7Sopenharmony_ciphysical devices in the logical device, minus one.
8988e5c31af7Sopenharmony_ciIn other words, by default each physical device attaches to its own instance
8989e5c31af7Sopenharmony_ciof pname:memory.
8990e5c31af7Sopenharmony_ci
8991e5c31af7Sopenharmony_ciIf pname:deviceIndexCount is zero and pname:memory comes from a memory heap
8992e5c31af7Sopenharmony_ciwithout the ename:VK_MEMORY_HEAP_MULTI_INSTANCE_BIT bit set, then it is as
8993e5c31af7Sopenharmony_ciif pname:pDeviceIndices contains an array of zeros.
8994e5c31af7Sopenharmony_ciIn other words, by default each physical device attaches to instance zero.
8995e5c31af7Sopenharmony_ci
8996e5c31af7Sopenharmony_ci.Valid Usage
8997e5c31af7Sopenharmony_ci****
8998e5c31af7Sopenharmony_ci  * [[VUID-VkBindBufferMemoryDeviceGroupInfo-deviceIndexCount-01606]]
8999e5c31af7Sopenharmony_ci    pname:deviceIndexCount must: either be zero or equal to the number of
9000e5c31af7Sopenharmony_ci    physical devices in the logical device
9001e5c31af7Sopenharmony_ci  * [[VUID-VkBindBufferMemoryDeviceGroupInfo-pDeviceIndices-01607]]
9002e5c31af7Sopenharmony_ci    All elements of pname:pDeviceIndices must: be valid device indices
9003e5c31af7Sopenharmony_ci****
9004e5c31af7Sopenharmony_ci
9005e5c31af7Sopenharmony_ciinclude::{generated}/validity/structs/VkBindBufferMemoryDeviceGroupInfo.adoc[]
9006e5c31af7Sopenharmony_ci--
9007e5c31af7Sopenharmony_ciendif::VK_VERSION_1_1,VK_KHR_device_group[]
9008e5c31af7Sopenharmony_ci
9009e5c31af7Sopenharmony_ciifdef::VK_KHR_maintenance6[]
9010e5c31af7Sopenharmony_ci[open,refpage='VkBindMemoryStatusKHR',desc='Structure specifying where to return memory binding status',type='structs']
9011e5c31af7Sopenharmony_ci--
9012e5c31af7Sopenharmony_ciThe sname:VkBindMemoryStatusKHR structure is defined as:
9013e5c31af7Sopenharmony_ci
9014e5c31af7Sopenharmony_ciinclude::{generated}/api/structs/VkBindMemoryStatusKHR.adoc[]
9015e5c31af7Sopenharmony_ci
9016e5c31af7Sopenharmony_ci  * pname:sType is a elink:VkStructureType value identifying this structure.
9017e5c31af7Sopenharmony_ci  * pname:pNext is `NULL` or a pointer to a structure extending this
9018e5c31af7Sopenharmony_ci    structure.
9019e5c31af7Sopenharmony_ci  * pname:pResult is a pointer to a ename:VkResult value.
9020e5c31af7Sopenharmony_ci
9021e5c31af7Sopenharmony_ciIf the pname:pNext chain of slink:VkBindBufferMemoryInfo or
9022e5c31af7Sopenharmony_cislink:VkBindImageMemoryInfo includes a sname:VkBindMemoryStatusKHR
9023e5c31af7Sopenharmony_cistructure, then the sname:VkBindMemoryStatusKHR::pname:pResult will be
9024e5c31af7Sopenharmony_cipopulated with a value describing the result of the corresponding memory
9025e5c31af7Sopenharmony_cibinding operation.
9026e5c31af7Sopenharmony_ci
9027e5c31af7Sopenharmony_ciinclude::{generated}/validity/structs/VkBindMemoryStatusKHR.adoc[]
9028e5c31af7Sopenharmony_ci--
9029e5c31af7Sopenharmony_ciendif::VK_KHR_maintenance6[]
9030e5c31af7Sopenharmony_ciendif::VK_VERSION_1_1,VK_KHR_bind_memory2[]
9031e5c31af7Sopenharmony_ci
9032e5c31af7Sopenharmony_ci[open,refpage='vkBindImageMemory',desc='Bind device memory to an image object',type='protos']
9033e5c31af7Sopenharmony_ci--
9034e5c31af7Sopenharmony_ci:refpage: vkBindImageMemory
9035e5c31af7Sopenharmony_ci
9036e5c31af7Sopenharmony_ciifndef::VK_VERSION_1_1,VK_KHR_sampler_ycbcr_conversion[]
9037e5c31af7Sopenharmony_ciTo attach memory to an image object, call:
9038e5c31af7Sopenharmony_ciendif::VK_VERSION_1_1,VK_KHR_sampler_ycbcr_conversion[]
9039e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_1,VK_KHR_sampler_ycbcr_conversion[]
9040e5c31af7Sopenharmony_ciTo attach memory to a sname:VkImage object created without the
9041e5c31af7Sopenharmony_ciename:VK_IMAGE_CREATE_DISJOINT_BIT set, call:
9042e5c31af7Sopenharmony_ciendif::VK_VERSION_1_1,VK_KHR_sampler_ycbcr_conversion[]
9043e5c31af7Sopenharmony_ci
9044e5c31af7Sopenharmony_ciinclude::{generated}/api/protos/vkBindImageMemory.adoc[]
9045e5c31af7Sopenharmony_ci
9046e5c31af7Sopenharmony_ci  * pname:device is the logical device that owns the image and memory.
9047e5c31af7Sopenharmony_ci  * pname:image is the image.
9048e5c31af7Sopenharmony_ci  * pname:memory is the slink:VkDeviceMemory object describing the device
9049e5c31af7Sopenharmony_ci    memory to attach.
9050e5c31af7Sopenharmony_ci  * pname:memoryOffset is the start offset of the region of pname:memory
9051e5c31af7Sopenharmony_ci    which is to be bound to the image.
9052e5c31af7Sopenharmony_ci    The number of bytes returned in the
9053e5c31af7Sopenharmony_ci    sname:VkMemoryRequirements::pname:size member in pname:memory, starting
9054e5c31af7Sopenharmony_ci    from pname:memoryOffset bytes, will be bound to the specified image.
9055e5c31af7Sopenharmony_ci
9056e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_1,VK_KHR_bind_memory2[]
9057e5c31af7Sopenharmony_cifname:vkBindImageMemory is equivalent to passing the same parameters through
9058e5c31af7Sopenharmony_cislink:VkBindImageMemoryInfo to flink:vkBindImageMemory2.
9059e5c31af7Sopenharmony_ciendif::VK_VERSION_1_1,VK_KHR_bind_memory2[]
9060e5c31af7Sopenharmony_ci
9061e5c31af7Sopenharmony_ciifdef::VK_NV_external_memory_sci_buf[]
9062e5c31af7Sopenharmony_ciIf the pname:memory is allocated by a memory import operation with
9063e5c31af7Sopenharmony_cislink:VkExternalMemoryBufferCreateInfo::pname:handleTypes assigned to
9064e5c31af7Sopenharmony_ciename:VK_EXTERNAL_MEMORY_HANDLE_TYPE_SCI_BUF_BIT_NV, the properties of
9065e5c31af7Sopenharmony_cipname:image and the pname:memoryoffset must: be compatible with the
9066e5c31af7Sopenharmony_ciattributes used to create stext:NvSciBufObj, otherwise the implementation
9067e5c31af7Sopenharmony_ciwill return ename:VK_ERROR_VALIDATION_FAILED.
9068e5c31af7Sopenharmony_ciendif::VK_NV_external_memory_sci_buf[]
9069e5c31af7Sopenharmony_ci
9070e5c31af7Sopenharmony_ciinclude::{chapters}/commonvalidity/no_dynamic_allocations_common.adoc[]
9071e5c31af7Sopenharmony_ci
9072e5c31af7Sopenharmony_ci.Valid Usage
9073e5c31af7Sopenharmony_ci****
9074e5c31af7Sopenharmony_ciinclude::{chapters}/commonvalidity/bind_image_common.adoc[]
9075e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_1,VK_KHR_sampler_ycbcr_conversion[]
9076e5c31af7Sopenharmony_ci  * [[VUID-vkBindImageMemory-image-01608]]
9077e5c31af7Sopenharmony_ci    pname:image must: not have been created with the
9078e5c31af7Sopenharmony_ci    ename:VK_IMAGE_CREATE_DISJOINT_BIT set
9079e5c31af7Sopenharmony_ciendif::VK_VERSION_1_1,VK_KHR_sampler_ycbcr_conversion[]
9080e5c31af7Sopenharmony_ci  * [[VUID-vkBindImageMemory-memory-01047]]
9081e5c31af7Sopenharmony_ci    pname:memory must: have been allocated using one of the memory types
9082e5c31af7Sopenharmony_ci    allowed in the pname:memoryTypeBits member of the
9083e5c31af7Sopenharmony_ci    sname:VkMemoryRequirements structure returned from a call to
9084e5c31af7Sopenharmony_ci    flink:vkGetImageMemoryRequirements with pname:image
9085e5c31af7Sopenharmony_ci  * [[VUID-vkBindImageMemory-memoryOffset-01048]]
9086e5c31af7Sopenharmony_ci    pname:memoryOffset must: be an integer multiple of the pname:alignment
9087e5c31af7Sopenharmony_ci    member of the sname:VkMemoryRequirements structure returned from a call
9088e5c31af7Sopenharmony_ci    to flink:vkGetImageMemoryRequirements with pname:image
9089e5c31af7Sopenharmony_ci  * [[VUID-vkBindImageMemory-size-01049]]
9090e5c31af7Sopenharmony_ci    The difference of the size of pname:memory and pname:memoryOffset must:
9091e5c31af7Sopenharmony_ci    be greater than or equal to the pname:size member of the
9092e5c31af7Sopenharmony_ci    slink:VkMemoryRequirements structure returned from a call to
9093e5c31af7Sopenharmony_ci    flink:vkGetImageMemoryRequirements with the same pname:image
9094e5c31af7Sopenharmony_ciifdef::VK_FUCHSIA_buffer_collection[]
9095e5c31af7Sopenharmony_ci  * [[VUID-vkBindImageMemory-image-06392]]
9096e5c31af7Sopenharmony_ci    If pname:image was created with
9097e5c31af7Sopenharmony_ci    slink:VkBufferCollectionImageCreateInfoFUCHSIA chained to
9098e5c31af7Sopenharmony_ci    slink:VkImageCreateInfo::pname:pNext, pname:memory must: be allocated
9099e5c31af7Sopenharmony_ci    with a slink:VkImportMemoryBufferCollectionFUCHSIA chained to
9100e5c31af7Sopenharmony_ci    slink:VkMemoryAllocateInfo::pname:pNext
9101e5c31af7Sopenharmony_ciendif::VK_FUCHSIA_buffer_collection[]
9102e5c31af7Sopenharmony_ci****
9103e5c31af7Sopenharmony_ci
9104e5c31af7Sopenharmony_ciinclude::{generated}/validity/protos/vkBindImageMemory.adoc[]
9105e5c31af7Sopenharmony_ci--
9106e5c31af7Sopenharmony_ci
9107e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_1,VK_KHR_bind_memory2[]
9108e5c31af7Sopenharmony_ci[open,refpage='vkBindImageMemory2',desc='Bind device memory to image objects',type='protos']
9109e5c31af7Sopenharmony_ci--
9110e5c31af7Sopenharmony_ci:refpage: vkBindImageMemory2
9111e5c31af7Sopenharmony_ci
9112e5c31af7Sopenharmony_ciTo attach memory to image objects for one or more images at a time, call:
9113e5c31af7Sopenharmony_ci
9114e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_1[]
9115e5c31af7Sopenharmony_ciinclude::{generated}/api/protos/vkBindImageMemory2.adoc[]
9116e5c31af7Sopenharmony_ciendif::VK_VERSION_1_1[]
9117e5c31af7Sopenharmony_ci
9118e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_1+VK_KHR_bind_memory2[or the equivalent command]
9119e5c31af7Sopenharmony_ci
9120e5c31af7Sopenharmony_ciifdef::VK_KHR_bind_memory2[]
9121e5c31af7Sopenharmony_ciinclude::{generated}/api/protos/vkBindImageMemory2KHR.adoc[]
9122e5c31af7Sopenharmony_ciendif::VK_KHR_bind_memory2[]
9123e5c31af7Sopenharmony_ci
9124e5c31af7Sopenharmony_ci  * pname:device is the logical device that owns the images and memory.
9125e5c31af7Sopenharmony_ci  * pname:bindInfoCount is the number of elements in pname:pBindInfos.
9126e5c31af7Sopenharmony_ci  * pname:pBindInfos is a pointer to an array of slink:VkBindImageMemoryInfo
9127e5c31af7Sopenharmony_ci    structures, describing images and memory to bind.
9128e5c31af7Sopenharmony_ci
9129e5c31af7Sopenharmony_ciOn some implementations, it may: be more efficient to batch memory bindings
9130e5c31af7Sopenharmony_ciinto a single command.
9131e5c31af7Sopenharmony_ci
9132e5c31af7Sopenharmony_ciifdef::VK_KHR_maintenance6[]
9133e5c31af7Sopenharmony_ciIf the <<features-maintenance6, pname:maintenance6>> feature is enabled,
9134e5c31af7Sopenharmony_cithis command must: attempt to perform all of the memory binding operations
9135e5c31af7Sopenharmony_cidescribed by pname:pBindInfos, and must: not early exit on the first
9136e5c31af7Sopenharmony_cifailure.
9137e5c31af7Sopenharmony_ciendif::VK_KHR_maintenance6[]
9138e5c31af7Sopenharmony_ci
9139e5c31af7Sopenharmony_ciIf any of the memory binding operations described by pname:pBindInfos fail,
9140e5c31af7Sopenharmony_cithe elink:VkResult returned by this command must: be the return value of any
9141e5c31af7Sopenharmony_cione of the memory binding operations which did not return ename:VK_SUCCESS.
9142e5c31af7Sopenharmony_ci
9143e5c31af7Sopenharmony_ci[NOTE]
9144e5c31af7Sopenharmony_ci.Note
9145e5c31af7Sopenharmony_ci====
9146e5c31af7Sopenharmony_ciIf the fname:vkBindImageMemory2 command failed,
9147e5c31af7Sopenharmony_ciifdef::VK_KHR_maintenance6[]
9148e5c31af7Sopenharmony_cislink:VkBindMemoryStatusKHR structures were not included in the pname:pNext
9149e5c31af7Sopenharmony_cichains of each element of pname:pBindInfos,
9150e5c31af7Sopenharmony_ciendif::VK_KHR_maintenance6[]
9151e5c31af7Sopenharmony_ciand pname:bindInfoCount was greater than one, then the images referenced by
9152e5c31af7Sopenharmony_cipname:pBindInfos will be in an indeterminate state, and must not be used.
9153e5c31af7Sopenharmony_ci
9154e5c31af7Sopenharmony_ciApplications should destroy these images.
9155e5c31af7Sopenharmony_ci====
9156e5c31af7Sopenharmony_ci
9157e5c31af7Sopenharmony_ciinclude::{chapters}/commonvalidity/no_dynamic_allocations_common.adoc[]
9158e5c31af7Sopenharmony_ci
9159e5c31af7Sopenharmony_ci.Valid Usage
9160e5c31af7Sopenharmony_ci****
9161e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_1,VK_KHR_sampler_ycbcr_conversion[]
9162e5c31af7Sopenharmony_ci  * [[VUID-vkBindImageMemory2-pBindInfos-02858]]
9163e5c31af7Sopenharmony_ci    If any slink:VkBindImageMemoryInfo::pname:image was created with
9164e5c31af7Sopenharmony_ci    ename:VK_IMAGE_CREATE_DISJOINT_BIT then all planes of
9165e5c31af7Sopenharmony_ci    slink:VkBindImageMemoryInfo::pname:image must: be bound individually in
9166e5c31af7Sopenharmony_ci    separate pname:pBindInfos
9167e5c31af7Sopenharmony_ci  * [[VUID-vkBindImageMemory2-pBindInfos-04006]]
9168e5c31af7Sopenharmony_ci    pname:pBindInfos must: not refer to the same image subresource more than
9169e5c31af7Sopenharmony_ci    once
9170e5c31af7Sopenharmony_ciendif::VK_VERSION_1_1,VK_KHR_sampler_ycbcr_conversion[]
9171e5c31af7Sopenharmony_ci****
9172e5c31af7Sopenharmony_ci
9173e5c31af7Sopenharmony_ciinclude::{generated}/validity/protos/vkBindImageMemory2.adoc[]
9174e5c31af7Sopenharmony_ci--
9175e5c31af7Sopenharmony_ci
9176e5c31af7Sopenharmony_ci[open,refpage='VkBindImageMemoryInfo',desc='Structure specifying how to bind an image to memory',type='structs']
9177e5c31af7Sopenharmony_ci--
9178e5c31af7Sopenharmony_ci:refpage: VkBindImageMemoryInfo
9179e5c31af7Sopenharmony_ci
9180e5c31af7Sopenharmony_cisname:VkBindImageMemoryInfo contains members corresponding to the parameters
9181e5c31af7Sopenharmony_ciof flink:vkBindImageMemory.
9182e5c31af7Sopenharmony_ci
9183e5c31af7Sopenharmony_ciThe sname:VkBindImageMemoryInfo structure is defined as:
9184e5c31af7Sopenharmony_ci
9185e5c31af7Sopenharmony_ciinclude::{generated}/api/structs/VkBindImageMemoryInfo.adoc[]
9186e5c31af7Sopenharmony_ci
9187e5c31af7Sopenharmony_ciifdef::VK_KHR_bind_memory2[]
9188e5c31af7Sopenharmony_cior the equivalent
9189e5c31af7Sopenharmony_ci
9190e5c31af7Sopenharmony_ciinclude::{generated}/api/structs/VkBindImageMemoryInfoKHR.adoc[]
9191e5c31af7Sopenharmony_ciendif::VK_KHR_bind_memory2[]
9192e5c31af7Sopenharmony_ci
9193e5c31af7Sopenharmony_ci  * pname:sType is a elink:VkStructureType value identifying this structure.
9194e5c31af7Sopenharmony_ci  * pname:pNext is `NULL` or a pointer to a structure extending this
9195e5c31af7Sopenharmony_ci    structure.
9196e5c31af7Sopenharmony_ci  * pname:image is the image to be attached to memory.
9197e5c31af7Sopenharmony_ci  * pname:memory is a slink:VkDeviceMemory object describing the device
9198e5c31af7Sopenharmony_ci    memory to attach.
9199e5c31af7Sopenharmony_ci  * pname:memoryOffset is the start offset of the region of pname:memory
9200e5c31af7Sopenharmony_ci    which is to be bound to the image.
9201e5c31af7Sopenharmony_ci    The number of bytes returned in the
9202e5c31af7Sopenharmony_ci    sname:VkMemoryRequirements::pname:size member in pname:memory, starting
9203e5c31af7Sopenharmony_ci    from pname:memoryOffset bytes, will be bound to the specified image.
9204e5c31af7Sopenharmony_ci
9205e5c31af7Sopenharmony_ci.Valid Usage
9206e5c31af7Sopenharmony_ci****
9207e5c31af7Sopenharmony_ciinclude::{chapters}/commonvalidity/bind_image_common.adoc[]
9208e5c31af7Sopenharmony_ciifndef::VK_VERSION_1_1,VK_KHR_sampler_ycbcr_conversion[]
9209e5c31af7Sopenharmony_ci  * [[VUID-VkBindImageMemoryInfo-memory-01612]]
9210e5c31af7Sopenharmony_ci    pname:memory must: have been allocated using one of the memory types
9211e5c31af7Sopenharmony_ci    allowed in the pname:memoryTypeBits member of the
9212e5c31af7Sopenharmony_ci    slink:VkMemoryRequirements structure returned from a call to
9213e5c31af7Sopenharmony_ci    flink:vkGetImageMemoryRequirements with pname:image
9214e5c31af7Sopenharmony_ci  * [[VUID-VkBindImageMemoryInfo-memoryOffset-01613]]
9215e5c31af7Sopenharmony_ci    pname:memoryOffset must: be an integer multiple of the pname:alignment
9216e5c31af7Sopenharmony_ci    member of the slink:VkMemoryRequirements structure returned from a call
9217e5c31af7Sopenharmony_ci    to flink:vkGetImageMemoryRequirements with pname:image
9218e5c31af7Sopenharmony_ci  * [[VUID-VkBindImageMemoryInfo-memory-01614]]
9219e5c31af7Sopenharmony_ci    The difference of the size of pname:memory and pname:memoryOffset must:
9220e5c31af7Sopenharmony_ci    be greater than or equal to the pname:size member of the
9221e5c31af7Sopenharmony_ci    slink:VkMemoryRequirements structure returned from a call to
9222e5c31af7Sopenharmony_ci    flink:vkGetImageMemoryRequirements with the same pname:image
9223e5c31af7Sopenharmony_ciendif::VK_VERSION_1_1,VK_KHR_sampler_ycbcr_conversion[]
9224e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_1,VK_KHR_sampler_ycbcr_conversion[]
9225e5c31af7Sopenharmony_ci  * [[VUID-VkBindImageMemoryInfo-pNext-01615]]
9226e5c31af7Sopenharmony_ci    If the pname:pNext chain does not include a
9227e5c31af7Sopenharmony_ci    slink:VkBindImagePlaneMemoryInfo structure, pname:memory must: have been
9228e5c31af7Sopenharmony_ci    allocated using one of the memory types allowed in the
9229e5c31af7Sopenharmony_ci    pname:memoryTypeBits member of the slink:VkMemoryRequirements structure
9230e5c31af7Sopenharmony_ci    returned from a call to flink:vkGetImageMemoryRequirements2 with
9231e5c31af7Sopenharmony_ci    pname:image
9232e5c31af7Sopenharmony_ci  * [[VUID-VkBindImageMemoryInfo-pNext-01616]]
9233e5c31af7Sopenharmony_ci    If the pname:pNext chain does not include a
9234e5c31af7Sopenharmony_ci    slink:VkBindImagePlaneMemoryInfo structure, pname:memoryOffset must: be
9235e5c31af7Sopenharmony_ci    an integer multiple of the pname:alignment member of the
9236e5c31af7Sopenharmony_ci    slink:VkMemoryRequirements structure returned from a call to
9237e5c31af7Sopenharmony_ci    flink:vkGetImageMemoryRequirements2 with pname:image
9238e5c31af7Sopenharmony_ci  * [[VUID-VkBindImageMemoryInfo-pNext-01617]]
9239e5c31af7Sopenharmony_ci    If the pname:pNext chain does not include a
9240e5c31af7Sopenharmony_ci    slink:VkBindImagePlaneMemoryInfo structure, the difference of the size
9241e5c31af7Sopenharmony_ci    of pname:memory and pname:memoryOffset must: be greater than or equal to
9242e5c31af7Sopenharmony_ci    the pname:size member of the slink:VkMemoryRequirements structure
9243e5c31af7Sopenharmony_ci    returned from a call to flink:vkGetImageMemoryRequirements2 with the
9244e5c31af7Sopenharmony_ci    same pname:image
9245e5c31af7Sopenharmony_ci  * [[VUID-VkBindImageMemoryInfo-pNext-01618]]
9246e5c31af7Sopenharmony_ci    If the pname:pNext chain includes a slink:VkBindImagePlaneMemoryInfo
9247e5c31af7Sopenharmony_ci    structure, pname:image must: have been created with the
9248e5c31af7Sopenharmony_ci    ename:VK_IMAGE_CREATE_DISJOINT_BIT bit set
9249e5c31af7Sopenharmony_ci  * [[VUID-VkBindImageMemoryInfo-image-07736]]
9250e5c31af7Sopenharmony_ci    If pname:image was created with the ename:VK_IMAGE_CREATE_DISJOINT_BIT
9251e5c31af7Sopenharmony_ci    bit set, then the pname:pNext chain must: include a
9252e5c31af7Sopenharmony_ci    slink:VkBindImagePlaneMemoryInfo structure
9253e5c31af7Sopenharmony_ci  * [[VUID-VkBindImageMemoryInfo-pNext-01619]]
9254e5c31af7Sopenharmony_ci    If the pname:pNext chain includes a slink:VkBindImagePlaneMemoryInfo
9255e5c31af7Sopenharmony_ci    structure, pname:memory must: have been allocated using one of the
9256e5c31af7Sopenharmony_ci    memory types allowed in the pname:memoryTypeBits member of the
9257e5c31af7Sopenharmony_ci    slink:VkMemoryRequirements structure returned from a call to
9258e5c31af7Sopenharmony_ci    flink:vkGetImageMemoryRequirements2 with pname:image and where
9259e5c31af7Sopenharmony_ci    slink:VkBindImagePlaneMemoryInfo::pname:planeAspect corresponds to the
9260e5c31af7Sopenharmony_ci    slink:VkImagePlaneMemoryRequirementsInfo::pname:planeAspect in the
9261e5c31af7Sopenharmony_ci    slink:VkImageMemoryRequirementsInfo2 structure's pname:pNext chain
9262e5c31af7Sopenharmony_ci  * [[VUID-VkBindImageMemoryInfo-pNext-01620]]
9263e5c31af7Sopenharmony_ci    If the pname:pNext chain includes a slink:VkBindImagePlaneMemoryInfo
9264e5c31af7Sopenharmony_ci    structure, pname:memoryOffset must: be an integer multiple of the
9265e5c31af7Sopenharmony_ci    pname:alignment member of the slink:VkMemoryRequirements structure
9266e5c31af7Sopenharmony_ci    returned from a call to flink:vkGetImageMemoryRequirements2 with
9267e5c31af7Sopenharmony_ci    pname:image and where
9268e5c31af7Sopenharmony_ci    slink:VkBindImagePlaneMemoryInfo::pname:planeAspect corresponds to the
9269e5c31af7Sopenharmony_ci    slink:VkImagePlaneMemoryRequirementsInfo::pname:planeAspect in the
9270e5c31af7Sopenharmony_ci    slink:VkImageMemoryRequirementsInfo2 structure's pname:pNext chain
9271e5c31af7Sopenharmony_ci  * [[VUID-VkBindImageMemoryInfo-pNext-01621]]
9272e5c31af7Sopenharmony_ci    If the pname:pNext chain includes a slink:VkBindImagePlaneMemoryInfo
9273e5c31af7Sopenharmony_ci    structure, the difference of the size of pname:memory and
9274e5c31af7Sopenharmony_ci    pname:memoryOffset must: be greater than or equal to the pname:size
9275e5c31af7Sopenharmony_ci    member of the slink:VkMemoryRequirements structure returned from a call
9276e5c31af7Sopenharmony_ci    to flink:vkGetImageMemoryRequirements2 with the same pname:image and
9277e5c31af7Sopenharmony_ci    where slink:VkBindImagePlaneMemoryInfo::pname:planeAspect corresponds to
9278e5c31af7Sopenharmony_ci    the slink:VkImagePlaneMemoryRequirementsInfo::pname:planeAspect in the
9279e5c31af7Sopenharmony_ci    slink:VkImageMemoryRequirementsInfo2 structure's pname:pNext chain
9280e5c31af7Sopenharmony_ciendif::VK_VERSION_1_1,VK_KHR_sampler_ycbcr_conversion[]
9281e5c31af7Sopenharmony_ciifndef::VK_VERSION_1_1+VK_KHR_swapchain[]
9282e5c31af7Sopenharmony_ciifndef::VK_KHR_device_group+VK_KHR_swapchain[]
9283e5c31af7Sopenharmony_ci  * [[VUID-VkBindImageMemoryInfo-memory-01625]]
9284e5c31af7Sopenharmony_ci    pname:memory must: be a valid slink:VkDeviceMemory handle
9285e5c31af7Sopenharmony_ciendif::VK_KHR_device_group+VK_KHR_swapchain[]
9286e5c31af7Sopenharmony_ciendif::VK_VERSION_1_1+VK_KHR_swapchain[]
9287e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_1,VK_KHR_device_group[]
9288e5c31af7Sopenharmony_ci  * [[VUID-VkBindImageMemoryInfo-pNext-01626]]
9289e5c31af7Sopenharmony_ci    If the pname:pNext chain includes a
9290e5c31af7Sopenharmony_ci    slink:VkBindImageMemoryDeviceGroupInfo structure, all instances of
9291e5c31af7Sopenharmony_ci    pname:memory specified by
9292e5c31af7Sopenharmony_ci    slink:VkBindImageMemoryDeviceGroupInfo::pname:pDeviceIndices must: have
9293e5c31af7Sopenharmony_ci    been allocated
9294e5c31af7Sopenharmony_ciifndef::VKSC_VERSION_1_0[]
9295e5c31af7Sopenharmony_ci  * [[VUID-VkBindImageMemoryInfo-pNext-01627]]
9296e5c31af7Sopenharmony_ci    If the pname:pNext chain includes a
9297e5c31af7Sopenharmony_ci    slink:VkBindImageMemoryDeviceGroupInfo structure, and
9298e5c31af7Sopenharmony_ci    slink:VkBindImageMemoryDeviceGroupInfo::pname:splitInstanceBindRegionCount
9299e5c31af7Sopenharmony_ci    is not zero, then pname:image must: have been created with the
9300e5c31af7Sopenharmony_ci    ename:VK_IMAGE_CREATE_SPLIT_INSTANCE_BIND_REGIONS_BIT bit set
9301e5c31af7Sopenharmony_ci  * [[VUID-VkBindImageMemoryInfo-pNext-01628]]
9302e5c31af7Sopenharmony_ci    If the pname:pNext chain includes a
9303e5c31af7Sopenharmony_ci    slink:VkBindImageMemoryDeviceGroupInfo structure, all elements of
9304e5c31af7Sopenharmony_ci    slink:VkBindImageMemoryDeviceGroupInfo::pname:pSplitInstanceBindRegions
9305e5c31af7Sopenharmony_ci    must: be valid rectangles contained within the dimensions of pname:image
9306e5c31af7Sopenharmony_ci  * [[VUID-VkBindImageMemoryInfo-pNext-01629]]
9307e5c31af7Sopenharmony_ci    If the pname:pNext chain includes a
9308e5c31af7Sopenharmony_ci    slink:VkBindImageMemoryDeviceGroupInfo structure, the union of the areas
9309e5c31af7Sopenharmony_ci    of all elements of
9310e5c31af7Sopenharmony_ci    slink:VkBindImageMemoryDeviceGroupInfo::pname:pSplitInstanceBindRegions
9311e5c31af7Sopenharmony_ci    that correspond to the same instance of pname:image must: cover the
9312e5c31af7Sopenharmony_ci    entire image
9313e5c31af7Sopenharmony_ciendif::VKSC_VERSION_1_0[]
9314e5c31af7Sopenharmony_ciifdef::VK_KHR_swapchain[]
9315e5c31af7Sopenharmony_ci  * [[VUID-VkBindImageMemoryInfo-image-01630]]
9316e5c31af7Sopenharmony_ci    If pname:image was created with a valid swapchain handle in
9317e5c31af7Sopenharmony_ci    slink:VkImageSwapchainCreateInfoKHR::pname:swapchain, then the
9318e5c31af7Sopenharmony_ci    pname:pNext chain must: include a
9319e5c31af7Sopenharmony_ci    slink:VkBindImageMemorySwapchainInfoKHR structure containing the same
9320e5c31af7Sopenharmony_ci    swapchain handle
9321e5c31af7Sopenharmony_ci  * [[VUID-VkBindImageMemoryInfo-pNext-01631]]
9322e5c31af7Sopenharmony_ci    If the pname:pNext chain includes a
9323e5c31af7Sopenharmony_ci    slink:VkBindImageMemorySwapchainInfoKHR structure, pname:memory must: be
9324e5c31af7Sopenharmony_ci    dlink:VK_NULL_HANDLE
9325e5c31af7Sopenharmony_ci  * [[VUID-VkBindImageMemoryInfo-pNext-01632]]
9326e5c31af7Sopenharmony_ci    If the pname:pNext chain does not include a
9327e5c31af7Sopenharmony_ci    slink:VkBindImageMemorySwapchainInfoKHR structure, pname:memory must: be
9328e5c31af7Sopenharmony_ci    a valid slink:VkDeviceMemory handle
9329e5c31af7Sopenharmony_ciendif::VK_KHR_swapchain[]
9330e5c31af7Sopenharmony_ciendif::VK_VERSION_1_1,VK_KHR_device_group[]
9331e5c31af7Sopenharmony_ci****
9332e5c31af7Sopenharmony_ci
9333e5c31af7Sopenharmony_ciinclude::{generated}/validity/structs/VkBindImageMemoryInfo.adoc[]
9334e5c31af7Sopenharmony_ci--
9335e5c31af7Sopenharmony_ci
9336e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_1,VK_KHR_device_group[]
9337e5c31af7Sopenharmony_ci[open,refpage='VkBindImageMemoryDeviceGroupInfo',desc='Structure specifying device within a group to bind to',type='structs']
9338e5c31af7Sopenharmony_ci--
9339e5c31af7Sopenharmony_ciThe sname:VkBindImageMemoryDeviceGroupInfo structure is defined as:
9340e5c31af7Sopenharmony_ci
9341e5c31af7Sopenharmony_ciinclude::{generated}/api/structs/VkBindImageMemoryDeviceGroupInfo.adoc[]
9342e5c31af7Sopenharmony_ci
9343e5c31af7Sopenharmony_ciifdef::VK_KHR_device_group[]
9344e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_1,VK_KHR_bind_memory2[]
9345e5c31af7Sopenharmony_cior the equivalent
9346e5c31af7Sopenharmony_ci
9347e5c31af7Sopenharmony_ciinclude::{generated}/api/structs/VkBindImageMemoryDeviceGroupInfoKHR.adoc[]
9348e5c31af7Sopenharmony_ciendif::VK_VERSION_1_1,VK_KHR_bind_memory2[]
9349e5c31af7Sopenharmony_ciendif::VK_KHR_device_group[]
9350e5c31af7Sopenharmony_ci
9351e5c31af7Sopenharmony_ci  * pname:sType is a elink:VkStructureType value identifying this structure.
9352e5c31af7Sopenharmony_ci  * pname:pNext is `NULL` or a pointer to a structure extending this
9353e5c31af7Sopenharmony_ci    structure.
9354e5c31af7Sopenharmony_ci  * pname:deviceIndexCount is the number of elements in
9355e5c31af7Sopenharmony_ci    pname:pDeviceIndices.
9356e5c31af7Sopenharmony_ci  * pname:pDeviceIndices is a pointer to an array of device indices.
9357e5c31af7Sopenharmony_ci  * pname:splitInstanceBindRegionCount is the number of elements in
9358e5c31af7Sopenharmony_ci    pname:pSplitInstanceBindRegions.
9359e5c31af7Sopenharmony_ci  * pname:pSplitInstanceBindRegions is a pointer to an array of
9360e5c31af7Sopenharmony_ci    slink:VkRect2D structures describing which regions of the image are
9361e5c31af7Sopenharmony_ci    attached to each instance of memory.
9362e5c31af7Sopenharmony_ci
9363e5c31af7Sopenharmony_ciIf the pname:pNext chain of slink:VkBindImageMemoryInfo includes a
9364e5c31af7Sopenharmony_cisname:VkBindImageMemoryDeviceGroupInfo structure, then that structure
9365e5c31af7Sopenharmony_cidetermines how memory is bound to images across multiple devices in a device
9366e5c31af7Sopenharmony_cigroup.
9367e5c31af7Sopenharmony_ci
9368e5c31af7Sopenharmony_ciIf pname:deviceIndexCount is greater than zero, then on device index [eq]#i#
9369e5c31af7Sopenharmony_cipname:image is attached to the instance of the memory on the physical device
9370e5c31af7Sopenharmony_ciwith device index [eq]#pname:pDeviceIndices[i]#.
9371e5c31af7Sopenharmony_ci
9372e5c31af7Sopenharmony_ciifndef::VKSC_VERSION_1_0[]
9373e5c31af7Sopenharmony_ciLet [eq]#N# be the number of physical devices in the logical device.
9374e5c31af7Sopenharmony_ciIf pname:splitInstanceBindRegionCount is greater than zero, then
9375e5c31af7Sopenharmony_cipname:pSplitInstanceBindRegions is a pointer to an array of [eq]#N^2^#
9376e5c31af7Sopenharmony_cirectangles, where the image region specified by the rectangle at element
9377e5c31af7Sopenharmony_ci[eq]#i*N+j# in resource instance [eq]#i# is bound to the memory instance
9378e5c31af7Sopenharmony_ci[eq]#j#.
9379e5c31af7Sopenharmony_ciThe blocks of the memory that are bound to each sparse image block region
9380e5c31af7Sopenharmony_ciuse an offset in memory, relative to pname:memoryOffset, computed as if the
9381e5c31af7Sopenharmony_ciwhole image was being bound to a contiguous range of memory.
9382e5c31af7Sopenharmony_ciIn other words, horizontally adjacent image blocks use consecutive blocks of
9383e5c31af7Sopenharmony_cimemory, vertically adjacent image blocks are separated by the number of
9384e5c31af7Sopenharmony_cibytes per block multiplied by the width in blocks of pname:image, and the
9385e5c31af7Sopenharmony_ciblock at [eq]#(0,0)# corresponds to memory starting at pname:memoryOffset.
9386e5c31af7Sopenharmony_ciendif::VKSC_VERSION_1_0[]
9387e5c31af7Sopenharmony_ciifdef::VKSC_VERSION_1_0[]
9388e5c31af7Sopenharmony_ciIn Vulkan SC, pname:splitInstanceBindRegionCount must: be zero because
9389e5c31af7Sopenharmony_cisparse allocations are not supported <<SCID-8>>.
9390e5c31af7Sopenharmony_ciendif::VKSC_VERSION_1_0[]
9391e5c31af7Sopenharmony_ci
9392e5c31af7Sopenharmony_ciIf pname:splitInstanceBindRegionCount and pname:deviceIndexCount are zero
9393e5c31af7Sopenharmony_ciand the memory comes from a memory heap with the
9394e5c31af7Sopenharmony_ciename:VK_MEMORY_HEAP_MULTI_INSTANCE_BIT bit set, then it is as if
9395e5c31af7Sopenharmony_cipname:pDeviceIndices contains consecutive indices from zero to the number of
9396e5c31af7Sopenharmony_ciphysical devices in the logical device, minus one.
9397e5c31af7Sopenharmony_ciIn other words, by default each physical device attaches to its own instance
9398e5c31af7Sopenharmony_ciof the memory.
9399e5c31af7Sopenharmony_ci
9400e5c31af7Sopenharmony_ciIf pname:splitInstanceBindRegionCount and pname:deviceIndexCount are zero
9401e5c31af7Sopenharmony_ciand the memory comes from a memory heap without the
9402e5c31af7Sopenharmony_ciename:VK_MEMORY_HEAP_MULTI_INSTANCE_BIT bit set, then it is as if
9403e5c31af7Sopenharmony_cipname:pDeviceIndices contains an array of zeros.
9404e5c31af7Sopenharmony_ciIn other words, by default each physical device attaches to instance zero.
9405e5c31af7Sopenharmony_ci
9406e5c31af7Sopenharmony_ci.Valid Usage
9407e5c31af7Sopenharmony_ci****
9408e5c31af7Sopenharmony_ciifndef::VKSC_VERSION_1_0[]
9409e5c31af7Sopenharmony_ci  * [[VUID-VkBindImageMemoryDeviceGroupInfo-deviceIndexCount-01633]]
9410e5c31af7Sopenharmony_ci    At least one of pname:deviceIndexCount and
9411e5c31af7Sopenharmony_ci    pname:splitInstanceBindRegionCount must: be zero
9412e5c31af7Sopenharmony_ciendif::VKSC_VERSION_1_0[]
9413e5c31af7Sopenharmony_ci  * [[VUID-VkBindImageMemoryDeviceGroupInfo-deviceIndexCount-01634]]
9414e5c31af7Sopenharmony_ci    pname:deviceIndexCount must: either be zero or equal to the number of
9415e5c31af7Sopenharmony_ci    physical devices in the logical device
9416e5c31af7Sopenharmony_ci  * [[VUID-VkBindImageMemoryDeviceGroupInfo-pDeviceIndices-01635]]
9417e5c31af7Sopenharmony_ci    All elements of pname:pDeviceIndices must: be valid device indices
9418e5c31af7Sopenharmony_ciifdef::VKSC_VERSION_1_0[]
9419e5c31af7Sopenharmony_ci  * [[VUID-VkBindImageMemoryDeviceGroupInfo-splitInstanceBindRegionCount-05067]]
9420e5c31af7Sopenharmony_ci    pname:splitInstanceBindRegionCount must: be zero
9421e5c31af7Sopenharmony_ciendif::VKSC_VERSION_1_0[]
9422e5c31af7Sopenharmony_ciifndef::VKSC_VERSION_1_0[]
9423e5c31af7Sopenharmony_ci  * [[VUID-VkBindImageMemoryDeviceGroupInfo-splitInstanceBindRegionCount-01636]]
9424e5c31af7Sopenharmony_ci    pname:splitInstanceBindRegionCount must: either be zero or equal to the
9425e5c31af7Sopenharmony_ci    number of physical devices in the logical device squared
9426e5c31af7Sopenharmony_ci  * [[VUID-VkBindImageMemoryDeviceGroupInfo-pSplitInstanceBindRegions-01637]]
9427e5c31af7Sopenharmony_ci    Elements of pname:pSplitInstanceBindRegions that correspond to the same
9428e5c31af7Sopenharmony_ci    instance of an image must: not overlap
9429e5c31af7Sopenharmony_ci  * [[VUID-VkBindImageMemoryDeviceGroupInfo-offset-01638]]
9430e5c31af7Sopenharmony_ci    The pname:offset.x member of any element of
9431e5c31af7Sopenharmony_ci    pname:pSplitInstanceBindRegions must: be a multiple of the sparse image
9432e5c31af7Sopenharmony_ci    block width
9433e5c31af7Sopenharmony_ci    (sname:VkSparseImageFormatProperties::pname:imageGranularity.width) of
9434e5c31af7Sopenharmony_ci    all non-metadata aspects of the image
9435e5c31af7Sopenharmony_ci  * [[VUID-VkBindImageMemoryDeviceGroupInfo-offset-01639]]
9436e5c31af7Sopenharmony_ci    The pname:offset.y member of any element of
9437e5c31af7Sopenharmony_ci    pname:pSplitInstanceBindRegions must: be a multiple of the sparse image
9438e5c31af7Sopenharmony_ci    block height
9439e5c31af7Sopenharmony_ci    (sname:VkSparseImageFormatProperties::pname:imageGranularity.height) of
9440e5c31af7Sopenharmony_ci    all non-metadata aspects of the image
9441e5c31af7Sopenharmony_ci  * [[VUID-VkBindImageMemoryDeviceGroupInfo-extent-01640]]
9442e5c31af7Sopenharmony_ci    The pname:extent.width member of any element of
9443e5c31af7Sopenharmony_ci    pname:pSplitInstanceBindRegions must: either be a multiple of the sparse
9444e5c31af7Sopenharmony_ci    image block width of all non-metadata aspects of the image, or else
9445e5c31af7Sopenharmony_ci    pname:extent.width {plus} pname:offset.x must: equal the width of the
9446e5c31af7Sopenharmony_ci    image subresource
9447e5c31af7Sopenharmony_ci  * [[VUID-VkBindImageMemoryDeviceGroupInfo-extent-01641]]
9448e5c31af7Sopenharmony_ci    The pname:extent.height member of any element of
9449e5c31af7Sopenharmony_ci    pname:pSplitInstanceBindRegions must: either be a multiple of the sparse
9450e5c31af7Sopenharmony_ci    image block height of all non-metadata aspects of the image, or else
9451e5c31af7Sopenharmony_ci    pname:extent.height {plus} pname:offset.y must: equal the height of the
9452e5c31af7Sopenharmony_ci    image subresource
9453e5c31af7Sopenharmony_ciendif::VKSC_VERSION_1_0[]
9454e5c31af7Sopenharmony_ci****
9455e5c31af7Sopenharmony_ciifdef::VKSC_VERSION_1_0[]
9456e5c31af7Sopenharmony_ciifdef::hidden[]
9457e5c31af7Sopenharmony_ci// tag::scdeviation[]
9458e5c31af7Sopenharmony_ci  * slink:VkBindImageMemoryDeviceGroupInfo::pname:splitInstanceBindRegionCount
9459e5c31af7Sopenharmony_ci    must: be zero <<SCID-8>>.
9460e5c31af7Sopenharmony_ci// end::scdeviation[]
9461e5c31af7Sopenharmony_ciendif::hidden[]
9462e5c31af7Sopenharmony_ciendif::VKSC_VERSION_1_0[]
9463e5c31af7Sopenharmony_ci
9464e5c31af7Sopenharmony_ciinclude::{generated}/validity/structs/VkBindImageMemoryDeviceGroupInfo.adoc[]
9465e5c31af7Sopenharmony_ci--
9466e5c31af7Sopenharmony_ci
9467e5c31af7Sopenharmony_ciifdef::VK_KHR_swapchain[]
9468e5c31af7Sopenharmony_ci[open,refpage='VkBindImageMemorySwapchainInfoKHR',desc='Structure specifying swapchain image memory to bind to',type='structs']
9469e5c31af7Sopenharmony_ci--
9470e5c31af7Sopenharmony_ciIf the pname:pNext chain of slink:VkBindImageMemoryInfo includes a
9471e5c31af7Sopenharmony_cisname:VkBindImageMemorySwapchainInfoKHR structure, then that structure
9472e5c31af7Sopenharmony_ciincludes a swapchain handle and image index indicating that the image will
9473e5c31af7Sopenharmony_cibe bound to memory from that swapchain.
9474e5c31af7Sopenharmony_ci
9475e5c31af7Sopenharmony_ciThe sname:VkBindImageMemorySwapchainInfoKHR structure is defined as:
9476e5c31af7Sopenharmony_ci
9477e5c31af7Sopenharmony_ciinclude::{generated}/api/structs/VkBindImageMemorySwapchainInfoKHR.adoc[]
9478e5c31af7Sopenharmony_ci
9479e5c31af7Sopenharmony_ci  * pname:sType is a elink:VkStructureType value identifying this structure.
9480e5c31af7Sopenharmony_ci  * pname:pNext is `NULL` or a pointer to a structure extending this
9481e5c31af7Sopenharmony_ci    structure.
9482e5c31af7Sopenharmony_ci  * pname:swapchain is dlink:VK_NULL_HANDLE or a swapchain handle.
9483e5c31af7Sopenharmony_ci  * pname:imageIndex is an image index within pname:swapchain.
9484e5c31af7Sopenharmony_ci
9485e5c31af7Sopenharmony_ciIf pname:swapchain is not `NULL`, the pname:swapchain and pname:imageIndex
9486e5c31af7Sopenharmony_ciare used to determine the memory that the image is bound to, instead of
9487e5c31af7Sopenharmony_cipname:memory and pname:memoryOffset.
9488e5c31af7Sopenharmony_ci
9489e5c31af7Sopenharmony_ciMemory can: be bound to a swapchain and use the pname:pDeviceIndices or
9490e5c31af7Sopenharmony_cipname:pSplitInstanceBindRegions members of
9491e5c31af7Sopenharmony_cislink:VkBindImageMemoryDeviceGroupInfo.
9492e5c31af7Sopenharmony_ci
9493e5c31af7Sopenharmony_ci.Valid Usage
9494e5c31af7Sopenharmony_ci****
9495e5c31af7Sopenharmony_ci  * [[VUID-VkBindImageMemorySwapchainInfoKHR-imageIndex-01644]]
9496e5c31af7Sopenharmony_ci    pname:imageIndex must: be less than the number of images in
9497e5c31af7Sopenharmony_ci    pname:swapchain
9498e5c31af7Sopenharmony_ciifdef::VK_EXT_swapchain_maintenance1[]
9499e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_1,VK_KHR_device_group[]
9500e5c31af7Sopenharmony_ci  * [[VUID-VkBindImageMemorySwapchainInfoKHR-swapchain-07756]]
9501e5c31af7Sopenharmony_ci    If the pname:swapchain has been created with
9502e5c31af7Sopenharmony_ci    ename:VK_SWAPCHAIN_CREATE_DEFERRED_MEMORY_ALLOCATION_BIT_EXT,
9503e5c31af7Sopenharmony_ci    pname:imageIndex must: be one that has previously been returned by
9504e5c31af7Sopenharmony_ci    flink:vkAcquireNextImageKHR or flink:vkAcquireNextImage2KHR
9505e5c31af7Sopenharmony_ciendif::VK_VERSION_1_1,VK_KHR_device_group[]
9506e5c31af7Sopenharmony_ciifndef::VK_VERSION_1_1,VK_KHR_device_group[]
9507e5c31af7Sopenharmony_ci  * [[VUID-VkBindImageMemorySwapchainInfoKHR-swapchain-07910]]
9508e5c31af7Sopenharmony_ci    If the pname:swapchain has been created with
9509e5c31af7Sopenharmony_ci    ename:VK_SWAPCHAIN_CREATE_DEFERRED_MEMORY_ALLOCATION_BIT_EXT,
9510e5c31af7Sopenharmony_ci    pname:imageIndex must: be one that has previously been returned by
9511e5c31af7Sopenharmony_ci    flink:vkAcquireNextImageKHR
9512e5c31af7Sopenharmony_ciendif::VK_VERSION_1_1,VK_KHR_device_group[]
9513e5c31af7Sopenharmony_ciendif::VK_EXT_swapchain_maintenance1[]
9514e5c31af7Sopenharmony_ci****
9515e5c31af7Sopenharmony_ci
9516e5c31af7Sopenharmony_ciinclude::{generated}/validity/structs/VkBindImageMemorySwapchainInfoKHR.adoc[]
9517e5c31af7Sopenharmony_ci--
9518e5c31af7Sopenharmony_ciendif::VK_KHR_swapchain[]
9519e5c31af7Sopenharmony_ciendif::VK_VERSION_1_1,VK_KHR_device_group[]
9520e5c31af7Sopenharmony_ci
9521e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_1,VK_KHR_sampler_ycbcr_conversion[]
9522e5c31af7Sopenharmony_ci[open,refpage='VkBindImagePlaneMemoryInfo',desc='Structure specifying how to bind an image plane to memory',type='structs']
9523e5c31af7Sopenharmony_ci--
9524e5c31af7Sopenharmony_ciIn order to bind _planes_ of a _disjoint image_, add a
9525e5c31af7Sopenharmony_cisname:VkBindImagePlaneMemoryInfo structure to the pname:pNext chain of
9526e5c31af7Sopenharmony_cislink:VkBindImageMemoryInfo.
9527e5c31af7Sopenharmony_ci
9528e5c31af7Sopenharmony_ciThe sname:VkBindImagePlaneMemoryInfo structure is defined as:
9529e5c31af7Sopenharmony_ci
9530e5c31af7Sopenharmony_ciinclude::{generated}/api/structs/VkBindImagePlaneMemoryInfo.adoc[]
9531e5c31af7Sopenharmony_ci
9532e5c31af7Sopenharmony_ciifdef::VK_KHR_sampler_ycbcr_conversion[]
9533e5c31af7Sopenharmony_cior the equivalent
9534e5c31af7Sopenharmony_ci
9535e5c31af7Sopenharmony_ciinclude::{generated}/api/structs/VkBindImagePlaneMemoryInfoKHR.adoc[]
9536e5c31af7Sopenharmony_ciendif::VK_KHR_sampler_ycbcr_conversion[]
9537e5c31af7Sopenharmony_ci
9538e5c31af7Sopenharmony_ci  * pname:sType is a elink:VkStructureType value identifying this structure.
9539e5c31af7Sopenharmony_ci  * pname:pNext is `NULL` or a pointer to a structure extending this
9540e5c31af7Sopenharmony_ci    structure.
9541e5c31af7Sopenharmony_ci  * pname:planeAspect is a ename:VkImageAspectFlagBits value specifying the
9542e5c31af7Sopenharmony_ci    aspect of the disjoint image plane to bind.
9543e5c31af7Sopenharmony_ci
9544e5c31af7Sopenharmony_ci.Valid Usage
9545e5c31af7Sopenharmony_ci****
9546e5c31af7Sopenharmony_ci  * [[VUID-VkBindImagePlaneMemoryInfo-planeAspect-02283]]
9547e5c31af7Sopenharmony_ci    If the image's pname:tiling is ename:VK_IMAGE_TILING_LINEAR or
9548e5c31af7Sopenharmony_ci    ename:VK_IMAGE_TILING_OPTIMAL, then pname:planeAspect must: be a single
9549e5c31af7Sopenharmony_ci    valid <<formats-planes-image-aspect,multi-planar aspect mask>> bit
9550e5c31af7Sopenharmony_ciifdef::VK_EXT_image_drm_format_modifier[]
9551e5c31af7Sopenharmony_ci  * [[VUID-VkBindImagePlaneMemoryInfo-planeAspect-02284]]
9552e5c31af7Sopenharmony_ci    If the image's pname:tiling is
9553e5c31af7Sopenharmony_ci    ename:VK_IMAGE_TILING_DRM_FORMAT_MODIFIER_EXT, then pname:planeAspect
9554e5c31af7Sopenharmony_ci    must: be a single valid _memory plane_ for the image (that is,
9555e5c31af7Sopenharmony_ci    pname:aspectMask must: specify a plane index that is less than the
9556e5c31af7Sopenharmony_ci    slink:VkDrmFormatModifierPropertiesEXT::pname:drmFormatModifierPlaneCount
9557e5c31af7Sopenharmony_ci    associated with the image's pname:format and
9558e5c31af7Sopenharmony_ci    slink:VkImageDrmFormatModifierPropertiesEXT::pname:drmFormatModifier)
9559e5c31af7Sopenharmony_ciendif::VK_EXT_image_drm_format_modifier[]
9560e5c31af7Sopenharmony_ci****
9561e5c31af7Sopenharmony_ci
9562e5c31af7Sopenharmony_ciinclude::{generated}/validity/structs/VkBindImagePlaneMemoryInfo.adoc[]
9563e5c31af7Sopenharmony_ci--
9564e5c31af7Sopenharmony_ciendif::VK_VERSION_1_1,VK_KHR_sampler_ycbcr_conversion[]
9565e5c31af7Sopenharmony_ciendif::VK_VERSION_1_1,VK_KHR_bind_memory2[]
9566e5c31af7Sopenharmony_ci
9567e5c31af7Sopenharmony_ci
9568e5c31af7Sopenharmony_ci[[resources-bufferimagegranularity,Buffer-Image Granularity]]
9569e5c31af7Sopenharmony_ci.Buffer-Image Granularity
9570e5c31af7Sopenharmony_ciThe implementation-dependent limit <<limits-bufferImageGranularity,
9571e5c31af7Sopenharmony_cipname:bufferImageGranularity>> specifies a page-like granularity at which
9572e5c31af7Sopenharmony_cilinear and non-linear resources must: be placed in adjacent memory locations
9573e5c31af7Sopenharmony_cito avoid aliasing.
9574e5c31af7Sopenharmony_ciTwo resources which do not satisfy this granularity requirement are said to
9575e5c31af7Sopenharmony_ci<<resources-memory-aliasing,alias>>.
9576e5c31af7Sopenharmony_cipname:bufferImageGranularity is specified in bytes, and must: be a power of
9577e5c31af7Sopenharmony_citwo.
9578e5c31af7Sopenharmony_ciImplementations which do not impose a granularity restriction may: report a
9579e5c31af7Sopenharmony_cipname:bufferImageGranularity value of one.
9580e5c31af7Sopenharmony_ci
9581e5c31af7Sopenharmony_ci[NOTE]
9582e5c31af7Sopenharmony_ci.Note
9583e5c31af7Sopenharmony_ci====
9584e5c31af7Sopenharmony_ciDespite its name, pname:bufferImageGranularity is really a granularity
9585e5c31af7Sopenharmony_cibetween "`linear`" and "`non-linear`" resources.
9586e5c31af7Sopenharmony_ci====
9587e5c31af7Sopenharmony_ci
9588e5c31af7Sopenharmony_ciGiven resourceA at the lower memory offset and resourceB at the higher
9589e5c31af7Sopenharmony_cimemory offset in the same sname:VkDeviceMemory object, where one resource is
9590e5c31af7Sopenharmony_cilinear and the other is non-linear (as defined in the
9591e5c31af7Sopenharmony_ci<<glossary-linear-resource,Glossary>>), and the following:
9592e5c31af7Sopenharmony_ci
9593e5c31af7Sopenharmony_ci[source,c]
9594e5c31af7Sopenharmony_ci----
9595e5c31af7Sopenharmony_ciresourceA.end       = resourceA.memoryOffset + resourceA.size - 1
9596e5c31af7Sopenharmony_ciresourceA.endPage   = resourceA.end & ~(bufferImageGranularity-1)
9597e5c31af7Sopenharmony_ciresourceB.start     = resourceB.memoryOffset
9598e5c31af7Sopenharmony_ciresourceB.startPage = resourceB.start & ~(bufferImageGranularity-1)
9599e5c31af7Sopenharmony_ci----
9600e5c31af7Sopenharmony_ci
9601e5c31af7Sopenharmony_ciThe following property must: hold:
9602e5c31af7Sopenharmony_ci
9603e5c31af7Sopenharmony_ci[source,c]
9604e5c31af7Sopenharmony_ci----
9605e5c31af7Sopenharmony_ciresourceA.endPage < resourceB.startPage
9606e5c31af7Sopenharmony_ci----
9607e5c31af7Sopenharmony_ci
9608e5c31af7Sopenharmony_ciThat is, the end of the first resource (A) and the beginning of the second
9609e5c31af7Sopenharmony_ciresource (B) must: be on separate "`pages`" of size
9610e5c31af7Sopenharmony_cipname:bufferImageGranularity.
9611e5c31af7Sopenharmony_cipname:bufferImageGranularity may: be different than the physical page size
9612e5c31af7Sopenharmony_ciof the memory heap.
9613e5c31af7Sopenharmony_ciThis restriction is only needed when a linear resource and a non-linear
9614e5c31af7Sopenharmony_ciresource are adjacent in memory and will be used simultaneously.
9615e5c31af7Sopenharmony_ciThe memory ranges of adjacent resources can: be closer than
9616e5c31af7Sopenharmony_cipname:bufferImageGranularity, provided they meet the pname:alignment
9617e5c31af7Sopenharmony_cirequirement for the objects in question.
9618e5c31af7Sopenharmony_ci
9619e5c31af7Sopenharmony_ciSparse block size in bytes and sparse image and buffer memory alignments
9620e5c31af7Sopenharmony_cimust: all be multiples of the pname:bufferImageGranularity.
9621e5c31af7Sopenharmony_ciTherefore, memory bound to sparse resources naturally satisfies the
9622e5c31af7Sopenharmony_cipname:bufferImageGranularity.
9623e5c31af7Sopenharmony_ci
9624e5c31af7Sopenharmony_ci
9625e5c31af7Sopenharmony_ci[[resources-sharing]]
9626e5c31af7Sopenharmony_ci== Resource Sharing Mode
9627e5c31af7Sopenharmony_ci
9628e5c31af7Sopenharmony_ci[open,refpage='VkSharingMode',desc='Buffer and image sharing modes',type='enums']
9629e5c31af7Sopenharmony_ci--
9630e5c31af7Sopenharmony_ciBuffer and image objects are created with a _sharing mode_ controlling how
9631e5c31af7Sopenharmony_cithey can: be accessed from queues.
9632e5c31af7Sopenharmony_ciThe supported sharing modes are:
9633e5c31af7Sopenharmony_ci
9634e5c31af7Sopenharmony_ciinclude::{generated}/api/enums/VkSharingMode.adoc[]
9635e5c31af7Sopenharmony_ci
9636e5c31af7Sopenharmony_ci  * ename:VK_SHARING_MODE_EXCLUSIVE specifies that access to any range or
9637e5c31af7Sopenharmony_ci    image subresource of the object will be exclusive to a single queue
9638e5c31af7Sopenharmony_ci    family at a time.
9639e5c31af7Sopenharmony_ci  * ename:VK_SHARING_MODE_CONCURRENT specifies that concurrent access to any
9640e5c31af7Sopenharmony_ci    range or image subresource of the object from multiple queue families is
9641e5c31af7Sopenharmony_ci    supported.
9642e5c31af7Sopenharmony_ci
9643e5c31af7Sopenharmony_ci[NOTE]
9644e5c31af7Sopenharmony_ci.Note
9645e5c31af7Sopenharmony_ci====
9646e5c31af7Sopenharmony_ciename:VK_SHARING_MODE_CONCURRENT may: result in lower performance access to
9647e5c31af7Sopenharmony_cithe buffer or image than ename:VK_SHARING_MODE_EXCLUSIVE.
9648e5c31af7Sopenharmony_ci====
9649e5c31af7Sopenharmony_ci
9650e5c31af7Sopenharmony_ciRanges of buffers and image subresources of image objects created using
9651e5c31af7Sopenharmony_ciename:VK_SHARING_MODE_EXCLUSIVE must: only be accessed by queues in the
9652e5c31af7Sopenharmony_ciqueue family that has _ownership_ of the resource.
9653e5c31af7Sopenharmony_ciUpon creation, such resources are not owned by any queue family; ownership
9654e5c31af7Sopenharmony_ciis implicitly acquired upon first use within a queue.
9655e5c31af7Sopenharmony_ciOnce a resource using ename:VK_SHARING_MODE_EXCLUSIVE is owned by some queue
9656e5c31af7Sopenharmony_cifamily, the application must: perform a
9657e5c31af7Sopenharmony_ci<<synchronization-queue-transfers,queue family ownership transfer>> to make
9658e5c31af7Sopenharmony_cithe memory contents of a range or image subresource accessible to a
9659e5c31af7Sopenharmony_cidifferent queue family.
9660e5c31af7Sopenharmony_ci
9661e5c31af7Sopenharmony_ci[NOTE]
9662e5c31af7Sopenharmony_ci.Note
9663e5c31af7Sopenharmony_ci====
9664e5c31af7Sopenharmony_ciImages still require a <<resources-image-layouts, layout transition>> from
9665e5c31af7Sopenharmony_ciename:VK_IMAGE_LAYOUT_UNDEFINED or ename:VK_IMAGE_LAYOUT_PREINITIALIZED
9666e5c31af7Sopenharmony_cibefore being used on the first queue.
9667e5c31af7Sopenharmony_ci====
9668e5c31af7Sopenharmony_ci
9669e5c31af7Sopenharmony_ciA queue family can: take ownership of an image subresource or buffer range
9670e5c31af7Sopenharmony_ciof a resource created with ename:VK_SHARING_MODE_EXCLUSIVE, without an
9671e5c31af7Sopenharmony_ciownership transfer, in the same way as for a resource that was just created;
9672e5c31af7Sopenharmony_cihowever, taking ownership in this way has the effect that the contents of
9673e5c31af7Sopenharmony_cithe image subresource or buffer range are undefined:.
9674e5c31af7Sopenharmony_ci
9675e5c31af7Sopenharmony_ciRanges of buffers and image subresources of image objects created using
9676e5c31af7Sopenharmony_ciename:VK_SHARING_MODE_CONCURRENT must: only be accessed by queues from the
9677e5c31af7Sopenharmony_ciqueue families specified through the pname:queueFamilyIndexCount and
9678e5c31af7Sopenharmony_cipname:pQueueFamilyIndices members of the corresponding create info
9679e5c31af7Sopenharmony_cistructures.
9680e5c31af7Sopenharmony_ci--
9681e5c31af7Sopenharmony_ci
9682e5c31af7Sopenharmony_ci
9683e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_1,VK_KHR_external_memory[]
9684e5c31af7Sopenharmony_ci[[resources-external-sharing]]
9685e5c31af7Sopenharmony_ci=== External Resource Sharing
9686e5c31af7Sopenharmony_ci
9687e5c31af7Sopenharmony_ciResources should: only be accessed in the Vulkan instance that has exclusive
9688e5c31af7Sopenharmony_ciownership of their underlying memory.
9689e5c31af7Sopenharmony_ciOnly one Vulkan instance has exclusive ownership of a resource's underlying
9690e5c31af7Sopenharmony_cimemory at a given time, regardless of whether the resource was created using
9691e5c31af7Sopenharmony_ciename:VK_SHARING_MODE_EXCLUSIVE or ename:VK_SHARING_MODE_CONCURRENT.
9692e5c31af7Sopenharmony_ciApplications can transfer ownership of a resource's underlying memory only
9693e5c31af7Sopenharmony_ciif the memory has been imported from or exported to another instance or
9694e5c31af7Sopenharmony_ciexternal API using external memory handles.
9695e5c31af7Sopenharmony_ciThe semantics for transferring ownership outside of the instance are similar
9696e5c31af7Sopenharmony_cito those used for transferring ownership of ename:VK_SHARING_MODE_EXCLUSIVE
9697e5c31af7Sopenharmony_ciresources between queues, and is also accomplished using
9698e5c31af7Sopenharmony_cislink:VkBufferMemoryBarrier or slink:VkImageMemoryBarrier operations.
9699e5c31af7Sopenharmony_ciTo make the contents of the underlying memory accessible in the destination
9700e5c31af7Sopenharmony_ciinstance or API, applications must:
9701e5c31af7Sopenharmony_ci
9702e5c31af7Sopenharmony_ci  . Release exclusive ownership from the source instance or API.
9703e5c31af7Sopenharmony_ci  . Ensure the release operation has completed using semaphores or fences.
9704e5c31af7Sopenharmony_ci  . Acquire exclusive ownership in the destination instance or API
9705e5c31af7Sopenharmony_ci
9706e5c31af7Sopenharmony_ciUnlike queue ownership transfers, the destination instance or API is not
9707e5c31af7Sopenharmony_cispecified explicitly when releasing ownership, nor is the source instance or
9708e5c31af7Sopenharmony_ciAPI specified when acquiring ownership.
9709e5c31af7Sopenharmony_ciInstead, the image or memory barrier's pname:dstQueueFamilyIndex or
9710e5c31af7Sopenharmony_cipname:srcQueueFamilyIndex parameters are set to the reserved queue family
9711e5c31af7Sopenharmony_ciindex ename:VK_QUEUE_FAMILY_EXTERNAL
9712e5c31af7Sopenharmony_ciifdef::VK_EXT_queue_family_foreign[]
9713e5c31af7Sopenharmony_cior ename:VK_QUEUE_FAMILY_FOREIGN_EXT
9714e5c31af7Sopenharmony_ciendif::VK_EXT_queue_family_foreign[]
9715e5c31af7Sopenharmony_cito represent the external destination or source respectively.
9716e5c31af7Sopenharmony_ci
9717e5c31af7Sopenharmony_ciBinding a resource to a memory object shared between multiple Vulkan
9718e5c31af7Sopenharmony_ciinstances or other APIs does not change the ownership of the underlying
9719e5c31af7Sopenharmony_cimemory.
9720e5c31af7Sopenharmony_ciThe first entity to access the resource implicitly acquires ownership.
9721e5c31af7Sopenharmony_ciAn entity can: also implicitly take ownership from another entity in the
9722e5c31af7Sopenharmony_cisame way without an explicit ownership transfer.
9723e5c31af7Sopenharmony_ciHowever, taking ownership in this way has the effect that the contents of
9724e5c31af7Sopenharmony_cithe underlying memory are undefined:.
9725e5c31af7Sopenharmony_ci
9726e5c31af7Sopenharmony_ciAccessing a resource backed by memory that is owned by a particular instance
9727e5c31af7Sopenharmony_cior API has the same semantics as accessing a ename:VK_SHARING_MODE_EXCLUSIVE
9728e5c31af7Sopenharmony_ciresource, with one exception: Implementations must: ensure layout
9729e5c31af7Sopenharmony_citransitions performed on one member of a set of identical subresources of
9730e5c31af7Sopenharmony_ciidentical images that alias the same range of an underlying memory object
9731e5c31af7Sopenharmony_ciaffect the layout of all the subresources in the set.
9732e5c31af7Sopenharmony_ci
9733e5c31af7Sopenharmony_ciAs a corollary, writes to any image subresources in such a set must: not
9734e5c31af7Sopenharmony_cimake the contents of memory used by other subresources in the set
9735e5c31af7Sopenharmony_ciundefined:.
9736e5c31af7Sopenharmony_ciAn application can: define the content of a subresource of one image by
9737e5c31af7Sopenharmony_ciperforming device writes to an identical subresource of another image
9738e5c31af7Sopenharmony_ciprovided both images are bound to the same region of external memory.
9739e5c31af7Sopenharmony_ciApplications may: also add resources to such a set after the content of the
9740e5c31af7Sopenharmony_ciexisting set members has been defined without making the content undefined:
9741e5c31af7Sopenharmony_ciby creating a new image with the initial layout
9742e5c31af7Sopenharmony_ciename:VK_IMAGE_LAYOUT_UNDEFINED and binding it to the same region of
9743e5c31af7Sopenharmony_ciexternal memory as the existing images.
9744e5c31af7Sopenharmony_ci
9745e5c31af7Sopenharmony_ci[NOTE]
9746e5c31af7Sopenharmony_ci.Note
9747e5c31af7Sopenharmony_ci====
9748e5c31af7Sopenharmony_ciBecause layout transitions apply to all identical images aliasing the same
9749e5c31af7Sopenharmony_ciregion of external memory, the actual layout of the memory backing a new
9750e5c31af7Sopenharmony_ciimage as well as an existing image with defined content will not be
9751e5c31af7Sopenharmony_ciundefined:.
9752e5c31af7Sopenharmony_ciSuch an image is not usable until it acquires ownership of its memory from
9753e5c31af7Sopenharmony_cithe existing owner.
9754e5c31af7Sopenharmony_ciTherefore, the layout specified as part of this transition will be the true
9755e5c31af7Sopenharmony_ciinitial layout of the image.
9756e5c31af7Sopenharmony_ciThe undefined: layout specified when creating it is a placeholder to
9757e5c31af7Sopenharmony_cisimplify valid usage requirements.
9758e5c31af7Sopenharmony_ci====
9759e5c31af7Sopenharmony_ciendif::VK_VERSION_1_1,VK_KHR_external_memory[]
9760e5c31af7Sopenharmony_ci
9761e5c31af7Sopenharmony_ci
9762e5c31af7Sopenharmony_ci[[resources-memory-aliasing]]
9763e5c31af7Sopenharmony_ci== Memory Aliasing
9764e5c31af7Sopenharmony_ci
9765e5c31af7Sopenharmony_ciA range of a sname:VkDeviceMemory allocation is _aliased_ if it is bound to
9766e5c31af7Sopenharmony_cimultiple resources simultaneously, as described below, via
9767e5c31af7Sopenharmony_ciflink:vkBindImageMemory, flink:vkBindBufferMemory,
9768e5c31af7Sopenharmony_ciifdef::VK_NV_ray_tracing[]
9769e5c31af7Sopenharmony_ciflink:vkBindAccelerationStructureMemoryNV,
9770e5c31af7Sopenharmony_ciendif::VK_NV_ray_tracing[]
9771e5c31af7Sopenharmony_ciifndef::VK_VERSION_1_1,VK_KHR_external_memory[]
9772e5c31af7Sopenharmony_cior via <<sparsememory-resource-binding,sparse memory bindings>>.
9773e5c31af7Sopenharmony_ciendif::VK_VERSION_1_1,VK_KHR_external_memory[]
9774e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_1,VK_KHR_external_memory[]
9775e5c31af7Sopenharmony_ciifndef::VKSC_VERSION_1_0[via <<sparsememory-resource-binding,sparse memory bindings>>,]
9776e5c31af7Sopenharmony_cior by binding the memory to resources in multiple Vulkan instances or
9777e5c31af7Sopenharmony_ciexternal APIs using external memory handle export and import mechanisms.
9778e5c31af7Sopenharmony_ciendif::VK_VERSION_1_1,VK_KHR_external_memory[]
9779e5c31af7Sopenharmony_ci
9780e5c31af7Sopenharmony_ciConsider two resources, resource~A~ and resource~B~, bound respectively to
9781e5c31af7Sopenharmony_cimemory range~A~ and range~B~.
9782e5c31af7Sopenharmony_ciLet paddedRange~A~ and paddedRange~B~ be, respectively, range~A~ and
9783e5c31af7Sopenharmony_cirange~B~ aligned to pname:bufferImageGranularity.
9784e5c31af7Sopenharmony_ciIf the resources are both linear or both non-linear (as defined in the
9785e5c31af7Sopenharmony_ci<<glossary-linear-resource,Glossary>>), then the resources _alias_ the
9786e5c31af7Sopenharmony_cimemory in the intersection of range~A~ and range~B~.
9787e5c31af7Sopenharmony_ciIf one resource is linear and the other is non-linear, then the resources
9788e5c31af7Sopenharmony_ci_alias_ the memory in the intersection of paddedRange~A~ and paddedRange~B~.
9789e5c31af7Sopenharmony_ci
9790e5c31af7Sopenharmony_ciApplications can: alias memory, but use of multiple aliases is subject to
9791e5c31af7Sopenharmony_ciseveral constraints.
9792e5c31af7Sopenharmony_ci
9793e5c31af7Sopenharmony_ci[NOTE]
9794e5c31af7Sopenharmony_ci.Note
9795e5c31af7Sopenharmony_ci====
9796e5c31af7Sopenharmony_ciMemory aliasing can: be useful to reduce the total device memory footprint
9797e5c31af7Sopenharmony_ciof an application, if some large resources are used for disjoint periods of
9798e5c31af7Sopenharmony_citime.
9799e5c31af7Sopenharmony_ci====
9800e5c31af7Sopenharmony_ci
9801e5c31af7Sopenharmony_ciWhen a <<glossary-linear-resource,non-linear>>,
9802e5c31af7Sopenharmony_cinon-ename:VK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT image is bound to an aliased
9803e5c31af7Sopenharmony_cirange, all image subresources of the image _overlap_ the range.
9804e5c31af7Sopenharmony_ciWhen a linear image is bound to an aliased range, the image subresources
9805e5c31af7Sopenharmony_cithat (according to the image's advertised layout) include bytes from the
9806e5c31af7Sopenharmony_cialiased range overlap the range.
9807e5c31af7Sopenharmony_ciWhen a ename:VK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT image has sparse image
9808e5c31af7Sopenharmony_ciblocks bound to an aliased range, only image subresources including those
9809e5c31af7Sopenharmony_cisparse image blocks overlap the range, and when the memory bound to the
9810e5c31af7Sopenharmony_ciimage's mip tail overlaps an aliased range all image subresources in the mip
9811e5c31af7Sopenharmony_citail overlap the range.
9812e5c31af7Sopenharmony_ci
9813e5c31af7Sopenharmony_ciBuffers, and linear image subresources in either the
9814e5c31af7Sopenharmony_ciename:VK_IMAGE_LAYOUT_PREINITIALIZED or ename:VK_IMAGE_LAYOUT_GENERAL
9815e5c31af7Sopenharmony_cilayouts, are _host-accessible subresources_.
9816e5c31af7Sopenharmony_ciThat is, the host has a well-defined addressing scheme to interpret the
9817e5c31af7Sopenharmony_cicontents, and thus the layout of the data in memory can: be consistently
9818e5c31af7Sopenharmony_ciinterpreted across aliases if each of those aliases is a host-accessible
9819e5c31af7Sopenharmony_cisubresource.
9820e5c31af7Sopenharmony_ciNon-linear images, and linear image subresources in other layouts, are not
9821e5c31af7Sopenharmony_cihost-accessible.
9822e5c31af7Sopenharmony_ci
9823e5c31af7Sopenharmony_ciIf two aliases are both host-accessible, then they interpret the contents of
9824e5c31af7Sopenharmony_cithe memory in consistent ways, and data written to one alias can: be read by
9825e5c31af7Sopenharmony_cithe other alias.
9826e5c31af7Sopenharmony_ci
9827e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_1,VK_KHR_bind_memory2[]
9828e5c31af7Sopenharmony_ci[[resources-memory-aliasing-consistency]]
9829e5c31af7Sopenharmony_ciIf two aliases are both images that were created with identical creation
9830e5c31af7Sopenharmony_ciparameters, both were created with the ename:VK_IMAGE_CREATE_ALIAS_BIT flag
9831e5c31af7Sopenharmony_ciset, and both are bound identically to memory
9832e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_1,VK_KHR_device_group[]
9833e5c31af7Sopenharmony_ciexcept for slink:VkBindImageMemoryDeviceGroupInfo::pname:pDeviceIndices and
9834e5c31af7Sopenharmony_cislink:VkBindImageMemoryDeviceGroupInfo::pname:pSplitInstanceBindRegions,
9835e5c31af7Sopenharmony_ciendif::VK_VERSION_1_1,VK_KHR_device_group[]
9836e5c31af7Sopenharmony_cithen they interpret the contents of the memory in consistent ways, and data
9837e5c31af7Sopenharmony_ciwritten to one alias can: be read by the other alias.
9838e5c31af7Sopenharmony_ci
9839e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_1,VK_KHR_sampler_ycbcr_conversion[]
9840e5c31af7Sopenharmony_ci[[resources-memory-aliasing-consistency-planes]]
9841e5c31af7Sopenharmony_ciAdditionally, if an individual plane of a multi-planar image and a
9842e5c31af7Sopenharmony_cisingle-plane image alias the same memory, then they also interpret the
9843e5c31af7Sopenharmony_cicontents of the memory in consistent ways under the same conditions, but
9844e5c31af7Sopenharmony_ciwith the following modifications:
9845e5c31af7Sopenharmony_ci
9846e5c31af7Sopenharmony_ci  * Both must: have been created with the ename:VK_IMAGE_CREATE_DISJOINT_BIT
9847e5c31af7Sopenharmony_ci    flag.
9848e5c31af7Sopenharmony_ci  * The single-plane image must: have a elink:VkFormat that is
9849e5c31af7Sopenharmony_ci    <<formats-compatible-planes,equivalent>> to that of the multi-planar
9850e5c31af7Sopenharmony_ci    image's individual plane.
9851e5c31af7Sopenharmony_ci  * The single-plane image and the individual plane of the multi-planar
9852e5c31af7Sopenharmony_ci    image must: be bound identically to memory
9853e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_1,VK_KHR_device_group[]
9854e5c31af7Sopenharmony_ci    except for slink:VkBindImageMemoryDeviceGroupInfo::pname:pDeviceIndices
9855e5c31af7Sopenharmony_ci    and
9856e5c31af7Sopenharmony_ci    slink:VkBindImageMemoryDeviceGroupInfo::pname:pSplitInstanceBindRegions.
9857e5c31af7Sopenharmony_ciendif::VK_VERSION_1_1,VK_KHR_device_group[]
9858e5c31af7Sopenharmony_ci  * The pname:width and pname:height of the single-plane image are derived
9859e5c31af7Sopenharmony_ci    from the multi-planar image's dimensions in the manner listed for
9860e5c31af7Sopenharmony_ci    <<formats-compatible-planes,plane compatibility>> for the aliased plane.
9861e5c31af7Sopenharmony_ciifdef::VK_EXT_image_drm_format_modifier[]
9862e5c31af7Sopenharmony_ci  * If either image's pname:tiling is
9863e5c31af7Sopenharmony_ci    ename:VK_IMAGE_TILING_DRM_FORMAT_MODIFIER_EXT, then both images must: be
9864e5c31af7Sopenharmony_ci    <<glossary-linear-resource,linear>>.
9865e5c31af7Sopenharmony_ciendif::VK_EXT_image_drm_format_modifier[]
9866e5c31af7Sopenharmony_ci  * All other creation parameters must: be identical
9867e5c31af7Sopenharmony_ci
9868e5c31af7Sopenharmony_ciendif::VK_VERSION_1_1,VK_KHR_sampler_ycbcr_conversion[]
9869e5c31af7Sopenharmony_ciendif::VK_VERSION_1_1,VK_KHR_bind_memory2[]
9870e5c31af7Sopenharmony_ci
9871e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_1,VK_KHR_external_memory[]
9872e5c31af7Sopenharmony_ciAliases created by binding the same memory to resources in multiple Vulkan
9873e5c31af7Sopenharmony_ciinstances or external APIs using external memory handle export and import
9874e5c31af7Sopenharmony_cimechanisms interpret the contents of the memory in consistent ways, and data
9875e5c31af7Sopenharmony_ciwritten to one alias can: be read by the other alias.
9876e5c31af7Sopenharmony_ciendif::VK_VERSION_1_1,VK_KHR_external_memory[]
9877e5c31af7Sopenharmony_ci
9878e5c31af7Sopenharmony_ciOtherwise, the aliases interpret the contents of the memory differently, and
9879e5c31af7Sopenharmony_ciwrites via one alias make the contents of memory partially or completely
9880e5c31af7Sopenharmony_ciundefined: to the other alias.
9881e5c31af7Sopenharmony_ciIf the first alias is a host-accessible subresource, then the bytes affected
9882e5c31af7Sopenharmony_ciare those written by the memory operations according to its addressing
9883e5c31af7Sopenharmony_cischeme.
9884e5c31af7Sopenharmony_ciIf the first alias is not host-accessible, then the bytes affected are those
9885e5c31af7Sopenharmony_cioverlapped by the image subresources that were written.
9886e5c31af7Sopenharmony_ciIf the second alias is a host-accessible subresource, the affected bytes
9887e5c31af7Sopenharmony_cibecome undefined:.
9888e5c31af7Sopenharmony_ciIf the second alias is not host-accessible, all sparse image blocks (for
9889e5c31af7Sopenharmony_cisparse partially-resident images) or all image subresources (for non-sparse
9890e5c31af7Sopenharmony_ciimage and fully resident sparse images) that overlap the affected bytes
9891e5c31af7Sopenharmony_cibecome undefined:.
9892e5c31af7Sopenharmony_ci
9893e5c31af7Sopenharmony_ciIf any image subresources are made undefined: due to writes to an alias,
9894e5c31af7Sopenharmony_cithen each of those image subresources must: have its layout transitioned
9895e5c31af7Sopenharmony_cifrom ename:VK_IMAGE_LAYOUT_UNDEFINED to a valid layout before it is used, or
9896e5c31af7Sopenharmony_cifrom ename:VK_IMAGE_LAYOUT_PREINITIALIZED if the memory has been written by
9897e5c31af7Sopenharmony_cithe host.
9898e5c31af7Sopenharmony_ciIf any sparse blocks of a sparse image have been made undefined:, then only
9899e5c31af7Sopenharmony_cithe image subresources containing them must: be transitioned.
9900e5c31af7Sopenharmony_ci
9901e5c31af7Sopenharmony_ciUse of an overlapping range by two aliases must: be separated by a memory
9902e5c31af7Sopenharmony_cidependency using the appropriate <<synchronization-access-types, access
9903e5c31af7Sopenharmony_citypes>> if at least one of those uses performs writes, whether the aliases
9904e5c31af7Sopenharmony_ciinterpret memory consistently or not.
9905e5c31af7Sopenharmony_ciIf buffer or image memory barriers are used, the scope of the barrier must:
9906e5c31af7Sopenharmony_cicontain the entire range and/or set of image subresources that overlap.
9907e5c31af7Sopenharmony_ci
9908e5c31af7Sopenharmony_ciIf two aliasing image views are used in the same framebuffer, then the
9909e5c31af7Sopenharmony_cirender pass must: declare the attachments using the
9910e5c31af7Sopenharmony_ci<<renderpass-aliasing,ename:VK_ATTACHMENT_DESCRIPTION_MAY_ALIAS_BIT>>, and
9911e5c31af7Sopenharmony_cifollow the other rules listed in that section.
9912e5c31af7Sopenharmony_ci
9913e5c31af7Sopenharmony_ci[NOTE]
9914e5c31af7Sopenharmony_ci.Note
9915e5c31af7Sopenharmony_ci====
9916e5c31af7Sopenharmony_ciMemory recycled via an application suballocator (i.e. without freeing and
9917e5c31af7Sopenharmony_cireallocating the memory objects) is not substantially different from memory
9918e5c31af7Sopenharmony_cialiasing.
9919e5c31af7Sopenharmony_ciHowever, a suballocator usually waits on a fence before recycling a region
9920e5c31af7Sopenharmony_ciof memory, and signaling a fence involves sufficient implicit dependencies
9921e5c31af7Sopenharmony_cito satisfy all the above requirements.
9922e5c31af7Sopenharmony_ci====
9923e5c31af7Sopenharmony_ci
9924e5c31af7Sopenharmony_ci[[resources-memory-overlap]]
9925e5c31af7Sopenharmony_ci=== Resource Memory Overlap
9926e5c31af7Sopenharmony_ci
9927e5c31af7Sopenharmony_ciApplications can: safely access a resource concurrently as long as the
9928e5c31af7Sopenharmony_cimemory locations do not overlap as defined in
9929e5c31af7Sopenharmony_ci<<memory-model-memory-location,Memory Location>>.
9930e5c31af7Sopenharmony_ciThis includes aliased resources if such aliasing is well-defined.
9931e5c31af7Sopenharmony_ciIt also includes access from different queues and/or queue families if such
9932e5c31af7Sopenharmony_ciconcurrent access is supported by the resource.
9933e5c31af7Sopenharmony_ciTransfer commands only access memory locations specified by the range of the
9934e5c31af7Sopenharmony_citransfer command.
9935e5c31af7Sopenharmony_ci
9936e5c31af7Sopenharmony_ci[NOTE]
9937e5c31af7Sopenharmony_ci.Note
9938e5c31af7Sopenharmony_ci====
9939e5c31af7Sopenharmony_ciThe intent is that buffers (or linear images) can be accessed concurrently,
9940e5c31af7Sopenharmony_cieven when they share cache lines, but otherwise do not access the same
9941e5c31af7Sopenharmony_cimemory range.
9942e5c31af7Sopenharmony_ciThe concept of a device cache line size is not exposed in the memory model.
9943e5c31af7Sopenharmony_ci====
9944e5c31af7Sopenharmony_ci
9945e5c31af7Sopenharmony_ciifdef::VK_FUCHSIA_buffer_collection[]
9946e5c31af7Sopenharmony_ci[[resources-buffer-collection-fuchsia]]
9947e5c31af7Sopenharmony_ci== Buffer Collections
9948e5c31af7Sopenharmony_ci
9949e5c31af7Sopenharmony_ci[open,refpage='VkBufferCollectionFUCHSIA',desc='Opaque handle to a buffer collection object',type='handles']
9950e5c31af7Sopenharmony_ci--
9951e5c31af7Sopenharmony_ciFuchsia's FIDL-based Sysmem service interoperates with Vulkan via the
9952e5c31af7Sopenharmony_ci`apiext:VK_FUCHSIA_buffer_collection` extension.
9953e5c31af7Sopenharmony_ci
9954e5c31af7Sopenharmony_ciA buffer collection is a set of one or more buffers which were allocated
9955e5c31af7Sopenharmony_citogether as a group and which all have the same properties.
9956e5c31af7Sopenharmony_ciThese properties describe the buffers' internal representation, such as its
9957e5c31af7Sopenharmony_cidimensions and memory layout.
9958e5c31af7Sopenharmony_ciThis ensures that all of the buffers can be used interchangeably by tasks
9959e5c31af7Sopenharmony_cithat require swapping among multiple buffers, such as double-buffered
9960e5c31af7Sopenharmony_cigraphics rendering.
9961e5c31af7Sopenharmony_ci
9962e5c31af7Sopenharmony_ciOn Fuchsia, the Sysmem service uses buffer collections as a core construct
9963e5c31af7Sopenharmony_ciin its design.
9964e5c31af7Sopenharmony_ci
9965e5c31af7Sopenharmony_ciBuffer collections are represented by sname:VkBufferCollectionFUCHSIA
9966e5c31af7Sopenharmony_cihandles:
9967e5c31af7Sopenharmony_ci
9968e5c31af7Sopenharmony_ciinclude::{generated}/api/handles/VkBufferCollectionFUCHSIA.adoc[]
9969e5c31af7Sopenharmony_ci--
9970e5c31af7Sopenharmony_ci
9971e5c31af7Sopenharmony_ci
9972e5c31af7Sopenharmony_ci=== Definitions
9973e5c31af7Sopenharmony_ci
9974e5c31af7Sopenharmony_ci  * FIDL - Fuchsia Interface Definition Language.
9975e5c31af7Sopenharmony_ci    The declarative language used to define FIDL interprocess communication
9976e5c31af7Sopenharmony_ci    interfaces on Fuchsia.
9977e5c31af7Sopenharmony_ci    FIDL files use the `fidl` extension.
9978e5c31af7Sopenharmony_ci    FIDL is also used to refer to the services defined by interfaces
9979e5c31af7Sopenharmony_ci    declared in the FIDL language
9980e5c31af7Sopenharmony_ci  * Sysmem - The FIDL service that facilitates optimal buffer sharing and
9981e5c31af7Sopenharmony_ci    reuse on Fuchsia
9982e5c31af7Sopenharmony_ci  * client - Any participant of the buffer collection e.g. the Vulkan
9983e5c31af7Sopenharmony_ci    application
9984e5c31af7Sopenharmony_ci  * token - A code:zx_handle_t Zircon channel object that allows
9985e5c31af7Sopenharmony_ci    participation in the buffer collection
9986e5c31af7Sopenharmony_ci
9987e5c31af7Sopenharmony_ci
9988e5c31af7Sopenharmony_ci=== Platform Initialization for Buffer Collections
9989e5c31af7Sopenharmony_ciTo initialize a buffer collection on Fuchsia:
9990e5c31af7Sopenharmony_ci
9991e5c31af7Sopenharmony_ci  * Connect to the Sysmem service to initialize a Sysmem allocator
9992e5c31af7Sopenharmony_ci  * Create an initial buffer collection token using the Sysmem allocator
9993e5c31af7Sopenharmony_ci  * Duplicate the token for each participant beyond the initiator
9994e5c31af7Sopenharmony_ci  * See the Sysmem Overview and fuchsia.sysmem FIDL documentation on
9995e5c31af7Sopenharmony_ci    fuchsia.dev for more detailed information
9996e5c31af7Sopenharmony_ci
9997e5c31af7Sopenharmony_ci
9998e5c31af7Sopenharmony_ci=== Create the Buffer Collection
9999e5c31af7Sopenharmony_ci
10000e5c31af7Sopenharmony_ci[open,refpage='vkCreateBufferCollectionFUCHSIA',desc='Create a new buffer collection',type='protos']
10001e5c31af7Sopenharmony_ci--
10002e5c31af7Sopenharmony_ciTo create an slink:VkBufferCollectionFUCHSIA for Vulkan to participate in
10003e5c31af7Sopenharmony_cithe buffer collection:
10004e5c31af7Sopenharmony_ci
10005e5c31af7Sopenharmony_ciinclude::{generated}/api/protos/vkCreateBufferCollectionFUCHSIA.adoc[]
10006e5c31af7Sopenharmony_ci
10007e5c31af7Sopenharmony_ci  * pname:device is the logical device that creates the
10008e5c31af7Sopenharmony_ci    sname:VkBufferCollectionFUCHSIA
10009e5c31af7Sopenharmony_ci  * pname:pCreateInfo is a pointer to a
10010e5c31af7Sopenharmony_ci    slink:VkBufferCollectionCreateInfoFUCHSIA structure containing
10011e5c31af7Sopenharmony_ci    parameters affecting creation of the buffer collection
10012e5c31af7Sopenharmony_ci  * pname:pAllocator is a pointer to a slink:VkAllocationCallbacks structure
10013e5c31af7Sopenharmony_ci    controlling host memory allocation as described in the
10014e5c31af7Sopenharmony_ci    <<memory-allocation, Memory Allocation>> chapter
10015e5c31af7Sopenharmony_ci  * pname:pBufferCollection is a pointer to a
10016e5c31af7Sopenharmony_ci    slink:VkBufferCollectionFUCHSIA handle in which the resulting buffer
10017e5c31af7Sopenharmony_ci    collection object is returned
10018e5c31af7Sopenharmony_ci
10019e5c31af7Sopenharmony_ciinclude::{generated}/validity/protos/vkCreateBufferCollectionFUCHSIA.adoc[]
10020e5c31af7Sopenharmony_ci
10021e5c31af7Sopenharmony_ci.Host Access
10022e5c31af7Sopenharmony_ci****
10023e5c31af7Sopenharmony_ciAll functions referencing a slink:VkBufferCollectionFUCHSIA must: be
10024e5c31af7Sopenharmony_ciexternally synchronized with the exception of
10025e5c31af7Sopenharmony_cifname:vkCreateBufferCollectionFUCHSIA.
10026e5c31af7Sopenharmony_ci****
10027e5c31af7Sopenharmony_ci--
10028e5c31af7Sopenharmony_ci
10029e5c31af7Sopenharmony_ci
10030e5c31af7Sopenharmony_ci[open,refpage='VkBufferCollectionCreateInfoFUCHSIA',desc='Structure specifying desired parameters to create the buffer collection',type='structs']
10031e5c31af7Sopenharmony_ci--
10032e5c31af7Sopenharmony_ciThe sname:VkBufferCollectionCreateInfoFUCHSIA structure is defined as:
10033e5c31af7Sopenharmony_ci
10034e5c31af7Sopenharmony_ciinclude::{generated}/api/structs/VkBufferCollectionCreateInfoFUCHSIA.adoc[]
10035e5c31af7Sopenharmony_ci
10036e5c31af7Sopenharmony_ci  * pname:sType is a elink:VkStructureType value identifying this structure.
10037e5c31af7Sopenharmony_ci  * pname:pNext is `NULL` or a pointer to a structure extending this
10038e5c31af7Sopenharmony_ci    structure
10039e5c31af7Sopenharmony_ci  * pname:collectionToken is a fname:zx_handle_t containing the Sysmem
10040e5c31af7Sopenharmony_ci    client's buffer collection token
10041e5c31af7Sopenharmony_ci
10042e5c31af7Sopenharmony_ci.Valid Usage
10043e5c31af7Sopenharmony_ci****
10044e5c31af7Sopenharmony_ci  * [[VUID-VkBufferCollectionCreateInfoFUCHSIA-collectionToken-06393]]
10045e5c31af7Sopenharmony_ci    pname:collectionToken must: be a valid code:zx_handle_t to a Zircon
10046e5c31af7Sopenharmony_ci    channel allocated from Sysmem
10047e5c31af7Sopenharmony_ci    (code:fuchsia.sysmem.Allocator/AllocateSharedCollection) with
10048e5c31af7Sopenharmony_ci    code:ZX_DEFAULT_CHANNEL_RIGHTS rights
10049e5c31af7Sopenharmony_ci****
10050e5c31af7Sopenharmony_ci
10051e5c31af7Sopenharmony_ciinclude::{generated}/validity/structs/VkBufferCollectionCreateInfoFUCHSIA.adoc[]
10052e5c31af7Sopenharmony_ci--
10053e5c31af7Sopenharmony_ci
10054e5c31af7Sopenharmony_ci
10055e5c31af7Sopenharmony_ci=== Set the Constraints
10056e5c31af7Sopenharmony_ciBuffer collections can be established for slink:VkImage allocations or
10057e5c31af7Sopenharmony_cislink:VkBuffer allocations.
10058e5c31af7Sopenharmony_ci
10059e5c31af7Sopenharmony_ci
10060e5c31af7Sopenharmony_ci==== Set Image-based Buffer Collection Constraints
10061e5c31af7Sopenharmony_ci
10062e5c31af7Sopenharmony_ci[open,refpage='vkSetBufferCollectionImageConstraintsFUCHSIA',desc='Set image-based constraints for a buffer collection',type='protos']
10063e5c31af7Sopenharmony_ci--
10064e5c31af7Sopenharmony_ciSetting the constraints on the buffer collection initiates the format
10065e5c31af7Sopenharmony_cinegotiation and allocation of the buffer collection.
10066e5c31af7Sopenharmony_ciTo set the constraints on a slink:VkImage buffer collection, call:
10067e5c31af7Sopenharmony_ci
10068e5c31af7Sopenharmony_ciinclude::{generated}/api/protos/vkSetBufferCollectionImageConstraintsFUCHSIA.adoc[]
10069e5c31af7Sopenharmony_ci
10070e5c31af7Sopenharmony_ci  * pname:device is the logical device
10071e5c31af7Sopenharmony_ci  * pname:collection is the slink:VkBufferCollectionFUCHSIA handle
10072e5c31af7Sopenharmony_ci  * pname:pImageConstraintsInfo is a pointer to a
10073e5c31af7Sopenharmony_ci    slink:VkImageConstraintsInfoFUCHSIA structure
10074e5c31af7Sopenharmony_ci
10075e5c31af7Sopenharmony_cifname:vkSetBufferCollectionImageConstraintsFUCHSIA may: fail if
10076e5c31af7Sopenharmony_cipname:pImageConstraintsInfo->formatConstraintsCount is larger than the
10077e5c31af7Sopenharmony_ciimplementation-defined limit.
10078e5c31af7Sopenharmony_ciIf that occurs, flink:vkSetBufferCollectionImageConstraintsFUCHSIA will
10079e5c31af7Sopenharmony_cireturn ename:VK_ERROR_INITIALIZATION_FAILED.
10080e5c31af7Sopenharmony_ci
10081e5c31af7Sopenharmony_cifname:vkSetBufferCollectionImageConstraintsFUCHSIA may: fail if the
10082e5c31af7Sopenharmony_ciimplementation does not support any of the formats described by the
10083e5c31af7Sopenharmony_cipname:pImageConstraintsInfo structure.
10084e5c31af7Sopenharmony_ciIf that occurs, flink:vkSetBufferCollectionImageConstraintsFUCHSIA will
10085e5c31af7Sopenharmony_cireturn ename:VK_ERROR_FORMAT_NOT_SUPPORTED.
10086e5c31af7Sopenharmony_ci
10087e5c31af7Sopenharmony_ci.Valid Usage
10088e5c31af7Sopenharmony_ci****
10089e5c31af7Sopenharmony_ci  * [[VUID-vkSetBufferCollectionImageConstraintsFUCHSIA-collection-06394]]
10090e5c31af7Sopenharmony_ci    fname:vkSetBufferCollectionImageConstraintsFUCHSIA or
10091e5c31af7Sopenharmony_ci    fname:vkSetBufferCollectionBufferConstraintsFUCHSIA must: not have
10092e5c31af7Sopenharmony_ci    already been called on pname:collection
10093e5c31af7Sopenharmony_ci****
10094e5c31af7Sopenharmony_ci
10095e5c31af7Sopenharmony_ciinclude::{generated}/validity/protos/vkSetBufferCollectionImageConstraintsFUCHSIA.adoc[]
10096e5c31af7Sopenharmony_ci--
10097e5c31af7Sopenharmony_ci
10098e5c31af7Sopenharmony_ci[open,refpage='VkImageConstraintsInfoFUCHSIA',desc='Structure of image-based buffer collection constraints',type='structs']
10099e5c31af7Sopenharmony_ci--
10100e5c31af7Sopenharmony_ciThe sname:VkImageConstraintsInfoFUCHSIA structure is defined as:
10101e5c31af7Sopenharmony_ci
10102e5c31af7Sopenharmony_ciinclude::{generated}/api/structs/VkImageConstraintsInfoFUCHSIA.adoc[]
10103e5c31af7Sopenharmony_ci
10104e5c31af7Sopenharmony_ci  * pname:sType is a elink:VkStructureType value identifying this structure.
10105e5c31af7Sopenharmony_ci  * pname:pNext is `NULL` or a pointer to a structure extending this
10106e5c31af7Sopenharmony_ci    structure.
10107e5c31af7Sopenharmony_ci  * pname:formatConstraintsCount is the number of elements in
10108e5c31af7Sopenharmony_ci    pname:pFormatConstraints.
10109e5c31af7Sopenharmony_ci  * pname:pFormatConstraints is a pointer to an array of
10110e5c31af7Sopenharmony_ci    slink:VkImageFormatConstraintsInfoFUCHSIA structures of size
10111e5c31af7Sopenharmony_ci    pname:formatConstraintsCount that is used to further constrain buffer
10112e5c31af7Sopenharmony_ci    collection format selection for image-based buffer collections.
10113e5c31af7Sopenharmony_ci  * pname:bufferCollectionConstraints is a
10114e5c31af7Sopenharmony_ci    slink:VkBufferCollectionConstraintsInfoFUCHSIA structure used to supply
10115e5c31af7Sopenharmony_ci    parameters for the negotiation and allocation for buffer-based buffer
10116e5c31af7Sopenharmony_ci    collections.
10117e5c31af7Sopenharmony_ci  * pname:flags is a elink:VkImageConstraintsInfoFlagBitsFUCHSIA value
10118e5c31af7Sopenharmony_ci    specifying hints about the type of memory Sysmem should allocate for the
10119e5c31af7Sopenharmony_ci    buffer collection.
10120e5c31af7Sopenharmony_ci
10121e5c31af7Sopenharmony_ci.Valid Usage
10122e5c31af7Sopenharmony_ci****
10123e5c31af7Sopenharmony_ci  * [[VUID-VkImageConstraintsInfoFUCHSIA-pFormatConstraints-06395]]
10124e5c31af7Sopenharmony_ci    All elements of pname:pFormatConstraints must: have at least one bit set
10125e5c31af7Sopenharmony_ci    in its
10126e5c31af7Sopenharmony_ci    slink:VkImageFormatConstraintsInfoFUCHSIA::pname:requiredFormatFeatures
10127e5c31af7Sopenharmony_ci  * [[VUID-VkImageConstraintsInfoFUCHSIA-pFormatConstraints-06396]]
10128e5c31af7Sopenharmony_ci    If pname:pFormatConstraints->imageCreateInfo->usage contains
10129e5c31af7Sopenharmony_ci    ename:VK_IMAGE_USAGE_SAMPLED_BIT, then
10130e5c31af7Sopenharmony_ci    pname:pFormatConstraints->requiredFormatFeatures must: contain
10131e5c31af7Sopenharmony_ci    ename:VK_FORMAT_FEATURE_SAMPLED_IMAGE_BIT
10132e5c31af7Sopenharmony_ci  * [[VUID-VkImageConstraintsInfoFUCHSIA-pFormatConstraints-06397]]
10133e5c31af7Sopenharmony_ci    If pname:pFormatConstraints->imageCreateInfo->usage contains
10134e5c31af7Sopenharmony_ci    ename:VK_IMAGE_USAGE_STORAGE_BIT, then
10135e5c31af7Sopenharmony_ci    pname:pFormatConstraints->requiredFormatFeatures must: contain
10136e5c31af7Sopenharmony_ci    ename:VK_FORMAT_FEATURE_STORAGE_IMAGE_BIT
10137e5c31af7Sopenharmony_ci  * [[VUID-VkImageConstraintsInfoFUCHSIA-pFormatConstraints-06398]]
10138e5c31af7Sopenharmony_ci    If pname:pFormatConstraints->imageCreateInfo->usage contains
10139e5c31af7Sopenharmony_ci    ename:VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT, then
10140e5c31af7Sopenharmony_ci    pname:pFormatConstraints->requiredFormatFeatures must: contain
10141e5c31af7Sopenharmony_ci    ename:VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BIT
10142e5c31af7Sopenharmony_ci  * [[VUID-VkImageConstraintsInfoFUCHSIA-pFormatConstraints-06399]]
10143e5c31af7Sopenharmony_ci    If pname:pFormatConstraints->imageCreateInfo->usage contains
10144e5c31af7Sopenharmony_ci    ename:VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT, then
10145e5c31af7Sopenharmony_ci    pname:pFormatConstraints->requiredFormatFeatures must: contain
10146e5c31af7Sopenharmony_ci    ename:VK_FORMAT_FEATURE_DEPTH_STENCIL_ATTACHMENT_BIT
10147e5c31af7Sopenharmony_ci  * [[VUID-VkImageConstraintsInfoFUCHSIA-pFormatConstraints-06400]]
10148e5c31af7Sopenharmony_ci    If pname:pFormatConstraints->imageCreateInfo->usage contains
10149e5c31af7Sopenharmony_ci    ename:VK_IMAGE_USAGE_INPUT_ATTACHMENT_BIT, then
10150e5c31af7Sopenharmony_ci    pname:pFormatConstraints->requiredFormatFeatures must: contain at least
10151e5c31af7Sopenharmony_ci    one of ename:VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BIT or
10152e5c31af7Sopenharmony_ci    ename:VK_FORMAT_FEATURE_DEPTH_STENCIL_ATTACHMENT_BIT
10153e5c31af7Sopenharmony_ciifdef::VK_KHR_fragment_shading_rate[]
10154e5c31af7Sopenharmony_ci  * [[VUID-VkImageConstraintsInfoFUCHSIA-attachmentFragmentShadingRate-06401]]
10155e5c31af7Sopenharmony_ci    If the <<features-attachmentFragmentShadingRate,
10156e5c31af7Sopenharmony_ci    pname:attachmentFragmentShadingRate>> feature is enabled, and
10157e5c31af7Sopenharmony_ci    pname:pFormatConstraints->imageCreateInfo->usage contains
10158e5c31af7Sopenharmony_ci    ename:VK_IMAGE_USAGE_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR, then
10159e5c31af7Sopenharmony_ci    pname:pFormatConstraints->requiredFormatFeatures must: contain
10160e5c31af7Sopenharmony_ci    ename:VK_FORMAT_FEATURE_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR
10161e5c31af7Sopenharmony_ciendif::VK_KHR_fragment_shading_rate[]
10162e5c31af7Sopenharmony_ci****
10163e5c31af7Sopenharmony_ci
10164e5c31af7Sopenharmony_ciinclude::{generated}/validity/structs/VkImageConstraintsInfoFUCHSIA.adoc[]
10165e5c31af7Sopenharmony_ci--
10166e5c31af7Sopenharmony_ci
10167e5c31af7Sopenharmony_ci[open,refpage='VkImageConstraintsInfoFlagsFUCHSIA',desc='Reserved for future use',type='flags']
10168e5c31af7Sopenharmony_ci--
10169e5c31af7Sopenharmony_ciinclude::{generated}/api/flags/VkImageConstraintsInfoFlagsFUCHSIA.adoc[]
10170e5c31af7Sopenharmony_ci
10171e5c31af7Sopenharmony_citname:VkImageConstraintsInfoFlagsFUCHSIA is a bitmask type for setting a
10172e5c31af7Sopenharmony_cimask of zero or more elink:VkImageConstraintsInfoFlagBitsFUCHSIA bits.
10173e5c31af7Sopenharmony_ci--
10174e5c31af7Sopenharmony_ci
10175e5c31af7Sopenharmony_ci[open,refpage='VkImageConstraintsInfoFlagBitsFUCHSIA',desc='Bitmask specifying image constraints flags',type='enums']
10176e5c31af7Sopenharmony_ci--
10177e5c31af7Sopenharmony_ciBits which can: be set in
10178e5c31af7Sopenharmony_cielink:VkImageConstraintsInfoFlagBitsFUCHSIA::pname:flags include:
10179e5c31af7Sopenharmony_ci
10180e5c31af7Sopenharmony_ciinclude::{generated}/api/enums/VkImageConstraintsInfoFlagBitsFUCHSIA.adoc[]
10181e5c31af7Sopenharmony_ci
10182e5c31af7Sopenharmony_ciGeneral hints about the type of memory that should be allocated by Sysmem
10183e5c31af7Sopenharmony_cibased on the expected usage of the images in the buffer collection include:
10184e5c31af7Sopenharmony_ci
10185e5c31af7Sopenharmony_ci  * ename:VK_IMAGE_CONSTRAINTS_INFO_CPU_READ_RARELY_FUCHSIA
10186e5c31af7Sopenharmony_ci  * ename:VK_IMAGE_CONSTRAINTS_INFO_CPU_READ_OFTEN_FUCHSIA
10187e5c31af7Sopenharmony_ci  * ename:VK_IMAGE_CONSTRAINTS_INFO_CPU_WRITE_RARELY_FUCHSIA
10188e5c31af7Sopenharmony_ci  * ename:VK_IMAGE_CONSTRAINTS_INFO_CPU_WRITE_OFTEN_FUCHSIA
10189e5c31af7Sopenharmony_ci
10190e5c31af7Sopenharmony_ciFor protected memory:
10191e5c31af7Sopenharmony_ci
10192e5c31af7Sopenharmony_ci  * ename:VK_IMAGE_CONSTRAINTS_INFO_PROTECTED_OPTIONAL_FUCHSIA specifies
10193e5c31af7Sopenharmony_ci    that protected memory is optional for the buffer collection.
10194e5c31af7Sopenharmony_ci
10195e5c31af7Sopenharmony_ciNote that if all participants in the buffer collection (Vulkan or otherwise)
10196e5c31af7Sopenharmony_cispecify that protected memory is optional, Sysmem will not allocate
10197e5c31af7Sopenharmony_ciprotected memory.
10198e5c31af7Sopenharmony_ci--
10199e5c31af7Sopenharmony_ci
10200e5c31af7Sopenharmony_ci[open,refpage='VkImageFormatConstraintsInfoFUCHSIA',desc='Structure image-based buffer collection constraints',type='structs']
10201e5c31af7Sopenharmony_ci--
10202e5c31af7Sopenharmony_ciThe sname:VkImageFormatConstraintsInfoFUCHSIA structure is defined as:
10203e5c31af7Sopenharmony_ci
10204e5c31af7Sopenharmony_ciinclude::{generated}/api/structs/VkImageFormatConstraintsInfoFUCHSIA.adoc[]
10205e5c31af7Sopenharmony_ci
10206e5c31af7Sopenharmony_ci  * pname:sType is a elink:VkStructureType value identifying this structure.
10207e5c31af7Sopenharmony_ci  * pname:pNext is `NULL` or a pointer to a structure extending this
10208e5c31af7Sopenharmony_ci    structure
10209e5c31af7Sopenharmony_ci  * pname:imageCreateInfo is the slink:VkImageCreateInfo used to create a
10210e5c31af7Sopenharmony_ci    slink:VkImage that is to use memory from the
10211e5c31af7Sopenharmony_ci    slink:VkBufferCollectionFUCHSIA
10212e5c31af7Sopenharmony_ci  * pname:requiredFormatFeatures is a bitmask of
10213e5c31af7Sopenharmony_ci    ename:VkFormatFeatureFlagBits specifying required features of the
10214e5c31af7Sopenharmony_ci    buffers in the buffer collection
10215e5c31af7Sopenharmony_ci  * pname:flags is reserved for future use
10216e5c31af7Sopenharmony_ci  * pname:sysmemPixelFormat is a code:PixelFormatType value from the
10217e5c31af7Sopenharmony_ci    `fuchsia.sysmem/image_formats.fidl` FIDL interface
10218e5c31af7Sopenharmony_ci  * pname:colorSpaceCount the element count of pname:pColorSpaces
10219e5c31af7Sopenharmony_ci  * pname:pColorSpaces is a pointer to an array of
10220e5c31af7Sopenharmony_ci    slink:VkSysmemColorSpaceFUCHSIA structs of size pname:colorSpaceCount
10221e5c31af7Sopenharmony_ci
10222e5c31af7Sopenharmony_ciinclude::{generated}/validity/structs/VkImageFormatConstraintsInfoFUCHSIA.adoc[]
10223e5c31af7Sopenharmony_ci--
10224e5c31af7Sopenharmony_ci
10225e5c31af7Sopenharmony_ci[open,refpage='VkImageFormatConstraintsFlagsFUCHSIA',desc='Reserved for future use',type='flags']
10226e5c31af7Sopenharmony_ci--
10227e5c31af7Sopenharmony_ciinclude::{generated}/api/flags/VkImageFormatConstraintsFlagsFUCHSIA.adoc[]
10228e5c31af7Sopenharmony_ci
10229e5c31af7Sopenharmony_citname:VkImageFormatConstraintsFlagsFUCHSIA is a bitmask type for setting a
10230e5c31af7Sopenharmony_cimask, but is currently reserved for future use.
10231e5c31af7Sopenharmony_ci--
10232e5c31af7Sopenharmony_ci
10233e5c31af7Sopenharmony_ci[open,refpage='VkBufferCollectionConstraintsInfoFUCHSIA',desc='Structure of general buffer collection constraints',type='structs']
10234e5c31af7Sopenharmony_ci--
10235e5c31af7Sopenharmony_ciThe sname:VkBufferCollectionConstraintsInfoFUCHSIA structure is defined as:
10236e5c31af7Sopenharmony_ci
10237e5c31af7Sopenharmony_ciinclude::{generated}/api/structs/VkBufferCollectionConstraintsInfoFUCHSIA.adoc[]
10238e5c31af7Sopenharmony_ci
10239e5c31af7Sopenharmony_ci  * pname:sType is a elink:VkStructureType value identifying this structure.
10240e5c31af7Sopenharmony_ci  * pname:pNext is `NULL` or a pointer to a structure extending this
10241e5c31af7Sopenharmony_ci    structure
10242e5c31af7Sopenharmony_ci  * pname:minBufferCount is the minimum number of buffers available in the
10243e5c31af7Sopenharmony_ci    collection
10244e5c31af7Sopenharmony_ci  * pname:maxBufferCount is the maximum number of buffers allowed in the
10245e5c31af7Sopenharmony_ci    collection
10246e5c31af7Sopenharmony_ci  * pname:minBufferCountForCamping is the per-participant minimum buffers
10247e5c31af7Sopenharmony_ci    for camping
10248e5c31af7Sopenharmony_ci  * pname:minBufferCountForDedicatedSlack is the per-participant minimum
10249e5c31af7Sopenharmony_ci    buffers for dedicated slack
10250e5c31af7Sopenharmony_ci  * pname:minBufferCountForSharedSlack is the per-participant minimum
10251e5c31af7Sopenharmony_ci    buffers for shared slack
10252e5c31af7Sopenharmony_ci
10253e5c31af7Sopenharmony_ciSysmem uses all buffer count parameters in combination to determine the
10254e5c31af7Sopenharmony_cinumber of buffers it will allocate.
10255e5c31af7Sopenharmony_ciSysmem defines buffer count constraints in
10256e5c31af7Sopenharmony_ci`fuchsia.sysmem/constraints.fidl`.
10257e5c31af7Sopenharmony_ci
10258e5c31af7Sopenharmony_ci_Camping_ as referred to by pname:minBufferCountForCamping, is the number of
10259e5c31af7Sopenharmony_cibuffers that should be available for the participant that are not for
10260e5c31af7Sopenharmony_citransient use.
10261e5c31af7Sopenharmony_ciThis number of buffers is required for the participant to logically operate.
10262e5c31af7Sopenharmony_ci
10263e5c31af7Sopenharmony_ci_Slack_ as referred to by pname:minBufferCountForDedicatedSlack and
10264e5c31af7Sopenharmony_cipname:minBufferCountForSharedSlack, refers to the number of buffers desired
10265e5c31af7Sopenharmony_ciby participants for optimal performance.
10266e5c31af7Sopenharmony_cipname:minBufferCountForDedicatedSlack refers to the current participant.
10267e5c31af7Sopenharmony_cipname:minBufferCountForSharedSlack refers to buffer slack for all
10268e5c31af7Sopenharmony_ciparticipants in the collection.
10269e5c31af7Sopenharmony_ci
10270e5c31af7Sopenharmony_ciinclude::{generated}/validity/structs/VkBufferCollectionConstraintsInfoFUCHSIA.adoc[]
10271e5c31af7Sopenharmony_ci--
10272e5c31af7Sopenharmony_ci
10273e5c31af7Sopenharmony_ci[open,refpage='VkSysmemColorSpaceFUCHSIA',desc='Structure describing the buffer collections color space',type='structs']
10274e5c31af7Sopenharmony_ci--
10275e5c31af7Sopenharmony_ciThe sname:VkSysmemColorSpaceFUCHSIA structure is defined as:
10276e5c31af7Sopenharmony_ci
10277e5c31af7Sopenharmony_ciinclude::{generated}/api/structs/VkSysmemColorSpaceFUCHSIA.adoc[]
10278e5c31af7Sopenharmony_ci
10279e5c31af7Sopenharmony_ci  * pname:sType is a elink:VkStructureType value identifying this structure.
10280e5c31af7Sopenharmony_ci  * pname:pNext is `NULL` or a pointer to a structure extending this
10281e5c31af7Sopenharmony_ci    structure
10282e5c31af7Sopenharmony_ci  * pname:colorSpace value of the Sysmem code:ColorSpaceType
10283e5c31af7Sopenharmony_ci
10284e5c31af7Sopenharmony_ci.Valid Usage
10285e5c31af7Sopenharmony_ci****
10286e5c31af7Sopenharmony_ci  * [[VUID-VkSysmemColorSpaceFUCHSIA-colorSpace-06402]]
10287e5c31af7Sopenharmony_ci    pname:colorSpace must: be a code:ColorSpaceType as defined in
10288e5c31af7Sopenharmony_ci    `fuchsia.sysmem/image_formats.fidl`
10289e5c31af7Sopenharmony_ci****
10290e5c31af7Sopenharmony_ci
10291e5c31af7Sopenharmony_ciinclude::{generated}/validity/structs/VkSysmemColorSpaceFUCHSIA.adoc[]
10292e5c31af7Sopenharmony_ci--
10293e5c31af7Sopenharmony_ci
10294e5c31af7Sopenharmony_ci
10295e5c31af7Sopenharmony_ci==== Set Buffer-based Buffer Collection Constraints
10296e5c31af7Sopenharmony_ci
10297e5c31af7Sopenharmony_ci[open,refpage='vkSetBufferCollectionBufferConstraintsFUCHSIA',desc='Set buffer-based constraints for a buffer collection',type='protos']
10298e5c31af7Sopenharmony_ci--
10299e5c31af7Sopenharmony_ciTo set the constraints on a slink:VkBuffer buffer collection, call:
10300e5c31af7Sopenharmony_ci
10301e5c31af7Sopenharmony_ciinclude::{generated}/api/protos/vkSetBufferCollectionBufferConstraintsFUCHSIA.adoc[]
10302e5c31af7Sopenharmony_ci
10303e5c31af7Sopenharmony_ci  * pname:device is the logical device
10304e5c31af7Sopenharmony_ci  * pname:collection is the slink:VkBufferCollectionFUCHSIA handle
10305e5c31af7Sopenharmony_ci  * pname:pBufferConstraintsInfo is a pointer to a
10306e5c31af7Sopenharmony_ci    slink:VkBufferConstraintsInfoFUCHSIA structure
10307e5c31af7Sopenharmony_ci
10308e5c31af7Sopenharmony_cifname:vkSetBufferCollectionBufferConstraintsFUCHSIA may: fail if the
10309e5c31af7Sopenharmony_ciimplementation does not support the constraints specified in the
10310e5c31af7Sopenharmony_cipname:bufferCollectionConstraints structure.
10311e5c31af7Sopenharmony_ciIf that occurs, flink:vkSetBufferCollectionBufferConstraintsFUCHSIA will
10312e5c31af7Sopenharmony_cireturn ename:VK_ERROR_FORMAT_NOT_SUPPORTED.
10313e5c31af7Sopenharmony_ci
10314e5c31af7Sopenharmony_ci.Valid Usage
10315e5c31af7Sopenharmony_ci****
10316e5c31af7Sopenharmony_ci  * [[VUID-vkSetBufferCollectionBufferConstraintsFUCHSIA-collection-06403]]
10317e5c31af7Sopenharmony_ci    fname:vkSetBufferCollectionImageConstraintsFUCHSIA or
10318e5c31af7Sopenharmony_ci    fname:vkSetBufferCollectionBufferConstraintsFUCHSIA must: not have
10319e5c31af7Sopenharmony_ci    already been called on pname:collection
10320e5c31af7Sopenharmony_ci****
10321e5c31af7Sopenharmony_ci
10322e5c31af7Sopenharmony_ciinclude::{generated}/validity/protos/vkSetBufferCollectionBufferConstraintsFUCHSIA.adoc[]
10323e5c31af7Sopenharmony_ci--
10324e5c31af7Sopenharmony_ci
10325e5c31af7Sopenharmony_ci[open,refpage='VkBufferConstraintsInfoFUCHSIA',desc='Structure buffer-based buffer collection constraints',type='structs']
10326e5c31af7Sopenharmony_ci--
10327e5c31af7Sopenharmony_ciThe sname:VkBufferConstraintsInfoFUCHSIA structure is defined as:
10328e5c31af7Sopenharmony_ci
10329e5c31af7Sopenharmony_ciinclude::{generated}/api/structs/VkBufferConstraintsInfoFUCHSIA.adoc[]
10330e5c31af7Sopenharmony_ci
10331e5c31af7Sopenharmony_ci  * pname:sType is a elink:VkStructureType value identifying this structure.
10332e5c31af7Sopenharmony_ci  * pname:pNext is `NULL` or a pointer to a structure extending this
10333e5c31af7Sopenharmony_ci    structure
10334e5c31af7Sopenharmony_ci  * pname:pBufferCreateInfo a pointer to a slink:VkBufferCreateInfo struct
10335e5c31af7Sopenharmony_ci    describing the buffer attributes for the buffer collection
10336e5c31af7Sopenharmony_ci  * pname:requiredFormatFeatures bitmask of ename:VkFormatFeatureFlagBits
10337e5c31af7Sopenharmony_ci    required features of the buffers in the buffer collection
10338e5c31af7Sopenharmony_ci  * pname:bufferCollectionConstraints is used to supply parameters for the
10339e5c31af7Sopenharmony_ci    negotiation and allocation of the buffer collection
10340e5c31af7Sopenharmony_ci
10341e5c31af7Sopenharmony_ci.Valid Usage
10342e5c31af7Sopenharmony_ci****
10343e5c31af7Sopenharmony_ci  * [[VUID-VkBufferConstraintsInfoFUCHSIA-requiredFormatFeatures-06404]]
10344e5c31af7Sopenharmony_ci    The pname:requiredFormatFeatures bitmask of
10345e5c31af7Sopenharmony_ci    ename:VkFormatFeatureFlagBits must: be chosen from among the buffer
10346e5c31af7Sopenharmony_ci    compatible format features listed in
10347e5c31af7Sopenharmony_ci    <<buffer-compatible-format-features,buffer compatible format features>>
10348e5c31af7Sopenharmony_ci****
10349e5c31af7Sopenharmony_ci
10350e5c31af7Sopenharmony_ciinclude::{generated}/validity/structs/VkBufferConstraintsInfoFUCHSIA.adoc[]
10351e5c31af7Sopenharmony_ci--
10352e5c31af7Sopenharmony_ci
10353e5c31af7Sopenharmony_ci
10354e5c31af7Sopenharmony_ci=== Retrieve Buffer Collection Properties
10355e5c31af7Sopenharmony_ci
10356e5c31af7Sopenharmony_ci[open,refpage='vkGetBufferCollectionPropertiesFUCHSIA',desc='Retrieve properties from a buffer collection',type='protos']
10357e5c31af7Sopenharmony_ci--
10358e5c31af7Sopenharmony_ciAfter constraints have been set on the buffer collection by calling
10359e5c31af7Sopenharmony_ciflink:vkSetBufferCollectionImageConstraintsFUCHSIA or
10360e5c31af7Sopenharmony_ciflink:vkSetBufferCollectionBufferConstraintsFUCHSIA, call
10361e5c31af7Sopenharmony_cifname:vkGetBufferCollectionPropertiesFUCHSIA to retrieve the negotiated and
10362e5c31af7Sopenharmony_cifinalized properties of the buffer collection.
10363e5c31af7Sopenharmony_ci
10364e5c31af7Sopenharmony_ciThe call to fname:vkGetBufferCollectionPropertiesFUCHSIA is synchronous.
10365e5c31af7Sopenharmony_ciIt waits for the Sysmem format negotiation and buffer collection allocation
10366e5c31af7Sopenharmony_cito complete before returning.
10367e5c31af7Sopenharmony_ci
10368e5c31af7Sopenharmony_ciinclude::{generated}/api/protos/vkGetBufferCollectionPropertiesFUCHSIA.adoc[]
10369e5c31af7Sopenharmony_ci
10370e5c31af7Sopenharmony_ci  * pname:device is the logical device handle
10371e5c31af7Sopenharmony_ci  * pname:collection is the slink:VkBufferCollectionFUCHSIA handle
10372e5c31af7Sopenharmony_ci  * pname:pProperties is a pointer to the retrieved
10373e5c31af7Sopenharmony_ci    slink:VkBufferCollectionPropertiesFUCHSIA struct
10374e5c31af7Sopenharmony_ci
10375e5c31af7Sopenharmony_ci[[sysmem-chosen-create-infos]]
10376e5c31af7Sopenharmony_ciFor image-based buffer collections, upon calling
10377e5c31af7Sopenharmony_cifname:vkGetBufferCollectionPropertiesFUCHSIA, Sysmem will choose an element
10378e5c31af7Sopenharmony_ciof the slink:VkImageConstraintsInfoFUCHSIA::pname:pImageCreateInfos
10379e5c31af7Sopenharmony_ciestablished by the preceding call to
10380e5c31af7Sopenharmony_ciflink:vkSetBufferCollectionImageConstraintsFUCHSIA.
10381e5c31af7Sopenharmony_ciThe index of the element chosen is stored in and can be retrieved from
10382e5c31af7Sopenharmony_cislink:VkBufferCollectionPropertiesFUCHSIA::pname:createInfoIndex.
10383e5c31af7Sopenharmony_ci
10384e5c31af7Sopenharmony_ciFor buffer-based buffer collections, a single slink:VkBufferCreateInfo is
10385e5c31af7Sopenharmony_cispecified as slink:VkBufferConstraintsInfoFUCHSIA::pname:createInfo.
10386e5c31af7Sopenharmony_cislink:VkBufferCollectionPropertiesFUCHSIA::pname:createInfoIndex will
10387e5c31af7Sopenharmony_citherefore always be zero.
10388e5c31af7Sopenharmony_ci
10389e5c31af7Sopenharmony_cifname:vkGetBufferCollectionPropertiesFUCHSIA may: fail if Sysmem is unable
10390e5c31af7Sopenharmony_cito resolve the constraints of all of the participants in the buffer
10391e5c31af7Sopenharmony_cicollection.
10392e5c31af7Sopenharmony_ciIf that occurs, fname:vkGetBufferCollectionPropertiesFUCHSIA will return
10393e5c31af7Sopenharmony_ciename:VK_ERROR_INITIALIZATION_FAILED.
10394e5c31af7Sopenharmony_ci
10395e5c31af7Sopenharmony_ci.Valid Usage
10396e5c31af7Sopenharmony_ci****
10397e5c31af7Sopenharmony_ci  * [[VUID-vkGetBufferCollectionPropertiesFUCHSIA-None-06405]]
10398e5c31af7Sopenharmony_ci    Prior to calling flink:vkGetBufferCollectionPropertiesFUCHSIA, the
10399e5c31af7Sopenharmony_ci    constraints on the buffer collection must: have been set by either
10400e5c31af7Sopenharmony_ci    flink:vkSetBufferCollectionImageConstraintsFUCHSIA or
10401e5c31af7Sopenharmony_ci    flink:vkSetBufferCollectionBufferConstraintsFUCHSIA
10402e5c31af7Sopenharmony_ci****
10403e5c31af7Sopenharmony_ci
10404e5c31af7Sopenharmony_ciinclude::{generated}/validity/protos/vkGetBufferCollectionPropertiesFUCHSIA.adoc[]
10405e5c31af7Sopenharmony_ci--
10406e5c31af7Sopenharmony_ci
10407e5c31af7Sopenharmony_ci[open,refpage='VkBufferCollectionPropertiesFUCHSIA',desc='Structure specifying the negotiated format chosen by Sysmem',type='structs']
10408e5c31af7Sopenharmony_ci--
10409e5c31af7Sopenharmony_ciThe sname:VkBufferCollectionPropertiesFUCHSIA structure is defined as:
10410e5c31af7Sopenharmony_ci
10411e5c31af7Sopenharmony_ciinclude::{generated}/api/structs/VkBufferCollectionPropertiesFUCHSIA.adoc[]
10412e5c31af7Sopenharmony_ci
10413e5c31af7Sopenharmony_ci  * pname:sType is a elink:VkStructureType value identifying this structure.
10414e5c31af7Sopenharmony_ci  * pname:pNext is `NULL` or a pointer to a structure extending this
10415e5c31af7Sopenharmony_ci    structure
10416e5c31af7Sopenharmony_ci  * pname:memoryTypeBits is a bitmask containing one bit set for every
10417e5c31af7Sopenharmony_ci    memory type which the buffer collection can be imported as buffer
10418e5c31af7Sopenharmony_ci    collection
10419e5c31af7Sopenharmony_ci  * pname:bufferCount is the number of buffers in the collection
10420e5c31af7Sopenharmony_ci  * pname:createInfoIndex as described in <<sysmem-chosen-create-infos,
10421e5c31af7Sopenharmony_ci    Sysmem chosen create infos>>
10422e5c31af7Sopenharmony_ci  * pname:sysmemPixelFormat is the Sysmem code:PixelFormatType as defined in
10423e5c31af7Sopenharmony_ci    `fuchsia.sysmem/image_formats.fidl`
10424e5c31af7Sopenharmony_ci  * pname:formatFeatures is a bitmask of elink:VkFormatFeatureFlagBits
10425e5c31af7Sopenharmony_ci    shared by the buffer collection
10426e5c31af7Sopenharmony_ci  * pname:sysmemColorSpaceIndex is a slink:VkSysmemColorSpaceFUCHSIA struct
10427e5c31af7Sopenharmony_ci    specifying the color space
10428e5c31af7Sopenharmony_ci  * pname:samplerYcbcrConversionComponents is a slink:VkComponentMapping
10429e5c31af7Sopenharmony_ci    struct specifying the component mapping
10430e5c31af7Sopenharmony_ci  * pname:suggestedYcbcrModel is a elink:VkSamplerYcbcrModelConversion value
10431e5c31af7Sopenharmony_ci    specifying the suggested {YCbCr} model
10432e5c31af7Sopenharmony_ci  * pname:suggestedYcbcrRange is a elink:VkSamplerYcbcrRange value
10433e5c31af7Sopenharmony_ci    specifying the suggested {YCbCr} range
10434e5c31af7Sopenharmony_ci  * pname:suggestedXChromaOffset is a elink:VkChromaLocation value
10435e5c31af7Sopenharmony_ci    specifying the suggested X chroma offset
10436e5c31af7Sopenharmony_ci  * pname:suggestedYChromaOffset is a elink:VkChromaLocation value
10437e5c31af7Sopenharmony_ci    specifying the suggested Y chroma offset
10438e5c31af7Sopenharmony_ci
10439e5c31af7Sopenharmony_cipname:sysmemColorSpace is only set for image-based buffer collections where
10440e5c31af7Sopenharmony_cithe constraints were specified using slink:VkImageConstraintsInfoFUCHSIA in
10441e5c31af7Sopenharmony_cia call to flink:vkSetBufferCollectionImageConstraintsFUCHSIA.
10442e5c31af7Sopenharmony_ci
10443e5c31af7Sopenharmony_ciFor image-based buffer collections, pname:createInfoIndex will identify both
10444e5c31af7Sopenharmony_cithe slink:VkImageConstraintsInfoFUCHSIA::pname:pImageCreateInfos element and
10445e5c31af7Sopenharmony_cithe slink:VkImageConstraintsInfoFUCHSIA::pname:pFormatConstraints element
10446e5c31af7Sopenharmony_cichosen by Sysmem when flink:vkSetBufferCollectionImageConstraintsFUCHSIA was
10447e5c31af7Sopenharmony_cicalled.
10448e5c31af7Sopenharmony_ciThe value of pname:sysmemColorSpaceIndex will be an index to one of the
10449e5c31af7Sopenharmony_cicolor spaces provided in the
10450e5c31af7Sopenharmony_cislink:VkImageFormatConstraintsInfoFUCHSIA::pname:pColorSpaces array.
10451e5c31af7Sopenharmony_ci
10452e5c31af7Sopenharmony_ciThe implementation must have pname:formatFeatures with all bits set that
10453e5c31af7Sopenharmony_ciwere set in
10454e5c31af7Sopenharmony_cislink:VkImageFormatConstraintsInfoFUCHSIA::pname:requiredFormatFeatures, by
10455e5c31af7Sopenharmony_cithe call to flink:vkSetBufferCollectionImageConstraintsFUCHSIA, at
10456e5c31af7Sopenharmony_cipname:createInfoIndex (other bits could be set as well).
10457e5c31af7Sopenharmony_ci
10458e5c31af7Sopenharmony_ciinclude::{generated}/validity/structs/VkBufferCollectionPropertiesFUCHSIA.adoc[]
10459e5c31af7Sopenharmony_ci--
10460e5c31af7Sopenharmony_ci
10461e5c31af7Sopenharmony_ci
10462e5c31af7Sopenharmony_ci=== Memory Allocation
10463e5c31af7Sopenharmony_ci
10464e5c31af7Sopenharmony_ciTo import memory from a buffer collection into a slink:VkImage or a
10465e5c31af7Sopenharmony_cislink:VkBuffer, chain a slink:VkImportMemoryBufferCollectionFUCHSIA
10466e5c31af7Sopenharmony_cistructure to the pname:pNext member of the slink:VkMemoryAllocateInfo in the
10467e5c31af7Sopenharmony_cicall to flink:vkAllocateMemory.
10468e5c31af7Sopenharmony_ci
10469e5c31af7Sopenharmony_ci[open,refpage='VkImportMemoryBufferCollectionFUCHSIA',desc='Structure to specify the Sysmem buffer to import',type='structs']
10470e5c31af7Sopenharmony_ci--
10471e5c31af7Sopenharmony_ciThe sname:VkImportMemoryBufferCollectionFUCHSIA structure is defined as:
10472e5c31af7Sopenharmony_ci
10473e5c31af7Sopenharmony_ciinclude::{generated}/api/structs/VkImportMemoryBufferCollectionFUCHSIA.adoc[]
10474e5c31af7Sopenharmony_ci
10475e5c31af7Sopenharmony_ci  * pname:sType is a elink:VkStructureType value identifying this structure.
10476e5c31af7Sopenharmony_ci  * pname:pNext is `NULL` or a pointer to a structure extending this
10477e5c31af7Sopenharmony_ci    structure
10478e5c31af7Sopenharmony_ci  * pname:collection is the slink:VkBufferCollectionFUCHSIA handle
10479e5c31af7Sopenharmony_ci  * pname:index the index of the buffer to import from pname:collection
10480e5c31af7Sopenharmony_ci
10481e5c31af7Sopenharmony_ci.Valid Usage
10482e5c31af7Sopenharmony_ci****
10483e5c31af7Sopenharmony_ci  * [[VUID-VkImportMemoryBufferCollectionFUCHSIA-index-06406]]
10484e5c31af7Sopenharmony_ci    pname:index must: be less than the value retrieved as
10485e5c31af7Sopenharmony_ci    slink:VkBufferCollectionPropertiesFUCHSIA:bufferCount
10486e5c31af7Sopenharmony_ci****
10487e5c31af7Sopenharmony_ci
10488e5c31af7Sopenharmony_ciinclude::{generated}/validity/structs/VkImportMemoryBufferCollectionFUCHSIA.adoc[]
10489e5c31af7Sopenharmony_ci--
10490e5c31af7Sopenharmony_ci
10491e5c31af7Sopenharmony_ci[open,refpage='vkDestroyBufferCollectionFUCHSIA',desc='Destroy a buffer collection',type='protos']
10492e5c31af7Sopenharmony_ci--
10493e5c31af7Sopenharmony_ciTo release a slink:VkBufferCollectionFUCHSIA:
10494e5c31af7Sopenharmony_ci
10495e5c31af7Sopenharmony_ciinclude::{generated}/api/protos/vkDestroyBufferCollectionFUCHSIA.adoc[]
10496e5c31af7Sopenharmony_ci
10497e5c31af7Sopenharmony_ci  * pname:device is the logical device that creates the
10498e5c31af7Sopenharmony_ci    sname:VkBufferCollectionFUCHSIA
10499e5c31af7Sopenharmony_ci  * pname:collection is the slink:VkBufferCollectionFUCHSIA handle
10500e5c31af7Sopenharmony_ci  * pname:pAllocator is a pointer to a slink:VkAllocationCallbacks structure
10501e5c31af7Sopenharmony_ci    controlling host memory allocation as described in the
10502e5c31af7Sopenharmony_ci    <<memory-allocation, Memory Allocation>> chapter
10503e5c31af7Sopenharmony_ci
10504e5c31af7Sopenharmony_ci.Valid Usage
10505e5c31af7Sopenharmony_ci****
10506e5c31af7Sopenharmony_ci  * [[VUID-vkDestroyBufferCollectionFUCHSIA-collection-06407]]
10507e5c31af7Sopenharmony_ci    slink:VkImage and slink:VkBuffer objects that referenced
10508e5c31af7Sopenharmony_ci    pname:collection upon creation by inclusion of a
10509e5c31af7Sopenharmony_ci    slink:VkBufferCollectionImageCreateInfoFUCHSIA or
10510e5c31af7Sopenharmony_ci    slink:VkBufferCollectionBufferCreateInfoFUCHSIA chained to their
10511e5c31af7Sopenharmony_ci    slink:VkImageCreateInfo or slink:VkBufferCreateInfo structures
10512e5c31af7Sopenharmony_ci    respectively, may: outlive pname:collection
10513e5c31af7Sopenharmony_ci****
10514e5c31af7Sopenharmony_ci
10515e5c31af7Sopenharmony_ciinclude::{generated}/validity/protos/vkDestroyBufferCollectionFUCHSIA.adoc[]
10516e5c31af7Sopenharmony_ci--
10517e5c31af7Sopenharmony_ciendif::VK_FUCHSIA_buffer_collection[]
10518