1e5c31af7Sopenharmony_ci// Copyright 2015-2021 The Khronos Group, Inc.
2e5c31af7Sopenharmony_ci//
3e5c31af7Sopenharmony_ci// SPDX-License-Identifier: CC-BY-4.0
4e5c31af7Sopenharmony_ci
5e5c31af7Sopenharmony_ci[[capabilities]]
6e5c31af7Sopenharmony_ci= Additional Capabilities
7e5c31af7Sopenharmony_ci
8e5c31af7Sopenharmony_ciThis chapter describes additional capabilities beyond the minimum
9e5c31af7Sopenharmony_cicapabilities described in the <<limits,Limits>> and <<formats,Formats>>
10e5c31af7Sopenharmony_cichapters, including:
11e5c31af7Sopenharmony_ci
12e5c31af7Sopenharmony_ci  * <<capabilities-image, Additional Image Capabilities>>
13e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_1,VK_KHR_external_memory_capabilities[]
14e5c31af7Sopenharmony_ci  * <<capabilities-buffer, Additional Buffer Capabilities>>
15e5c31af7Sopenharmony_ciendif::VK_VERSION_1_1,VK_KHR_external_memory_capabilities[]
16e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_1,VK_KHR_external_semaphore_capabilities[]
17e5c31af7Sopenharmony_ci  * <<capabilities-semaphore, Optional Semaphore Capabilities>>
18e5c31af7Sopenharmony_ciendif::VK_VERSION_1_1,VK_KHR_external_semaphore_capabilities[]
19e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_1,VK_KHR_external_fence_capabilities[]
20e5c31af7Sopenharmony_ci  * <<capabilities-fence, Optional Fence Capabilities>>
21e5c31af7Sopenharmony_ciendif::VK_VERSION_1_1,VK_KHR_external_fence_capabilities[]
22e5c31af7Sopenharmony_ciifdef::VK_EXT_calibrated_timestamps[]
23e5c31af7Sopenharmony_ci  * <<features-timestamp-calibration, Timestamp Calibration Capabilities>>
24e5c31af7Sopenharmony_ciendif::VK_EXT_calibrated_timestamps[]
25e5c31af7Sopenharmony_ci
26e5c31af7Sopenharmony_ci
27e5c31af7Sopenharmony_ci[[capabilities-image]]
28e5c31af7Sopenharmony_ci== Additional Image Capabilities
29e5c31af7Sopenharmony_ci
30e5c31af7Sopenharmony_ciAdditional image capabilities, such as larger dimensions or additional
31e5c31af7Sopenharmony_cisample counts for certain image types, or additional capabilities for
32e5c31af7Sopenharmony_ci_linear_ tiling format images, are described in this section.
33e5c31af7Sopenharmony_ci
34e5c31af7Sopenharmony_ci[open,refpage='vkGetPhysicalDeviceImageFormatProperties',desc='Lists physical device\'s image format capabilities',type='protos']
35e5c31af7Sopenharmony_ci--
36e5c31af7Sopenharmony_ciTo query additional capabilities specific to image types, call:
37e5c31af7Sopenharmony_ci
38e5c31af7Sopenharmony_ciinclude::{generated}/api/protos/vkGetPhysicalDeviceImageFormatProperties.txt[]
39e5c31af7Sopenharmony_ci
40e5c31af7Sopenharmony_ci  * pname:physicalDevice is the physical device from which to query the
41e5c31af7Sopenharmony_ci    image capabilities.
42e5c31af7Sopenharmony_ci  * pname:format is a elink:VkFormat value specifying the image format,
43e5c31af7Sopenharmony_ci    corresponding to slink:VkImageCreateInfo::pname:format.
44e5c31af7Sopenharmony_ci  * pname:type is a elink:VkImageType value specifying the image type,
45e5c31af7Sopenharmony_ci    corresponding to slink:VkImageCreateInfo::pname:imageType.
46e5c31af7Sopenharmony_ci  * pname:tiling is a elink:VkImageTiling value specifying the image tiling,
47e5c31af7Sopenharmony_ci    corresponding to slink:VkImageCreateInfo::pname:tiling.
48e5c31af7Sopenharmony_ci  * pname:usage is a bitmask of elink:VkImageUsageFlagBits specifying the
49e5c31af7Sopenharmony_ci    intended usage of the image, corresponding to
50e5c31af7Sopenharmony_ci    slink:VkImageCreateInfo::pname:usage.
51e5c31af7Sopenharmony_ci  * pname:flags is a bitmask of elink:VkImageCreateFlagBits specifying
52e5c31af7Sopenharmony_ci    additional parameters of the image, corresponding to
53e5c31af7Sopenharmony_ci    slink:VkImageCreateInfo::pname:flags.
54e5c31af7Sopenharmony_ci  * pname:pImageFormatProperties is a pointer to a
55e5c31af7Sopenharmony_ci    slink:VkImageFormatProperties structure in which capabilities are
56e5c31af7Sopenharmony_ci    returned.
57e5c31af7Sopenharmony_ci
58e5c31af7Sopenharmony_ciThe pname:format, pname:type, pname:tiling, pname:usage, and pname:flags
59e5c31af7Sopenharmony_ciparameters correspond to parameters that would be consumed by
60e5c31af7Sopenharmony_ciflink:vkCreateImage (as members of slink:VkImageCreateInfo).
61e5c31af7Sopenharmony_ci
62e5c31af7Sopenharmony_ciIf pname:format is not a supported image format, or if the combination of
63e5c31af7Sopenharmony_cipname:format, pname:type, pname:tiling, pname:usage, and pname:flags is not
64e5c31af7Sopenharmony_cisupported for images, then fname:vkGetPhysicalDeviceImageFormatProperties
65e5c31af7Sopenharmony_cireturns ename:VK_ERROR_FORMAT_NOT_SUPPORTED.
66e5c31af7Sopenharmony_ci
67e5c31af7Sopenharmony_ciThe limitations on an image format that are reported by
68e5c31af7Sopenharmony_cifname:vkGetPhysicalDeviceImageFormatProperties have the following property:
69e5c31af7Sopenharmony_ciif code:usage1 and code:usage2 of type tlink:VkImageUsageFlags are such that
70e5c31af7Sopenharmony_cithe bits set in code:usage1 are a subset of the bits set in code:usage2, and
71e5c31af7Sopenharmony_cicode:flags1 and code:flags2 of type tlink:VkImageCreateFlags are such that
72e5c31af7Sopenharmony_cithe bits set in code:flags1 are a subset of the bits set in code:flags2,
73e5c31af7Sopenharmony_cithen the limitations for code:usage1 and code:flags1 must: be no more strict
74e5c31af7Sopenharmony_cithan the limitations for code:usage2 and code:flags2, for all values of
75e5c31af7Sopenharmony_cipname:format, pname:type, and pname:tiling.
76e5c31af7Sopenharmony_ci
77e5c31af7Sopenharmony_ciifdef::VK_EXT_image_drm_format_modifier[]
78e5c31af7Sopenharmony_ci.Valid Usage
79e5c31af7Sopenharmony_ci****
80e5c31af7Sopenharmony_ci  * [[VUID-vkGetPhysicalDeviceImageFormatProperties-tiling-02248]]
81e5c31af7Sopenharmony_ci    pname:tiling must: not be ename:VK_IMAGE_TILING_DRM_FORMAT_MODIFIER_EXT.
82e5c31af7Sopenharmony_ci    (Use flink:vkGetPhysicalDeviceImageFormatProperties2 instead)
83e5c31af7Sopenharmony_ci****
84e5c31af7Sopenharmony_ciendif::VK_EXT_image_drm_format_modifier[]
85e5c31af7Sopenharmony_ci
86e5c31af7Sopenharmony_ciinclude::{generated}/validity/protos/vkGetPhysicalDeviceImageFormatProperties.txt[]
87e5c31af7Sopenharmony_ci--
88e5c31af7Sopenharmony_ci
89e5c31af7Sopenharmony_ci[open,refpage='VkImageFormatProperties',desc='Structure specifying an image format properties',type='structs']
90e5c31af7Sopenharmony_ci--
91e5c31af7Sopenharmony_ciThe sname:VkImageFormatProperties structure is defined as:
92e5c31af7Sopenharmony_ci
93e5c31af7Sopenharmony_ciinclude::{generated}/api/structs/VkImageFormatProperties.txt[]
94e5c31af7Sopenharmony_ci
95e5c31af7Sopenharmony_ci  * pname:maxExtent are the maximum image dimensions.
96e5c31af7Sopenharmony_ci    See the <<features-extentperimagetype,Allowed Extent Values>> section
97e5c31af7Sopenharmony_ci    below for how these values are constrained by pname:type.
98e5c31af7Sopenharmony_ci  * pname:maxMipLevels is the maximum number of mipmap levels.
99e5c31af7Sopenharmony_ci    pname:maxMipLevels must: be equal to the number of levels in the
100e5c31af7Sopenharmony_ci    complete mipmap chain based on the [eq]#pname:maxExtent.width#,
101e5c31af7Sopenharmony_ci    [eq]#pname:maxExtent.height#, and [eq]#pname:maxExtent.depth#, except
102e5c31af7Sopenharmony_ci    when one of the following conditions is true, in which case it may:
103e5c31af7Sopenharmony_ci    instead be `1`:
104e5c31af7Sopenharmony_ci  ** fname:vkGetPhysicalDeviceImageFormatProperties::pname:tiling was
105e5c31af7Sopenharmony_ci     ename:VK_IMAGE_TILING_LINEAR
106e5c31af7Sopenharmony_ciifdef::VK_EXT_image_drm_format_modifier[]
107e5c31af7Sopenharmony_ci  ** slink:VkPhysicalDeviceImageFormatInfo2::pname:tiling was
108e5c31af7Sopenharmony_ci     ename:VK_IMAGE_TILING_DRM_FORMAT_MODIFIER_EXT
109e5c31af7Sopenharmony_ciendif::VK_EXT_image_drm_format_modifier[]
110e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_1,VK_KHR_external_memory_capabilities[]
111e5c31af7Sopenharmony_ci  ** the slink:VkPhysicalDeviceImageFormatInfo2::pname:pNext chain included
112e5c31af7Sopenharmony_ci     a slink:VkPhysicalDeviceExternalImageFormatInfo structure with a handle
113e5c31af7Sopenharmony_ci     type included in the pname:handleTypes member for which mipmap image
114e5c31af7Sopenharmony_ci     support is not required
115e5c31af7Sopenharmony_ciendif::VK_VERSION_1_1,VK_KHR_external_memory_capabilities[]
116e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_1,VK_KHR_sampler_ycbcr_conversion[]
117e5c31af7Sopenharmony_ci  ** image pname:format is one of the
118e5c31af7Sopenharmony_ci     <<formats-requiring-sampler-ycbcr-conversion, formats that require a
119e5c31af7Sopenharmony_ci     sampler Y'C~B~C~R~ conversion>>
120e5c31af7Sopenharmony_ciendif::VK_VERSION_1_1,VK_KHR_sampler_ycbcr_conversion[]
121e5c31af7Sopenharmony_ciifdef::VK_EXT_fragment_density_map[]
122e5c31af7Sopenharmony_ci  ** pname:flags contains ename:VK_IMAGE_CREATE_SUBSAMPLED_BIT_EXT
123e5c31af7Sopenharmony_ciendif::VK_EXT_fragment_density_map[]
124e5c31af7Sopenharmony_ci  * pname:maxArrayLayers is the maximum number of array layers.
125e5c31af7Sopenharmony_ci    pname:maxArrayLayers must: be no less than
126e5c31af7Sopenharmony_ci    slink:VkPhysicalDeviceLimits::pname:maxImageArrayLayers, except when one
127e5c31af7Sopenharmony_ci    of the following conditions is true, in which case it may: instead be
128e5c31af7Sopenharmony_ci    `1`:
129e5c31af7Sopenharmony_ci  ** pname:tiling is ename:VK_IMAGE_TILING_LINEAR
130e5c31af7Sopenharmony_ci  ** pname:tiling is ename:VK_IMAGE_TILING_OPTIMAL and pname:type is
131e5c31af7Sopenharmony_ci     ename:VK_IMAGE_TYPE_3D
132e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_1,VK_KHR_sampler_ycbcr_conversion[]
133e5c31af7Sopenharmony_ci  ** pname:format is one of the
134e5c31af7Sopenharmony_ci     <<formats-requiring-sampler-ycbcr-conversion, formats that require a
135e5c31af7Sopenharmony_ci     sampler Y'C~B~C~R~ conversion>>
136e5c31af7Sopenharmony_ciendif::VK_VERSION_1_1,VK_KHR_sampler_ycbcr_conversion[]
137e5c31af7Sopenharmony_ciifdef::VK_EXT_image_drm_format_modifier[]
138e5c31af7Sopenharmony_ci  * If pname:tiling is ename:VK_IMAGE_TILING_DRM_FORMAT_MODIFIER_EXT, then
139e5c31af7Sopenharmony_ci    pname:maxArrayLayers must: not be 0.
140e5c31af7Sopenharmony_ciendif::VK_EXT_image_drm_format_modifier[]
141e5c31af7Sopenharmony_ci  * pname:sampleCounts is a bitmask of elink:VkSampleCountFlagBits
142e5c31af7Sopenharmony_ci    specifying all the supported sample counts for this image as described
143e5c31af7Sopenharmony_ci    <<features-supported-sample-counts, below>>.
144e5c31af7Sopenharmony_ci  * pname:maxResourceSize is an upper bound on the total image size in
145e5c31af7Sopenharmony_ci    bytes, inclusive of all image subresources.
146e5c31af7Sopenharmony_ci    Implementations may: have an address space limit on total size of a
147e5c31af7Sopenharmony_ci    resource, which is advertised by this property.
148e5c31af7Sopenharmony_ci    pname:maxResourceSize must: be at least 2^31^.
149e5c31af7Sopenharmony_ci
150e5c31af7Sopenharmony_ci[NOTE]
151e5c31af7Sopenharmony_ci.Note
152e5c31af7Sopenharmony_ci====
153e5c31af7Sopenharmony_ciThere is no mechanism to query the size of an image before creating it, to
154e5c31af7Sopenharmony_cicompare that size against pname:maxResourceSize.
155e5c31af7Sopenharmony_ciIf an application attempts to create an image that exceeds this limit, the
156e5c31af7Sopenharmony_cicreation will fail and flink:vkCreateImage will return
157e5c31af7Sopenharmony_ciename:VK_ERROR_OUT_OF_DEVICE_MEMORY.
158e5c31af7Sopenharmony_ciWhile the advertised limit must: be at least 2^31^, it may: not be possible
159e5c31af7Sopenharmony_cito create an image that approaches that size, particularly for
160e5c31af7Sopenharmony_ciename:VK_IMAGE_TYPE_1D.
161e5c31af7Sopenharmony_ci====
162e5c31af7Sopenharmony_ci
163e5c31af7Sopenharmony_ciIf the combination of parameters to
164e5c31af7Sopenharmony_cifname:vkGetPhysicalDeviceImageFormatProperties is not supported by the
165e5c31af7Sopenharmony_ciimplementation for use in flink:vkCreateImage, then all members of
166e5c31af7Sopenharmony_cisname:VkImageFormatProperties will be filled with zero.
167e5c31af7Sopenharmony_ci
168e5c31af7Sopenharmony_ci[NOTE]
169e5c31af7Sopenharmony_ci.Note
170e5c31af7Sopenharmony_ci====
171e5c31af7Sopenharmony_ciFilling sname:VkImageFormatProperties with zero for unsupported formats is
172e5c31af7Sopenharmony_cian exception to the usual rule that output structures have undefined:
173e5c31af7Sopenharmony_cicontents on error.
174e5c31af7Sopenharmony_ciThis exception was unintentional, but is preserved for backwards
175e5c31af7Sopenharmony_cicompatibility.
176e5c31af7Sopenharmony_ci====
177e5c31af7Sopenharmony_ci
178e5c31af7Sopenharmony_ciinclude::{generated}/validity/structs/VkImageFormatProperties.txt[]
179e5c31af7Sopenharmony_ci--
180e5c31af7Sopenharmony_ci
181e5c31af7Sopenharmony_ciifdef::VK_NV_external_memory_capabilities[]
182e5c31af7Sopenharmony_ciinclude::{chapters}/VK_NV_external_memory_capabilities/external_image_format.txt[]
183e5c31af7Sopenharmony_ciendif::VK_NV_external_memory_capabilities[]
184e5c31af7Sopenharmony_ci
185e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_1,VK_KHR_get_physical_device_properties2[]
186e5c31af7Sopenharmony_ci
187e5c31af7Sopenharmony_ci[open,refpage='vkGetPhysicalDeviceImageFormatProperties2',desc='Lists physical device\'s image format capabilities',type='protos']
188e5c31af7Sopenharmony_ci--
189e5c31af7Sopenharmony_ciTo query additional capabilities specific to image types, call:
190e5c31af7Sopenharmony_ci
191e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_1[]
192e5c31af7Sopenharmony_ciinclude::{generated}/api/protos/vkGetPhysicalDeviceImageFormatProperties2.txt[]
193e5c31af7Sopenharmony_ciendif::VK_VERSION_1_1[]
194e5c31af7Sopenharmony_ci
195e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_1+VK_KHR_get_physical_device_properties2[or the equivalent command]
196e5c31af7Sopenharmony_ci
197e5c31af7Sopenharmony_ciifdef::VK_KHR_get_physical_device_properties2[]
198e5c31af7Sopenharmony_ciinclude::{generated}/api/protos/vkGetPhysicalDeviceImageFormatProperties2KHR.txt[]
199e5c31af7Sopenharmony_ciendif::VK_KHR_get_physical_device_properties2[]
200e5c31af7Sopenharmony_ci
201e5c31af7Sopenharmony_ci  * pname:physicalDevice is the physical device from which to query the
202e5c31af7Sopenharmony_ci    image capabilities.
203e5c31af7Sopenharmony_ci  * pname:pImageFormatInfo is a pointer to a
204e5c31af7Sopenharmony_ci    slink:VkPhysicalDeviceImageFormatInfo2 structure describing the
205e5c31af7Sopenharmony_ci    parameters that would be consumed by flink:vkCreateImage.
206e5c31af7Sopenharmony_ci  * pname:pImageFormatProperties is a pointer to a
207e5c31af7Sopenharmony_ci    slink:VkImageFormatProperties2 structure in which capabilities are
208e5c31af7Sopenharmony_ci    returned.
209e5c31af7Sopenharmony_ci
210e5c31af7Sopenharmony_cifname:vkGetPhysicalDeviceImageFormatProperties2 behaves similarly to
211e5c31af7Sopenharmony_ciflink:vkGetPhysicalDeviceImageFormatProperties, with the ability to return
212e5c31af7Sopenharmony_ciextended information in a pname:pNext chain of output structures.
213e5c31af7Sopenharmony_ci
214e5c31af7Sopenharmony_ciifdef::VK_ANDROID_external_memory_android_hardware_buffer[]
215e5c31af7Sopenharmony_ci.Valid Usage
216e5c31af7Sopenharmony_ci****
217e5c31af7Sopenharmony_ci  * [[VUID-vkGetPhysicalDeviceImageFormatProperties2-pNext-01868]]
218e5c31af7Sopenharmony_ci    If the pname:pNext chain of pname:pImageFormatProperties includes a
219e5c31af7Sopenharmony_ci    slink:VkAndroidHardwareBufferUsageANDROID structure, the pname:pNext
220e5c31af7Sopenharmony_ci    chain of pname:pImageFormatInfo must: include a
221e5c31af7Sopenharmony_ci    slink:VkPhysicalDeviceExternalImageFormatInfo structure with
222e5c31af7Sopenharmony_ci    pname:handleType set to
223e5c31af7Sopenharmony_ci    ename:VK_EXTERNAL_MEMORY_HANDLE_TYPE_ANDROID_HARDWARE_BUFFER_BIT_ANDROID
224e5c31af7Sopenharmony_ci****
225e5c31af7Sopenharmony_ciendif::VK_ANDROID_external_memory_android_hardware_buffer[]
226e5c31af7Sopenharmony_ci
227e5c31af7Sopenharmony_ciinclude::{generated}/validity/protos/vkGetPhysicalDeviceImageFormatProperties2.txt[]
228e5c31af7Sopenharmony_ci--
229e5c31af7Sopenharmony_ci
230e5c31af7Sopenharmony_ci[open,refpage='VkPhysicalDeviceImageFormatInfo2',desc='Structure specifying image creation parameters',type='structs']
231e5c31af7Sopenharmony_ci--
232e5c31af7Sopenharmony_ciThe sname:VkPhysicalDeviceImageFormatInfo2 structure is defined as:
233e5c31af7Sopenharmony_ci
234e5c31af7Sopenharmony_ciinclude::{generated}/api/structs/VkPhysicalDeviceImageFormatInfo2.txt[]
235e5c31af7Sopenharmony_ci
236e5c31af7Sopenharmony_ciifdef::VK_KHR_get_physical_device_properties2[]
237e5c31af7Sopenharmony_cior the equivalent
238e5c31af7Sopenharmony_ci
239e5c31af7Sopenharmony_ciinclude::{generated}/api/structs/VkPhysicalDeviceImageFormatInfo2KHR.txt[]
240e5c31af7Sopenharmony_ciendif::VK_KHR_get_physical_device_properties2[]
241e5c31af7Sopenharmony_ci
242e5c31af7Sopenharmony_ci  * pname:sType is the type of this structure.
243e5c31af7Sopenharmony_ci  * pname:pNext is `NULL` or a pointer to a structure extending this
244e5c31af7Sopenharmony_ci    structure.
245e5c31af7Sopenharmony_ci    The pname:pNext chain of sname:VkPhysicalDeviceImageFormatInfo2 is used
246e5c31af7Sopenharmony_ci    to provide additional image parameters to
247e5c31af7Sopenharmony_ci    fname:vkGetPhysicalDeviceImageFormatProperties2.
248e5c31af7Sopenharmony_ci  * pname:format is a elink:VkFormat value indicating the image format,
249e5c31af7Sopenharmony_ci    corresponding to slink:VkImageCreateInfo::pname:format.
250e5c31af7Sopenharmony_ci  * pname:type is a elink:VkImageType value indicating the image type,
251e5c31af7Sopenharmony_ci    corresponding to slink:VkImageCreateInfo::pname:imageType.
252e5c31af7Sopenharmony_ci  * pname:tiling is a elink:VkImageTiling value indicating the image tiling,
253e5c31af7Sopenharmony_ci    corresponding to slink:VkImageCreateInfo::pname:tiling.
254e5c31af7Sopenharmony_ci  * pname:usage is a bitmask of elink:VkImageUsageFlagBits indicating the
255e5c31af7Sopenharmony_ci    intended usage of the image, corresponding to
256e5c31af7Sopenharmony_ci    slink:VkImageCreateInfo::pname:usage.
257e5c31af7Sopenharmony_ci  * pname:flags is a bitmask of elink:VkImageCreateFlagBits indicating
258e5c31af7Sopenharmony_ci    additional parameters of the image, corresponding to
259e5c31af7Sopenharmony_ci    slink:VkImageCreateInfo::pname:flags.
260e5c31af7Sopenharmony_ci
261e5c31af7Sopenharmony_ciThe members of sname:VkPhysicalDeviceImageFormatInfo2 correspond to the
262e5c31af7Sopenharmony_ciarguments to flink:vkGetPhysicalDeviceImageFormatProperties, with
263e5c31af7Sopenharmony_cipname:sType and pname:pNext added for extensibility.
264e5c31af7Sopenharmony_ci
265e5c31af7Sopenharmony_ciifdef::VK_EXT_image_drm_format_modifier[]
266e5c31af7Sopenharmony_ci.Valid Usage
267e5c31af7Sopenharmony_ci****
268e5c31af7Sopenharmony_ci  * [[VUID-VkPhysicalDeviceImageFormatInfo2-tiling-02249]]
269e5c31af7Sopenharmony_ci    pname:tiling must: be ename:VK_IMAGE_TILING_DRM_FORMAT_MODIFIER_EXT if
270e5c31af7Sopenharmony_ci    and only if the pname:pNext chain includes
271e5c31af7Sopenharmony_ci    slink:VkPhysicalDeviceImageDrmFormatModifierInfoEXT
272e5c31af7Sopenharmony_ci  * [[VUID-VkPhysicalDeviceImageFormatInfo2-tiling-02313]]
273e5c31af7Sopenharmony_ci    If pname:tiling is ename:VK_IMAGE_TILING_DRM_FORMAT_MODIFIER_EXT and
274e5c31af7Sopenharmony_ci    pname:flags contains ename:VK_IMAGE_CREATE_MUTABLE_FORMAT_BIT, then the
275e5c31af7Sopenharmony_ci    pname:pNext chain must: include a slink:VkImageFormatListCreateInfo
276e5c31af7Sopenharmony_ci    structure with non-zero pname:viewFormatCount
277e5c31af7Sopenharmony_ci****
278e5c31af7Sopenharmony_ciendif::VK_EXT_image_drm_format_modifier[]
279e5c31af7Sopenharmony_ci
280e5c31af7Sopenharmony_ciinclude::{generated}/validity/structs/VkPhysicalDeviceImageFormatInfo2.txt[]
281e5c31af7Sopenharmony_ci--
282e5c31af7Sopenharmony_ci
283e5c31af7Sopenharmony_ci[open,refpage='VkImageFormatProperties2',desc='Structure specifying an image format properties',type='structs']
284e5c31af7Sopenharmony_ci--
285e5c31af7Sopenharmony_ciThe sname:VkImageFormatProperties2 structure is defined as:
286e5c31af7Sopenharmony_ci
287e5c31af7Sopenharmony_ciinclude::{generated}/api/structs/VkImageFormatProperties2.txt[]
288e5c31af7Sopenharmony_ci
289e5c31af7Sopenharmony_ciifdef::VK_KHR_get_physical_device_properties2[]
290e5c31af7Sopenharmony_cior the equivalent
291e5c31af7Sopenharmony_ci
292e5c31af7Sopenharmony_ciinclude::{generated}/api/structs/VkImageFormatProperties2KHR.txt[]
293e5c31af7Sopenharmony_ciendif::VK_KHR_get_physical_device_properties2[]
294e5c31af7Sopenharmony_ci
295e5c31af7Sopenharmony_ci  * pname:sType is the type of this structure.
296e5c31af7Sopenharmony_ci  * pname:pNext is `NULL` or a pointer to a structure extending this
297e5c31af7Sopenharmony_ci    structure.
298e5c31af7Sopenharmony_ci    The pname:pNext chain of sname:VkImageFormatProperties2 is used to allow
299e5c31af7Sopenharmony_ci    the specification of additional capabilities to be returned from
300e5c31af7Sopenharmony_ci    fname:vkGetPhysicalDeviceImageFormatProperties2.
301e5c31af7Sopenharmony_ci  * pname:imageFormatProperties is a slink:VkImageFormatProperties structure
302e5c31af7Sopenharmony_ci    in which capabilities are returned.
303e5c31af7Sopenharmony_ci
304e5c31af7Sopenharmony_ciIf the combination of parameters to
305e5c31af7Sopenharmony_cifname:vkGetPhysicalDeviceImageFormatProperties2 is not supported by the
306e5c31af7Sopenharmony_ciimplementation for use in flink:vkCreateImage, then all members of
307e5c31af7Sopenharmony_cipname:imageFormatProperties will be filled with zero.
308e5c31af7Sopenharmony_ci
309e5c31af7Sopenharmony_ci[NOTE]
310e5c31af7Sopenharmony_ci.Note
311e5c31af7Sopenharmony_ci====
312e5c31af7Sopenharmony_ciFilling pname:imageFormatProperties with zero for unsupported formats is an
313e5c31af7Sopenharmony_ciexception to the usual rule that output structures have undefined: contents
314e5c31af7Sopenharmony_cion error.
315e5c31af7Sopenharmony_ciThis exception was unintentional, but is preserved for backwards
316e5c31af7Sopenharmony_cicompatibility.
317e5c31af7Sopenharmony_ciThis exeption only applies to pname:imageFormatProperties, not pname:sType,
318e5c31af7Sopenharmony_cipname:pNext, or any structures chained from pname:pNext.
319e5c31af7Sopenharmony_ci====
320e5c31af7Sopenharmony_ci
321e5c31af7Sopenharmony_ciinclude::{generated}/validity/structs/VkImageFormatProperties2.txt[]
322e5c31af7Sopenharmony_ci--
323e5c31af7Sopenharmony_ci
324e5c31af7Sopenharmony_ciifdef::VK_AMD_texture_gather_bias_lod[]
325e5c31af7Sopenharmony_ci[open,refpage='VkTextureLODGatherFormatPropertiesAMD',desc='Structure informing whether or not texture gather bias/LOD functionality is supported for a given image format and a given physical device.',type='structs']
326e5c31af7Sopenharmony_ci--
327e5c31af7Sopenharmony_ciTo determine if texture gather functions that take explicit LOD and/or bias
328e5c31af7Sopenharmony_ciargument values can: be used with a given image format, add a
329e5c31af7Sopenharmony_cislink:VkTextureLODGatherFormatPropertiesAMD structure to the pname:pNext
330e5c31af7Sopenharmony_cichain of the slink:VkImageFormatProperties2 structure in a call to
331e5c31af7Sopenharmony_cifname:vkGetPhysicalDeviceImageFormatProperties2.
332e5c31af7Sopenharmony_ci
333e5c31af7Sopenharmony_ciThe sname:VkTextureLODGatherFormatPropertiesAMD structure is defined as:
334e5c31af7Sopenharmony_ci
335e5c31af7Sopenharmony_ciinclude::{generated}/api/structs/VkTextureLODGatherFormatPropertiesAMD.txt[]
336e5c31af7Sopenharmony_ci
337e5c31af7Sopenharmony_ci  * pname:sType is the type of this structure.
338e5c31af7Sopenharmony_ci  * pname:pNext is `NULL` or a pointer to a structure extending this
339e5c31af7Sopenharmony_ci    structure.
340e5c31af7Sopenharmony_ci  * pname:supportsTextureGatherLODBiasAMD tells if the image format can be
341e5c31af7Sopenharmony_ci    used with texture gather bias/LOD functions, as introduced by the
342e5c31af7Sopenharmony_ci    `apiext:VK_AMD_texture_gather_bias_lod` extension.
343e5c31af7Sopenharmony_ci    This field is set by the implementation.
344e5c31af7Sopenharmony_ci    User-specified value is ignored.
345e5c31af7Sopenharmony_ci
346e5c31af7Sopenharmony_ciinclude::{generated}/validity/structs/VkTextureLODGatherFormatPropertiesAMD.txt[]
347e5c31af7Sopenharmony_ci--
348e5c31af7Sopenharmony_ciendif::VK_AMD_texture_gather_bias_lod[]
349e5c31af7Sopenharmony_ci
350e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_1,VK_KHR_external_memory_capabilities[]
351e5c31af7Sopenharmony_ci[open,refpage='VkPhysicalDeviceExternalImageFormatInfo',desc='Structure specifying external image creation parameters',type='structs']
352e5c31af7Sopenharmony_ci--
353e5c31af7Sopenharmony_ciTo determine the image capabilities compatible with an external memory
354e5c31af7Sopenharmony_cihandle type, add a slink:VkPhysicalDeviceExternalImageFormatInfo structure
355e5c31af7Sopenharmony_cito the pname:pNext chain of the slink:VkPhysicalDeviceImageFormatInfo2
356e5c31af7Sopenharmony_cistructure and a sname:VkExternalImageFormatProperties structure to the
357e5c31af7Sopenharmony_cipname:pNext chain of the slink:VkImageFormatProperties2 structure.
358e5c31af7Sopenharmony_ci
359e5c31af7Sopenharmony_ciThe sname:VkPhysicalDeviceExternalImageFormatInfo structure is defined as:
360e5c31af7Sopenharmony_ci
361e5c31af7Sopenharmony_ciinclude::{generated}/api/structs/VkPhysicalDeviceExternalImageFormatInfo.txt[]
362e5c31af7Sopenharmony_ci
363e5c31af7Sopenharmony_ciifdef::VK_KHR_external_memory_capabilities[]
364e5c31af7Sopenharmony_cior the equivalent
365e5c31af7Sopenharmony_ci
366e5c31af7Sopenharmony_ciinclude::{generated}/api/structs/VkPhysicalDeviceExternalImageFormatInfoKHR.txt[]
367e5c31af7Sopenharmony_ciendif::VK_KHR_external_memory_capabilities[]
368e5c31af7Sopenharmony_ci
369e5c31af7Sopenharmony_ci  * pname:sType is the type of this structure.
370e5c31af7Sopenharmony_ci  * pname:pNext is `NULL` or a pointer to a structure extending this
371e5c31af7Sopenharmony_ci    structure.
372e5c31af7Sopenharmony_ci  * pname:handleType is a elink:VkExternalMemoryHandleTypeFlagBits value
373e5c31af7Sopenharmony_ci    specifying the memory handle type that will be used with the memory
374e5c31af7Sopenharmony_ci    associated with the image.
375e5c31af7Sopenharmony_ci
376e5c31af7Sopenharmony_ciIf pname:handleType is 0, flink:vkGetPhysicalDeviceImageFormatProperties2
377e5c31af7Sopenharmony_ciwill behave as if slink:VkPhysicalDeviceExternalImageFormatInfo was not
378e5c31af7Sopenharmony_cipresent, and slink:VkExternalImageFormatProperties will be ignored.
379e5c31af7Sopenharmony_ci
380e5c31af7Sopenharmony_ciIf pname:handleType is not compatible with the pname:format, pname:type,
381e5c31af7Sopenharmony_cipname:tiling, pname:usage, and pname:flags specified in
382e5c31af7Sopenharmony_cislink:VkPhysicalDeviceImageFormatInfo2, then
383e5c31af7Sopenharmony_ciflink:vkGetPhysicalDeviceImageFormatProperties2 returns
384e5c31af7Sopenharmony_ciename:VK_ERROR_FORMAT_NOT_SUPPORTED.
385e5c31af7Sopenharmony_ci
386e5c31af7Sopenharmony_ciinclude::{generated}/validity/structs/VkPhysicalDeviceExternalImageFormatInfo.txt[]
387e5c31af7Sopenharmony_ci--
388e5c31af7Sopenharmony_ci
389e5c31af7Sopenharmony_ci[open,refpage='VkExternalMemoryHandleTypeFlagBits',desc='Bit specifying external memory handle types',type='enums']
390e5c31af7Sopenharmony_ci--
391e5c31af7Sopenharmony_ciPossible values of
392e5c31af7Sopenharmony_cislink:VkPhysicalDeviceExternalImageFormatInfo::pname:handleType, specifying
393e5c31af7Sopenharmony_cian external memory handle type, are:
394e5c31af7Sopenharmony_ci
395e5c31af7Sopenharmony_ciinclude::{generated}/api/enums/VkExternalMemoryHandleTypeFlagBits.txt[]
396e5c31af7Sopenharmony_ci
397e5c31af7Sopenharmony_ciifdef::VK_KHR_external_memory_capabilities[]
398e5c31af7Sopenharmony_cior the equivalent
399e5c31af7Sopenharmony_ci
400e5c31af7Sopenharmony_ciinclude::{generated}/api/enums/VkExternalMemoryHandleTypeFlagBitsKHR.txt[]
401e5c31af7Sopenharmony_ciendif::VK_KHR_external_memory_capabilities[]
402e5c31af7Sopenharmony_ci
403e5c31af7Sopenharmony_ci  * ename:VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_FD_BIT specifies a POSIX
404e5c31af7Sopenharmony_ci    file descriptor handle that has only limited valid usage outside of
405e5c31af7Sopenharmony_ci    Vulkan and other compatible APIs.
406e5c31af7Sopenharmony_ci    It must: be compatible with the POSIX system calls code:dup, code:dup2,
407e5c31af7Sopenharmony_ci    code:close, and the non-standard system call code:dup3.
408e5c31af7Sopenharmony_ci    Additionally, it must: be transportable over a socket using an
409e5c31af7Sopenharmony_ci    code:SCM_RIGHTS control message.
410e5c31af7Sopenharmony_ci    It owns a reference to the underlying memory resource represented by its
411e5c31af7Sopenharmony_ci    Vulkan memory object.
412e5c31af7Sopenharmony_ci  * ename:VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_BIT specifies an NT
413e5c31af7Sopenharmony_ci    handle that has only limited valid usage outside of Vulkan and other
414e5c31af7Sopenharmony_ci    compatible APIs.
415e5c31af7Sopenharmony_ci    It must: be compatible with the functions code:DuplicateHandle,
416e5c31af7Sopenharmony_ci    code:CloseHandle, code:CompareObjectHandles, code:GetHandleInformation,
417e5c31af7Sopenharmony_ci    and code:SetHandleInformation.
418e5c31af7Sopenharmony_ci    It owns a reference to the underlying memory resource represented by its
419e5c31af7Sopenharmony_ci    Vulkan memory object.
420e5c31af7Sopenharmony_ci  * ename:VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_KMT_BIT specifies a
421e5c31af7Sopenharmony_ci    global share handle that has only limited valid usage outside of Vulkan
422e5c31af7Sopenharmony_ci    and other compatible APIs.
423e5c31af7Sopenharmony_ci    It is not compatible with any native APIs.
424e5c31af7Sopenharmony_ci    It does not own a reference to the underlying memory resource
425e5c31af7Sopenharmony_ci    represented by its Vulkan memory object, and will therefore become
426e5c31af7Sopenharmony_ci    invalid when all Vulkan memory objects associated with it are destroyed.
427e5c31af7Sopenharmony_ci  * ename:VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_TEXTURE_BIT specifies an NT
428e5c31af7Sopenharmony_ci    handle returned by code:IDXGIResource1::code:CreateSharedHandle
429e5c31af7Sopenharmony_ci    referring to a Direct3D 10 or 11 texture resource.
430e5c31af7Sopenharmony_ci    It owns a reference to the memory used by the Direct3D resource.
431e5c31af7Sopenharmony_ci  * ename:VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_TEXTURE_KMT_BIT specifies a
432e5c31af7Sopenharmony_ci    global share handle returned by code:IDXGIResource::code:GetSharedHandle
433e5c31af7Sopenharmony_ci    referring to a Direct3D 10 or 11 texture resource.
434e5c31af7Sopenharmony_ci    It does not own a reference to the underlying Direct3D resource, and
435e5c31af7Sopenharmony_ci    will therefore become invalid when all Vulkan memory objects and
436e5c31af7Sopenharmony_ci    Direct3D resources associated with it are destroyed.
437e5c31af7Sopenharmony_ci  * ename:VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D12_HEAP_BIT specifies an NT
438e5c31af7Sopenharmony_ci    handle returned by code:ID3D12Device::code:CreateSharedHandle referring
439e5c31af7Sopenharmony_ci    to a Direct3D 12 heap resource.
440e5c31af7Sopenharmony_ci    It owns a reference to the resources used by the Direct3D heap.
441e5c31af7Sopenharmony_ci  * ename:VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D12_RESOURCE_BIT specifies an NT
442e5c31af7Sopenharmony_ci    handle returned by code:ID3D12Device::code:CreateSharedHandle referring
443e5c31af7Sopenharmony_ci    to a Direct3D 12 committed resource.
444e5c31af7Sopenharmony_ci    It owns a reference to the memory used by the Direct3D resource.
445e5c31af7Sopenharmony_ciifdef::VK_EXT_external_memory_host[]
446e5c31af7Sopenharmony_ci  * ename:VK_EXTERNAL_MEMORY_HANDLE_TYPE_HOST_ALLOCATION_BIT_EXT specifies a
447e5c31af7Sopenharmony_ci    host pointer returned by a host memory allocation command.
448e5c31af7Sopenharmony_ci    It does not own a reference to the underlying memory resource, and will
449e5c31af7Sopenharmony_ci    therefore become invalid if the host memory is freed.
450e5c31af7Sopenharmony_ci  * ename:VK_EXTERNAL_MEMORY_HANDLE_TYPE_HOST_MAPPED_FOREIGN_MEMORY_BIT_EXT
451e5c31af7Sopenharmony_ci    specifies a host pointer to _host mapped foreign memory_.
452e5c31af7Sopenharmony_ci    It does not own a reference to the underlying memory resource, and will
453e5c31af7Sopenharmony_ci    therefore become invalid if the foreign memory is unmapped or otherwise
454e5c31af7Sopenharmony_ci    becomes no longer available.
455e5c31af7Sopenharmony_ciendif::VK_EXT_external_memory_host[]
456e5c31af7Sopenharmony_ciifdef::VK_EXT_external_memory_dma_buf[]
457e5c31af7Sopenharmony_ci  * ename:VK_EXTERNAL_MEMORY_HANDLE_TYPE_DMA_BUF_BIT_EXT is a file
458e5c31af7Sopenharmony_ci    descriptor for a Linux dma_buf.
459e5c31af7Sopenharmony_ci    It owns a reference to the underlying memory resource represented by its
460e5c31af7Sopenharmony_ci    Vulkan memory object.
461e5c31af7Sopenharmony_ciendif::VK_EXT_external_memory_dma_buf[]
462e5c31af7Sopenharmony_ciifdef::VK_ANDROID_external_memory_android_hardware_buffer[]
463e5c31af7Sopenharmony_ci  * ename:VK_EXTERNAL_MEMORY_HANDLE_TYPE_ANDROID_HARDWARE_BUFFER_BIT_ANDROID
464e5c31af7Sopenharmony_ci    specifies an basetype:AHardwareBuffer object defined by the Android NDK.
465e5c31af7Sopenharmony_ci    See <<memory-external-android-hardware-buffer,Android Hardware Buffers>>
466e5c31af7Sopenharmony_ci    for more details of this handle type.
467e5c31af7Sopenharmony_ciendif::VK_ANDROID_external_memory_android_hardware_buffer[]
468e5c31af7Sopenharmony_ciifdef::VK_FUCHSIA_external_memory[]
469e5c31af7Sopenharmony_ci  * ename:VK_EXTERNAL_MEMORY_HANDLE_TYPE_ZIRCON_VMO_BIT_FUCHSIA is a Zircon
470e5c31af7Sopenharmony_ci    handle to a virtual memory object.
471e5c31af7Sopenharmony_ciendif::VK_FUCHSIA_external_memory[]
472e5c31af7Sopenharmony_ciifdef::VK_NV_external_memory_rdma[]
473e5c31af7Sopenharmony_ci  * ename:VK_EXTERNAL_MEMORY_HANDLE_TYPE_RDMA_ADDRESS_BIT_NV is a handle to
474e5c31af7Sopenharmony_ci    an allocation accessible by remote devices.
475e5c31af7Sopenharmony_ci    It owns a reference to the underlying memory resource represented by its
476e5c31af7Sopenharmony_ci    Vulkan memory object.
477e5c31af7Sopenharmony_ciendif::VK_NV_external_memory_rdma[]
478e5c31af7Sopenharmony_ci
479e5c31af7Sopenharmony_ci<<<
480e5c31af7Sopenharmony_ci
481e5c31af7Sopenharmony_ciSome external memory handle types can only be shared within the same
482e5c31af7Sopenharmony_ciunderlying physical device and/or the same driver version, as defined in the
483e5c31af7Sopenharmony_cifollowing table:
484e5c31af7Sopenharmony_ci
485e5c31af7Sopenharmony_ci[[external-memory-handle-types-compatibility]]
486e5c31af7Sopenharmony_ci.External memory handle types compatibility
487e5c31af7Sopenharmony_ci|====
488e5c31af7Sopenharmony_ci| Handle type | sname:VkPhysicalDeviceIDProperties{wbro}::pname:driverUUID | sname:VkPhysicalDeviceIDProperties{wbro}::pname:deviceUUID
489e5c31af7Sopenharmony_ci| ename:VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_FD_BIT | Must match | Must match
490e5c31af7Sopenharmony_ci| ename:VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_BIT | Must match | Must match
491e5c31af7Sopenharmony_ci| ename:VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_KMT_BIT | Must match | Must match
492e5c31af7Sopenharmony_ci| ename:VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_TEXTURE_BIT | Must match | Must match
493e5c31af7Sopenharmony_ci| ename:VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_TEXTURE_KMT_BIT | Must match | Must match
494e5c31af7Sopenharmony_ci| ename:VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D12_HEAP_BIT | Must match | Must match
495e5c31af7Sopenharmony_ci| ename:VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D12_RESOURCE_BIT | Must match | Must match
496e5c31af7Sopenharmony_ciifdef::VK_EXT_external_memory_host[]
497e5c31af7Sopenharmony_ci| ename:VK_EXTERNAL_MEMORY_HANDLE_TYPE_HOST_ALLOCATION_BIT_EXT | No restriction | No restriction
498e5c31af7Sopenharmony_ci| ename:VK_EXTERNAL_MEMORY_HANDLE_TYPE_HOST_MAPPED_FOREIGN_MEMORY_BIT_EXT | No restriction | No restriction
499e5c31af7Sopenharmony_ciendif::VK_EXT_external_memory_host[]
500e5c31af7Sopenharmony_ciifdef::VK_EXT_external_memory_dma_buf[]
501e5c31af7Sopenharmony_ci| ename:VK_EXTERNAL_MEMORY_HANDLE_TYPE_DMA_BUF_BIT_EXT | No restriction | No restriction
502e5c31af7Sopenharmony_ciendif::VK_EXT_external_memory_dma_buf[]
503e5c31af7Sopenharmony_ciifdef::VK_ANDROID_external_memory_android_hardware_buffer[]
504e5c31af7Sopenharmony_ci| ename:VK_EXTERNAL_MEMORY_HANDLE_TYPE_ANDROID_HARDWARE_BUFFER_BIT_ANDROID | No restriction | No restriction
505e5c31af7Sopenharmony_ciendif::VK_ANDROID_external_memory_android_hardware_buffer[]
506e5c31af7Sopenharmony_ciifdef::VK_FUCHSIA_external_memory[]
507e5c31af7Sopenharmony_ci| ename:VK_EXTERNAL_MEMORY_HANDLE_TYPE_ZIRCON_VMO_BIT_FUCHSIA | No restriction | No restriction
508e5c31af7Sopenharmony_ciendif::VK_FUCHSIA_external_memory[]
509e5c31af7Sopenharmony_ciifdef::VK_NV_external_memory_rdma[]
510e5c31af7Sopenharmony_ci| ename:VK_EXTERNAL_MEMORY_HANDLE_TYPE_RDMA_ADDRESS_BIT_NV | No restriction | No restriction
511e5c31af7Sopenharmony_ciendif::VK_NV_external_memory_rdma[]
512e5c31af7Sopenharmony_ci|====
513e5c31af7Sopenharmony_ci
514e5c31af7Sopenharmony_ciifdef::VK_EXT_external_memory_host[]
515e5c31af7Sopenharmony_ci[NOTE]
516e5c31af7Sopenharmony_ci.Note
517e5c31af7Sopenharmony_ci====
518e5c31af7Sopenharmony_ciThe above table does not restrict the drivers and devices with which
519e5c31af7Sopenharmony_ciename:VK_EXTERNAL_MEMORY_HANDLE_TYPE_HOST_ALLOCATION_BIT_EXT and
520e5c31af7Sopenharmony_ciename:VK_EXTERNAL_MEMORY_HANDLE_TYPE_HOST_MAPPED_FOREIGN_MEMORY_BIT_EXT may:
521e5c31af7Sopenharmony_cibe shared, as these handle types inherently mean memory that does not come
522e5c31af7Sopenharmony_cifrom the same device, as they import memory from the host or a foreign
523e5c31af7Sopenharmony_cidevice, respectively.
524e5c31af7Sopenharmony_ci====
525e5c31af7Sopenharmony_ciendif::VK_EXT_external_memory_host[]
526e5c31af7Sopenharmony_ci
527e5c31af7Sopenharmony_ciifdef::VK_EXT_external_memory_dma_buf[]
528e5c31af7Sopenharmony_ci[NOTE]
529e5c31af7Sopenharmony_ci.Note
530e5c31af7Sopenharmony_ci====
531e5c31af7Sopenharmony_ciEven though the above table does not restrict the drivers and devices with
532e5c31af7Sopenharmony_ciwhich ename:VK_EXTERNAL_MEMORY_HANDLE_TYPE_DMA_BUF_BIT_EXT may: be shared,
533e5c31af7Sopenharmony_ciquery mechanisms exist in the Vulkan API that prevent the import of
534e5c31af7Sopenharmony_ciincompatible dma-bufs (such as flink:vkGetMemoryFdPropertiesKHR) and that
535e5c31af7Sopenharmony_ciprevent incompatible usage of dma-bufs (such as
536e5c31af7Sopenharmony_cislink:VkPhysicalDeviceExternalBufferInfo and
537e5c31af7Sopenharmony_cislink:VkPhysicalDeviceExternalImageFormatInfo).
538e5c31af7Sopenharmony_ci====
539e5c31af7Sopenharmony_ciendif::VK_EXT_external_memory_dma_buf[]
540e5c31af7Sopenharmony_ci--
541e5c31af7Sopenharmony_ci
542e5c31af7Sopenharmony_ci[open,refpage='VkExternalMemoryHandleTypeFlags',desc='Bitmask of VkExternalMemoryHandleTypeFlagBits',type='flags']
543e5c31af7Sopenharmony_ci--
544e5c31af7Sopenharmony_ciinclude::{generated}/api/flags/VkExternalMemoryHandleTypeFlags.txt[]
545e5c31af7Sopenharmony_ci
546e5c31af7Sopenharmony_ciifdef::VK_KHR_external_memory_capabilities[]
547e5c31af7Sopenharmony_cior the equivalent
548e5c31af7Sopenharmony_ci
549e5c31af7Sopenharmony_ciinclude::{generated}/api/flags/VkExternalMemoryHandleTypeFlagsKHR.txt[]
550e5c31af7Sopenharmony_ciendif::VK_KHR_external_memory_capabilities[]
551e5c31af7Sopenharmony_ci
552e5c31af7Sopenharmony_citname:VkExternalMemoryHandleTypeFlags is a bitmask type for setting a mask
553e5c31af7Sopenharmony_ciof zero or more elink:VkExternalMemoryHandleTypeFlagBits.
554e5c31af7Sopenharmony_ci--
555e5c31af7Sopenharmony_ci
556e5c31af7Sopenharmony_ci[open,refpage='VkExternalImageFormatProperties',desc='Structure specifying supported external handle properties',type='structs']
557e5c31af7Sopenharmony_ci--
558e5c31af7Sopenharmony_ciThe sname:VkExternalImageFormatProperties structure is defined as:
559e5c31af7Sopenharmony_ci
560e5c31af7Sopenharmony_ciinclude::{generated}/api/structs/VkExternalImageFormatProperties.txt[]
561e5c31af7Sopenharmony_ci
562e5c31af7Sopenharmony_ciifdef::VK_KHR_external_memory_capabilities[]
563e5c31af7Sopenharmony_cior the equivalent
564e5c31af7Sopenharmony_ci
565e5c31af7Sopenharmony_ciinclude::{generated}/api/structs/VkExternalImageFormatPropertiesKHR.txt[]
566e5c31af7Sopenharmony_ciendif::VK_KHR_external_memory_capabilities[]
567e5c31af7Sopenharmony_ci
568e5c31af7Sopenharmony_ci  * pname:sType is the type of this structure.
569e5c31af7Sopenharmony_ci  * pname:pNext is `NULL` or a pointer to a structure extending this
570e5c31af7Sopenharmony_ci    structure.
571e5c31af7Sopenharmony_ci  * pname:externalMemoryProperties is a slink:VkExternalMemoryProperties
572e5c31af7Sopenharmony_ci    structure specifying various capabilities of the external handle type
573e5c31af7Sopenharmony_ci    when used with the specified image creation parameters.
574e5c31af7Sopenharmony_ci
575e5c31af7Sopenharmony_ciinclude::{generated}/validity/structs/VkExternalImageFormatProperties.txt[]
576e5c31af7Sopenharmony_ci--
577e5c31af7Sopenharmony_ci
578e5c31af7Sopenharmony_ci[open,refpage='VkExternalMemoryProperties',desc='Structure specifying external memory handle type capabilities',type='structs']
579e5c31af7Sopenharmony_ci--
580e5c31af7Sopenharmony_ciThe sname:VkExternalMemoryProperties structure is defined as:
581e5c31af7Sopenharmony_ci
582e5c31af7Sopenharmony_ciinclude::{generated}/api/structs/VkExternalMemoryProperties.txt[]
583e5c31af7Sopenharmony_ci
584e5c31af7Sopenharmony_ciifdef::VK_KHR_external_memory_capabilities[]
585e5c31af7Sopenharmony_cior the equivalent
586e5c31af7Sopenharmony_ci
587e5c31af7Sopenharmony_ciinclude::{generated}/api/structs/VkExternalMemoryPropertiesKHR.txt[]
588e5c31af7Sopenharmony_ciendif::VK_KHR_external_memory_capabilities[]
589e5c31af7Sopenharmony_ci
590e5c31af7Sopenharmony_ci  * pname:externalMemoryFeatures is a bitmask of
591e5c31af7Sopenharmony_ci    elink:VkExternalMemoryFeatureFlagBits specifying the features of
592e5c31af7Sopenharmony_ci    pname:handleType.
593e5c31af7Sopenharmony_ci  * pname:exportFromImportedHandleTypes is a bitmask of
594e5c31af7Sopenharmony_ci    elink:VkExternalMemoryHandleTypeFlagBits specifying which types of
595e5c31af7Sopenharmony_ci    imported handle pname:handleType can: be exported from.
596e5c31af7Sopenharmony_ci  * pname:compatibleHandleTypes is a bitmask of
597e5c31af7Sopenharmony_ci    elink:VkExternalMemoryHandleTypeFlagBits specifying handle types which
598e5c31af7Sopenharmony_ci    can: be specified at the same time as pname:handleType when creating an
599e5c31af7Sopenharmony_ci    image compatible with external memory.
600e5c31af7Sopenharmony_ci
601e5c31af7Sopenharmony_cipname:compatibleHandleTypes must: include at least pname:handleType.
602e5c31af7Sopenharmony_ciInclusion of a handle type in pname:compatibleHandleTypes does not imply the
603e5c31af7Sopenharmony_civalues returned in slink:VkImageFormatProperties2 will be the same when
604e5c31af7Sopenharmony_cislink:VkPhysicalDeviceExternalImageFormatInfo::pname:handleType is set to
605e5c31af7Sopenharmony_cithat type.
606e5c31af7Sopenharmony_ciThe application is responsible for querying the capabilities of all handle
607e5c31af7Sopenharmony_citypes intended for concurrent use in a single image and intersecting them to
608e5c31af7Sopenharmony_ciobtain the compatible set of capabilities.
609e5c31af7Sopenharmony_ci
610e5c31af7Sopenharmony_ciinclude::{generated}/validity/structs/VkExternalMemoryProperties.txt[]
611e5c31af7Sopenharmony_ci--
612e5c31af7Sopenharmony_ci
613e5c31af7Sopenharmony_ci[open,refpage='VkExternalMemoryFeatureFlagBits',desc='Bitmask specifying features of an external memory handle type',type='enums']
614e5c31af7Sopenharmony_ci--
615e5c31af7Sopenharmony_ciBits which may: be set in
616e5c31af7Sopenharmony_cislink:VkExternalMemoryProperties::pname:externalMemoryFeatures, specifying
617e5c31af7Sopenharmony_cifeatures of an external memory handle type, are:
618e5c31af7Sopenharmony_ci
619e5c31af7Sopenharmony_ciinclude::{generated}/api/enums/VkExternalMemoryFeatureFlagBits.txt[]
620e5c31af7Sopenharmony_ci
621e5c31af7Sopenharmony_ciifdef::VK_KHR_external_memory_capabilities[]
622e5c31af7Sopenharmony_cior the equivalent
623e5c31af7Sopenharmony_ci
624e5c31af7Sopenharmony_ciinclude::{generated}/api/enums/VkExternalMemoryFeatureFlagBitsKHR.txt[]
625e5c31af7Sopenharmony_ciendif::VK_KHR_external_memory_capabilities[]
626e5c31af7Sopenharmony_ci
627e5c31af7Sopenharmony_ci  * ename:VK_EXTERNAL_MEMORY_FEATURE_DEDICATED_ONLY_BIT specifies that
628e5c31af7Sopenharmony_ci    images or buffers created with the specified parameters and handle type
629e5c31af7Sopenharmony_ci    must: use the mechanisms defined by slink:VkMemoryDedicatedRequirements
630e5c31af7Sopenharmony_ci    and slink:VkMemoryDedicatedAllocateInfo to create (or import) a
631e5c31af7Sopenharmony_ci    dedicated allocation for the image or buffer.
632e5c31af7Sopenharmony_ci  * ename:VK_EXTERNAL_MEMORY_FEATURE_EXPORTABLE_BIT specifies that handles
633e5c31af7Sopenharmony_ci    of this type can: be exported from Vulkan memory objects.
634e5c31af7Sopenharmony_ci  * ename:VK_EXTERNAL_MEMORY_FEATURE_IMPORTABLE_BIT specifies that handles
635e5c31af7Sopenharmony_ci    of this type can: be imported as Vulkan memory objects.
636e5c31af7Sopenharmony_ci
637e5c31af7Sopenharmony_ciBecause their semantics in external APIs roughly align with that of an image
638e5c31af7Sopenharmony_cior buffer with a dedicated allocation in Vulkan, implementations are
639e5c31af7Sopenharmony_cirequired: to report ename:VK_EXTERNAL_MEMORY_FEATURE_DEDICATED_ONLY_BIT for
640e5c31af7Sopenharmony_cithe following external handle types:
641e5c31af7Sopenharmony_ci
642e5c31af7Sopenharmony_ci  * ename:VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_TEXTURE_BIT
643e5c31af7Sopenharmony_ci  * ename:VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_TEXTURE_KMT_BIT
644e5c31af7Sopenharmony_ci  * ename:VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D12_RESOURCE_BIT
645e5c31af7Sopenharmony_ciifdef::VK_ANDROID_external_memory_android_hardware_buffer[]
646e5c31af7Sopenharmony_ci  * ename:VK_EXTERNAL_MEMORY_HANDLE_TYPE_ANDROID_HARDWARE_BUFFER_BIT_ANDROID
647e5c31af7Sopenharmony_ci    for images only
648e5c31af7Sopenharmony_ciendif::VK_ANDROID_external_memory_android_hardware_buffer[]
649e5c31af7Sopenharmony_ci
650e5c31af7Sopenharmony_ciifdef::VK_ANDROID_external_memory_android_hardware_buffer[]
651e5c31af7Sopenharmony_ciImplementations must: not report
652e5c31af7Sopenharmony_ciename:VK_EXTERNAL_MEMORY_FEATURE_DEDICATED_ONLY_BIT for buffers with
653e5c31af7Sopenharmony_ciexternal handle type
654e5c31af7Sopenharmony_ciename:VK_EXTERNAL_MEMORY_HANDLE_TYPE_ANDROID_HARDWARE_BUFFER_BIT_ANDROID.
655e5c31af7Sopenharmony_ciendif::VK_ANDROID_external_memory_android_hardware_buffer[]
656e5c31af7Sopenharmony_ciifdef::VK_EXT_external_memory_host[]
657e5c31af7Sopenharmony_ciImplementations must: not report
658e5c31af7Sopenharmony_ciename:VK_EXTERNAL_MEMORY_FEATURE_DEDICATED_ONLY_BIT for images or buffers
659e5c31af7Sopenharmony_ciwith external handle type
660e5c31af7Sopenharmony_ciename:VK_EXTERNAL_MEMORY_HANDLE_TYPE_HOST_ALLOCATION_BIT_EXT, or
661e5c31af7Sopenharmony_ciename:VK_EXTERNAL_MEMORY_HANDLE_TYPE_HOST_MAPPED_FOREIGN_MEMORY_BIT_EXT.
662e5c31af7Sopenharmony_ciendif::VK_EXT_external_memory_host[]
663e5c31af7Sopenharmony_ci
664e5c31af7Sopenharmony_ci--
665e5c31af7Sopenharmony_ci
666e5c31af7Sopenharmony_ci[open,refpage='VkExternalMemoryFeatureFlags',desc='Bitmask of VkExternalMemoryFeatureFlagBits',type='flags']
667e5c31af7Sopenharmony_ci--
668e5c31af7Sopenharmony_ciinclude::{generated}/api/flags/VkExternalMemoryFeatureFlags.txt[]
669e5c31af7Sopenharmony_ci
670e5c31af7Sopenharmony_ciifdef::VK_KHR_external_memory_capabilities[]
671e5c31af7Sopenharmony_cior the equivalent
672e5c31af7Sopenharmony_ci
673e5c31af7Sopenharmony_ciinclude::{generated}/api/flags/VkExternalMemoryFeatureFlagsKHR.txt[]
674e5c31af7Sopenharmony_ciendif::VK_KHR_external_memory_capabilities[]
675e5c31af7Sopenharmony_ci
676e5c31af7Sopenharmony_citname:VkExternalMemoryFeatureFlags is a bitmask type for setting a mask of
677e5c31af7Sopenharmony_cizero or more elink:VkExternalMemoryFeatureFlagBits.
678e5c31af7Sopenharmony_ci--
679e5c31af7Sopenharmony_ci
680e5c31af7Sopenharmony_ciendif::VK_VERSION_1_1,VK_KHR_external_memory_capabilities[]
681e5c31af7Sopenharmony_ci
682e5c31af7Sopenharmony_ciifdef::VK_EXT_image_drm_format_modifier[]
683e5c31af7Sopenharmony_ci[open,refpage='VkPhysicalDeviceImageDrmFormatModifierInfoEXT',desc='Structure specifying a DRM format modifier as image creation parameter',type='structs']
684e5c31af7Sopenharmony_ci--
685e5c31af7Sopenharmony_ciTo query the image capabilities that are compatible with a
686e5c31af7Sopenharmony_ci<<glossary-drm-format-modifier,Linux DRM format modifier>>, set
687e5c31af7Sopenharmony_cislink:VkPhysicalDeviceImageFormatInfo2::pname:tiling to
688e5c31af7Sopenharmony_ciename:VK_IMAGE_TILING_DRM_FORMAT_MODIFIER_EXT and add a
689e5c31af7Sopenharmony_cislink:VkPhysicalDeviceImageDrmFormatModifierInfoEXT structure to the
690e5c31af7Sopenharmony_cipname:pNext chain of slink:VkPhysicalDeviceImageFormatInfo2.
691e5c31af7Sopenharmony_ci
692e5c31af7Sopenharmony_ciThe slink:VkPhysicalDeviceImageDrmFormatModifierInfoEXT structure is defined
693e5c31af7Sopenharmony_cias:
694e5c31af7Sopenharmony_ci
695e5c31af7Sopenharmony_ciinclude::{generated}/api/structs/VkPhysicalDeviceImageDrmFormatModifierInfoEXT.txt[]
696e5c31af7Sopenharmony_ci
697e5c31af7Sopenharmony_ci  * pname:sType is the type of this structure.
698e5c31af7Sopenharmony_ci  * pname:pNext is `NULL` or a pointer to a structure extending this
699e5c31af7Sopenharmony_ci    structure.
700e5c31af7Sopenharmony_ci  * pname:drmFormatModifier is the image's _Linux DRM format modifier_,
701e5c31af7Sopenharmony_ci    corresponding to
702e5c31af7Sopenharmony_ci    slink:VkImageDrmFormatModifierExplicitCreateInfoEXT::pname:modifier or
703e5c31af7Sopenharmony_ci    to slink:VkImageDrmFormatModifierListCreateInfoEXT::pname:pModifiers.
704e5c31af7Sopenharmony_ci  * pname:sharingMode specifies how the image will be accessed by multiple
705e5c31af7Sopenharmony_ci    queue families.
706e5c31af7Sopenharmony_ci  * pname:queueFamilyIndexCount is the number of entries in the
707e5c31af7Sopenharmony_ci    pname:pQueueFamilyIndices array.
708e5c31af7Sopenharmony_ci  * pname:pQueueFamilyIndices is a pointer to an array of queue families
709e5c31af7Sopenharmony_ci    that will access the image.
710e5c31af7Sopenharmony_ci    It is ignored if pname:sharingMode is not
711e5c31af7Sopenharmony_ci    ename:VK_SHARING_MODE_CONCURRENT.
712e5c31af7Sopenharmony_ci
713e5c31af7Sopenharmony_ciIf the pname:drmFormatModifier is incompatible with the parameters specified
714e5c31af7Sopenharmony_ciin slink:VkPhysicalDeviceImageFormatInfo2 and its pname:pNext chain, then
715e5c31af7Sopenharmony_ciflink:vkGetPhysicalDeviceImageFormatProperties2 returns
716e5c31af7Sopenharmony_ciename:VK_ERROR_FORMAT_NOT_SUPPORTED.
717e5c31af7Sopenharmony_ciThe implementation must: support the query of any pname:drmFormatModifier,
718e5c31af7Sopenharmony_ciincluding unknown and invalid modifier values.
719e5c31af7Sopenharmony_ci
720e5c31af7Sopenharmony_ci.Valid Usage
721e5c31af7Sopenharmony_ci****
722e5c31af7Sopenharmony_ci  * [[VUID-VkPhysicalDeviceImageDrmFormatModifierInfoEXT-sharingMode-02314]]
723e5c31af7Sopenharmony_ci    If pname:sharingMode is ename:VK_SHARING_MODE_CONCURRENT, then
724e5c31af7Sopenharmony_ci    pname:pQueueFamilyIndices must: be a valid pointer to an array of
725e5c31af7Sopenharmony_ci    pname:queueFamilyIndexCount code:uint32_t values
726e5c31af7Sopenharmony_ci  * [[VUID-VkPhysicalDeviceImageDrmFormatModifierInfoEXT-sharingMode-02315]]
727e5c31af7Sopenharmony_ci    If pname:sharingMode is ename:VK_SHARING_MODE_CONCURRENT, then
728e5c31af7Sopenharmony_ci    pname:queueFamilyIndexCount must: be greater than `1`
729e5c31af7Sopenharmony_ci  * [[VUID-VkPhysicalDeviceImageDrmFormatModifierInfoEXT-sharingMode-02316]]
730e5c31af7Sopenharmony_ci    If pname:sharingMode is ename:VK_SHARING_MODE_CONCURRENT, each element
731e5c31af7Sopenharmony_ci    of pname:pQueueFamilyIndices must: be unique and must: be less than the
732e5c31af7Sopenharmony_ci    pname:pQueueFamilyPropertyCount returned by
733e5c31af7Sopenharmony_ci    flink:vkGetPhysicalDeviceQueueFamilyProperties2 for the
734e5c31af7Sopenharmony_ci    pname:physicalDevice that was used to create pname:device
735e5c31af7Sopenharmony_ci****
736e5c31af7Sopenharmony_ci
737e5c31af7Sopenharmony_ciinclude::{generated}/validity/structs/VkPhysicalDeviceImageDrmFormatModifierInfoEXT.txt[]
738e5c31af7Sopenharmony_ci--
739e5c31af7Sopenharmony_ciendif::VK_EXT_image_drm_format_modifier[]
740e5c31af7Sopenharmony_ci
741e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_1,VK_KHR_sampler_ycbcr_conversion[]
742e5c31af7Sopenharmony_ci
743e5c31af7Sopenharmony_ci[open,refpage='VkSamplerYcbcrConversionImageFormatProperties',desc='Structure specifying combined image sampler descriptor count for multi-planar images',type='structs']
744e5c31af7Sopenharmony_ci--
745e5c31af7Sopenharmony_ciTo determine the number of combined image samplers required to support a
746e5c31af7Sopenharmony_cimulti-planar format, add slink:VkSamplerYcbcrConversionImageFormatProperties
747e5c31af7Sopenharmony_cito the pname:pNext chain of the slink:VkImageFormatProperties2 structure in
748e5c31af7Sopenharmony_cia call to fname:vkGetPhysicalDeviceImageFormatProperties2.
749e5c31af7Sopenharmony_ci
750e5c31af7Sopenharmony_ciThe sname:VkSamplerYcbcrConversionImageFormatProperties structure is defined
751e5c31af7Sopenharmony_cias:
752e5c31af7Sopenharmony_ci
753e5c31af7Sopenharmony_ciinclude::{generated}/api/structs/VkSamplerYcbcrConversionImageFormatProperties.txt[]
754e5c31af7Sopenharmony_ci
755e5c31af7Sopenharmony_ciifdef::VK_KHR_sampler_ycbcr_conversion[]
756e5c31af7Sopenharmony_cior the equivalent
757e5c31af7Sopenharmony_ci
758e5c31af7Sopenharmony_ciinclude::{generated}/api/structs/VkSamplerYcbcrConversionImageFormatPropertiesKHR.txt[]
759e5c31af7Sopenharmony_ciendif::VK_KHR_sampler_ycbcr_conversion[]
760e5c31af7Sopenharmony_ci
761e5c31af7Sopenharmony_ci  * pname:sType is the type of this structure.
762e5c31af7Sopenharmony_ci  * pname:pNext is `NULL` or a pointer to a structure extending this
763e5c31af7Sopenharmony_ci    structure.
764e5c31af7Sopenharmony_ci  * pname:combinedImageSamplerDescriptorCount is the number of combined
765e5c31af7Sopenharmony_ci    image sampler descriptors that the implementation uses to access the
766e5c31af7Sopenharmony_ci    format.
767e5c31af7Sopenharmony_ci
768e5c31af7Sopenharmony_ciinclude::{generated}/validity/structs/VkSamplerYcbcrConversionImageFormatProperties.txt[]
769e5c31af7Sopenharmony_ci--
770e5c31af7Sopenharmony_ci
771e5c31af7Sopenharmony_cipname:combinedImageSamplerDescriptorCount is a number between 1 and the
772e5c31af7Sopenharmony_cinumber of planes in the format.
773e5c31af7Sopenharmony_ciA descriptor set layout binding with immutable {YCbCr} conversion samplers
774e5c31af7Sopenharmony_ciwill have a maximum pname:combinedImageSamplerDescriptorCount which is the
775e5c31af7Sopenharmony_cimaximum across all formats supported by its samplers of the
776e5c31af7Sopenharmony_cipname:combinedImageSamplerDescriptorCount for each format.
777e5c31af7Sopenharmony_ciDescriptor sets with that layout will internally use that maximum
778e5c31af7Sopenharmony_cipname:combinedImageSamplerDescriptorCount descriptors for each descriptor in
779e5c31af7Sopenharmony_cithe binding.
780e5c31af7Sopenharmony_ciThis expanded number of descriptors will be consumed from the descriptor
781e5c31af7Sopenharmony_cipool when a descriptor set is allocated, and counts towards the
782e5c31af7Sopenharmony_cipname:maxDescriptorSetSamplers, pname:maxDescriptorSetSampledImages,
783e5c31af7Sopenharmony_cipname:maxPerStageDescriptorSamplers, and
784e5c31af7Sopenharmony_cipname:maxPerStageDescriptorSampledImages limits.
785e5c31af7Sopenharmony_ci
786e5c31af7Sopenharmony_ci.Note
787e5c31af7Sopenharmony_ci[NOTE]
788e5c31af7Sopenharmony_ci====
789e5c31af7Sopenharmony_ciAll descriptors in a binding use the same maximum
790e5c31af7Sopenharmony_cipname:combinedImageSamplerDescriptorCount descriptors to allow
791e5c31af7Sopenharmony_ciimplementations to use a uniform stride for dynamic indexing of the
792e5c31af7Sopenharmony_cidescriptors in the binding.
793e5c31af7Sopenharmony_ci
794e5c31af7Sopenharmony_ciFor example, consider a descriptor set layout binding with two descriptors
795e5c31af7Sopenharmony_ciand immutable samplers for multi-planar formats that have
796e5c31af7Sopenharmony_cisname:VkSamplerYcbcrConversionImageFormatProperties::pname:combinedImageSamplerDescriptorCount
797e5c31af7Sopenharmony_civalues of `2` and `3` respectively.
798e5c31af7Sopenharmony_ciThere are two descriptors in the binding and the maximum
799e5c31af7Sopenharmony_cipname:combinedImageSamplerDescriptorCount is `3`, so descriptor sets with
800e5c31af7Sopenharmony_cithis layout consume `6` descriptors from the descriptor pool.
801e5c31af7Sopenharmony_ciTo create a descriptor pool that allows allocating four descriptor sets with
802e5c31af7Sopenharmony_cithis layout, pname:descriptorCount must be at least `24`.
803e5c31af7Sopenharmony_ci====
804e5c31af7Sopenharmony_ci
805e5c31af7Sopenharmony_ciendif::VK_VERSION_1_1,VK_KHR_sampler_ycbcr_conversion[]
806e5c31af7Sopenharmony_ci
807e5c31af7Sopenharmony_ciifdef::VK_ANDROID_external_memory_android_hardware_buffer[]
808e5c31af7Sopenharmony_ci
809e5c31af7Sopenharmony_ci[open,refpage='VkAndroidHardwareBufferUsageANDROID',desc='Struct containing Android hardware buffer usage flags',type='structs']
810e5c31af7Sopenharmony_ci--
811e5c31af7Sopenharmony_ciTo obtain optimal Android hardware buffer usage flags for specific image
812e5c31af7Sopenharmony_cicreation parameters, add a sname:VkAndroidHardwareBufferUsageANDROID
813e5c31af7Sopenharmony_cistructure to the pname:pNext chain of a slink:VkImageFormatProperties2
814e5c31af7Sopenharmony_cistructure passed to flink:vkGetPhysicalDeviceImageFormatProperties2.
815e5c31af7Sopenharmony_ciThis structure is defined as:
816e5c31af7Sopenharmony_ci
817e5c31af7Sopenharmony_ciinclude::{generated}/api/structs/VkAndroidHardwareBufferUsageANDROID.txt[]
818e5c31af7Sopenharmony_ci
819e5c31af7Sopenharmony_ci  * pname:sType is the type of this structure.
820e5c31af7Sopenharmony_ci  * pname:pNext is `NULL` or a pointer to a structure extending this
821e5c31af7Sopenharmony_ci    structure.
822e5c31af7Sopenharmony_ci  * pname:androidHardwareBufferUsage returns the Android hardware buffer
823e5c31af7Sopenharmony_ci    usage flags.
824e5c31af7Sopenharmony_ci
825e5c31af7Sopenharmony_ciThe pname:androidHardwareBufferUsage field must: include Android hardware
826e5c31af7Sopenharmony_cibuffer usage flags listed in the
827e5c31af7Sopenharmony_ci<<memory-external-android-hardware-buffer-usage,AHardwareBuffer Usage
828e5c31af7Sopenharmony_ciEquivalence>> table when the corresponding Vulkan image usage or image
829e5c31af7Sopenharmony_cicreation flags are included in the pname:usage or pname:flags fields of
830e5c31af7Sopenharmony_cislink:VkPhysicalDeviceImageFormatInfo2.
831e5c31af7Sopenharmony_ciIt must: include at least one GPU usage flag
832e5c31af7Sopenharmony_ci(code:AHARDWAREBUFFER_USAGE_GPU_*), even if none of the corresponding Vulkan
833e5c31af7Sopenharmony_ciusages or flags are requested.
834e5c31af7Sopenharmony_ci
835e5c31af7Sopenharmony_ci.Note
836e5c31af7Sopenharmony_ci[NOTE]
837e5c31af7Sopenharmony_ci====
838e5c31af7Sopenharmony_ciRequiring at least one GPU usage flag ensures that Android hardware buffer
839e5c31af7Sopenharmony_cimemory will be allocated in a memory pool accessible to the Vulkan
840e5c31af7Sopenharmony_ciimplementation, and that specializing the memory layout based on usage flags
841e5c31af7Sopenharmony_cidoes not prevent it from being compatible with Vulkan.
842e5c31af7Sopenharmony_ciImplementations may: avoid unnecessary restrictions caused by this
843e5c31af7Sopenharmony_cirequirement by using vendor usage flags to indicate that only the Vulkan
844e5c31af7Sopenharmony_ciuses indicated in slink:VkImageFormatProperties2 are required.
845e5c31af7Sopenharmony_ci====
846e5c31af7Sopenharmony_ci
847e5c31af7Sopenharmony_ciinclude::{generated}/validity/structs/VkAndroidHardwareBufferUsageANDROID.txt[]
848e5c31af7Sopenharmony_ci--
849e5c31af7Sopenharmony_ci
850e5c31af7Sopenharmony_ciendif::VK_ANDROID_external_memory_android_hardware_buffer[]
851e5c31af7Sopenharmony_ci
852e5c31af7Sopenharmony_ciifdef::VK_EXT_filter_cubic[]
853e5c31af7Sopenharmony_ci
854e5c31af7Sopenharmony_ci
855e5c31af7Sopenharmony_ci
856e5c31af7Sopenharmony_ciTo determine if cubic filtering can be used with a given image format and a
857e5c31af7Sopenharmony_cigiven image view type add a
858e5c31af7Sopenharmony_cislink:VkPhysicalDeviceImageViewImageFormatInfoEXT structure to the
859e5c31af7Sopenharmony_cipname:pNext chain of the slink:VkPhysicalDeviceImageFormatInfo2 structure,
860e5c31af7Sopenharmony_ciand a slink:VkFilterCubicImageViewImageFormatPropertiesEXT structure to the
861e5c31af7Sopenharmony_cipname:pNext chain of the slink:VkImageFormatProperties2 structure.
862e5c31af7Sopenharmony_ci
863e5c31af7Sopenharmony_ci[open,refpage='VkPhysicalDeviceImageViewImageFormatInfoEXT',desc='Structure for providing image view type',type='structs']
864e5c31af7Sopenharmony_ci--
865e5c31af7Sopenharmony_ciThe sname:VkPhysicalDeviceImageViewImageFormatInfoEXT structure is defined
866e5c31af7Sopenharmony_cias:
867e5c31af7Sopenharmony_ci
868e5c31af7Sopenharmony_ciinclude::{generated}/api/structs/VkPhysicalDeviceImageViewImageFormatInfoEXT.txt[]
869e5c31af7Sopenharmony_ci
870e5c31af7Sopenharmony_ci  * pname:sType is the type of this structure.
871e5c31af7Sopenharmony_ci  * pname:pNext is `NULL` or a pointer to a structure extending this
872e5c31af7Sopenharmony_ci    structure.
873e5c31af7Sopenharmony_ci  * pname:imageViewType is a elink:VkImageViewType value specifying the type
874e5c31af7Sopenharmony_ci    of the image view.
875e5c31af7Sopenharmony_ci
876e5c31af7Sopenharmony_ciinclude::{generated}/validity/structs/VkPhysicalDeviceImageViewImageFormatInfoEXT.txt[]
877e5c31af7Sopenharmony_ci--
878e5c31af7Sopenharmony_ci
879e5c31af7Sopenharmony_ci[open,refpage='VkFilterCubicImageViewImageFormatPropertiesEXT',desc='Structure for querying cubic filtering capabilities of an image view type',type='structs']
880e5c31af7Sopenharmony_ci--
881e5c31af7Sopenharmony_ciThe sname:VkFilterCubicImageViewImageFormatPropertiesEXT structure is
882e5c31af7Sopenharmony_cidefined as:
883e5c31af7Sopenharmony_ci
884e5c31af7Sopenharmony_ciinclude::{generated}/api/structs/VkFilterCubicImageViewImageFormatPropertiesEXT.txt[]
885e5c31af7Sopenharmony_ci
886e5c31af7Sopenharmony_ci  * pname:sType is the type of this structure.
887e5c31af7Sopenharmony_ci  * pname:pNext is `NULL` or a pointer to a structure extending this
888e5c31af7Sopenharmony_ci    structure.
889e5c31af7Sopenharmony_ci  * pname:filterCubic tells if image format, image type and image view type
890e5c31af7Sopenharmony_ci    can: be used with cubic filtering.
891e5c31af7Sopenharmony_ci    This field is set by the implementation.
892e5c31af7Sopenharmony_ci    User-specified value is ignored.
893e5c31af7Sopenharmony_ci  * pname:filterCubicMinmax tells if image format, image type and image view
894e5c31af7Sopenharmony_ci    type can: be used with cubic filtering and minmax filtering.
895e5c31af7Sopenharmony_ci    This field is set by the implementation.
896e5c31af7Sopenharmony_ci    User-specified value is ignored.
897e5c31af7Sopenharmony_ci
898e5c31af7Sopenharmony_ciinclude::{generated}/validity/structs/VkFilterCubicImageViewImageFormatPropertiesEXT.txt[]
899e5c31af7Sopenharmony_ci
900e5c31af7Sopenharmony_ci.Valid Usage
901e5c31af7Sopenharmony_ci****
902e5c31af7Sopenharmony_ci  * [[VUID-VkFilterCubicImageViewImageFormatPropertiesEXT-pNext-02627]]
903e5c31af7Sopenharmony_ci    If the pname:pNext chain of the slink:VkImageFormatProperties2 structure
904e5c31af7Sopenharmony_ci    includes a slink:VkFilterCubicImageViewImageFormatPropertiesEXT
905e5c31af7Sopenharmony_ci    structure, the pname:pNext chain of the
906e5c31af7Sopenharmony_ci    slink:VkPhysicalDeviceImageFormatInfo2 structure must: include a
907e5c31af7Sopenharmony_ci    slink:VkPhysicalDeviceImageViewImageFormatInfoEXT structure with an
908e5c31af7Sopenharmony_ci    pname:imageViewType that is compatible with pname:imageType
909e5c31af7Sopenharmony_ci****
910e5c31af7Sopenharmony_ci--
911e5c31af7Sopenharmony_ci
912e5c31af7Sopenharmony_ciendif::VK_EXT_filter_cubic[]
913e5c31af7Sopenharmony_ci
914e5c31af7Sopenharmony_ciendif::VK_VERSION_1_1,VK_KHR_get_physical_device_properties2[]
915e5c31af7Sopenharmony_ci
916e5c31af7Sopenharmony_ci
917e5c31af7Sopenharmony_ci[[features-supported-sample-counts]]
918e5c31af7Sopenharmony_ci=== Supported Sample Counts
919e5c31af7Sopenharmony_cifname:vkGetPhysicalDeviceImageFormatProperties returns a bitmask of
920e5c31af7Sopenharmony_cielink:VkSampleCountFlagBits in pname:sampleCounts specifying the supported
921e5c31af7Sopenharmony_cisample counts for the image parameters.
922e5c31af7Sopenharmony_ci
923e5c31af7Sopenharmony_cipname:sampleCounts will be set to ename:VK_SAMPLE_COUNT_1_BIT if at least
924e5c31af7Sopenharmony_cione of the following conditions is true:
925e5c31af7Sopenharmony_ci
926e5c31af7Sopenharmony_ci  * pname:tiling is ename:VK_IMAGE_TILING_LINEAR
927e5c31af7Sopenharmony_ci  * pname:type is not ename:VK_IMAGE_TYPE_2D
928e5c31af7Sopenharmony_ci  * pname:flags contains ename:VK_IMAGE_CREATE_CUBE_COMPATIBLE_BIT
929e5c31af7Sopenharmony_ci  * Neither the ename:VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BIT flag nor the
930e5c31af7Sopenharmony_ci    ename:VK_FORMAT_FEATURE_DEPTH_STENCIL_ATTACHMENT_BIT flag in
931e5c31af7Sopenharmony_ci    sname:VkFormatProperties::pname:optimalTilingFeatures returned by
932e5c31af7Sopenharmony_ci    flink:vkGetPhysicalDeviceFormatProperties is set
933e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_1,VK_KHR_external_memory_capabilities[]
934e5c31af7Sopenharmony_ci  * slink:VkPhysicalDeviceExternalImageFormatInfo::pname:handleType is an
935e5c31af7Sopenharmony_ci    external handle type for which multisampled image support is not
936e5c31af7Sopenharmony_ci    required.
937e5c31af7Sopenharmony_ciendif::VK_VERSION_1_1,VK_KHR_external_memory_capabilities[]
938e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_1,VK_KHR_sampler_ycbcr_conversion[]
939e5c31af7Sopenharmony_ci  * pname:format is one of the <<formats-requiring-sampler-ycbcr-conversion,
940e5c31af7Sopenharmony_ci    formats that require a sampler Y'C~B~C~R~ conversion>>
941e5c31af7Sopenharmony_ciendif::VK_VERSION_1_1,VK_KHR_sampler_ycbcr_conversion[]
942e5c31af7Sopenharmony_ciifdef::VK_KHR_fragment_shading_rate,VK_NV_shading_rate_image[]
943e5c31af7Sopenharmony_ci  * pname:usage contains
944e5c31af7Sopenharmony_ci    ename:VK_IMAGE_USAGE_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR
945e5c31af7Sopenharmony_ciendif::VK_KHR_fragment_shading_rate,VK_NV_shading_rate_image[]
946e5c31af7Sopenharmony_ciifdef::VK_EXT_fragment_density_map[]
947e5c31af7Sopenharmony_ci  * pname:usage contains ename:VK_IMAGE_USAGE_FRAGMENT_DENSITY_MAP_BIT_EXT
948e5c31af7Sopenharmony_ciendif::VK_EXT_fragment_density_map[]
949e5c31af7Sopenharmony_ci
950e5c31af7Sopenharmony_ciOtherwise, the bits set in pname:sampleCounts will be the sample counts
951e5c31af7Sopenharmony_cisupported for the specified values of pname:usage and pname:format.
952e5c31af7Sopenharmony_ciFor each bit set in pname:usage, the supported sample counts relate to the
953e5c31af7Sopenharmony_cilimits in sname:VkPhysicalDeviceLimits as follows:
954e5c31af7Sopenharmony_ci
955e5c31af7Sopenharmony_ci  * If pname:usage includes ename:VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT and
956e5c31af7Sopenharmony_ci    pname:format is a floating- or fixed-point color format, a superset of
957e5c31af7Sopenharmony_ci    sname:VkPhysicalDeviceLimits::pname:framebufferColorSampleCounts
958e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_2[]
959e5c31af7Sopenharmony_ci  * If pname:usage includes ename:VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT and
960e5c31af7Sopenharmony_ci    pname:format is an integer format, a superset of
961e5c31af7Sopenharmony_ci    sname:VkPhysicalDeviceVulkan12Properties::pname:framebufferIntegerColorSampleCounts
962e5c31af7Sopenharmony_ciendif::VK_VERSION_1_2[]
963e5c31af7Sopenharmony_ci  * If pname:usage includes
964e5c31af7Sopenharmony_ci    ename:VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT, and pname:format
965e5c31af7Sopenharmony_ci    includes a depth aspect, a superset of
966e5c31af7Sopenharmony_ci    sname:VkPhysicalDeviceLimits::pname:framebufferDepthSampleCounts
967e5c31af7Sopenharmony_ci  * If pname:usage includes
968e5c31af7Sopenharmony_ci    ename:VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT, and pname:format
969e5c31af7Sopenharmony_ci    includes a stencil aspect, a superset of
970e5c31af7Sopenharmony_ci    sname:VkPhysicalDeviceLimits::pname:framebufferStencilSampleCounts
971e5c31af7Sopenharmony_ci  * If pname:usage includes ename:VK_IMAGE_USAGE_SAMPLED_BIT, and
972e5c31af7Sopenharmony_ci    pname:format includes a color aspect, a superset of
973e5c31af7Sopenharmony_ci    sname:VkPhysicalDeviceLimits::pname:sampledImageColorSampleCounts
974e5c31af7Sopenharmony_ci  * If pname:usage includes ename:VK_IMAGE_USAGE_SAMPLED_BIT, and
975e5c31af7Sopenharmony_ci    pname:format includes a depth aspect, a superset of
976e5c31af7Sopenharmony_ci    sname:VkPhysicalDeviceLimits::pname:sampledImageDepthSampleCounts
977e5c31af7Sopenharmony_ci  * If pname:usage includes ename:VK_IMAGE_USAGE_SAMPLED_BIT, and
978e5c31af7Sopenharmony_ci    pname:format is an integer format, a superset of
979e5c31af7Sopenharmony_ci    sname:VkPhysicalDeviceLimits::pname:sampledImageIntegerSampleCounts
980e5c31af7Sopenharmony_ci  * If pname:usage includes ename:VK_IMAGE_USAGE_STORAGE_BIT, a superset of
981e5c31af7Sopenharmony_ci    sname:VkPhysicalDeviceLimits::pname:storageImageSampleCounts
982e5c31af7Sopenharmony_ci
983e5c31af7Sopenharmony_ciIf multiple bits are set in pname:usage, pname:sampleCounts will be the
984e5c31af7Sopenharmony_ciintersection of the per-usage values described above.
985e5c31af7Sopenharmony_ci
986e5c31af7Sopenharmony_ciIf none of the bits described above are set in pname:usage, then there is no
987e5c31af7Sopenharmony_cicorresponding limit in sname:VkPhysicalDeviceLimits.
988e5c31af7Sopenharmony_ciIn this case, pname:sampleCounts must: include at least
989e5c31af7Sopenharmony_ciename:VK_SAMPLE_COUNT_1_BIT.
990e5c31af7Sopenharmony_ci
991e5c31af7Sopenharmony_ci
992e5c31af7Sopenharmony_ci[[features-extentperimagetype]]
993e5c31af7Sopenharmony_ci=== Allowed Extent Values Based On Image Type
994e5c31af7Sopenharmony_ci
995e5c31af7Sopenharmony_ciImplementations may: support extent values larger than the <<limits-minmax,
996e5c31af7Sopenharmony_cirequired minimum/maximum values>> for certain types of images.
997e5c31af7Sopenharmony_cislink:VkImageFormatProperties::pname:maxExtent for each type is subject to
998e5c31af7Sopenharmony_cithe constraints below.
999e5c31af7Sopenharmony_ci
1000e5c31af7Sopenharmony_ci[NOTE]
1001e5c31af7Sopenharmony_ci.Note
1002e5c31af7Sopenharmony_ci====
1003e5c31af7Sopenharmony_ciImplementations must: support images with dimensions up to the
1004e5c31af7Sopenharmony_ci<<limits-minmax, required minimum/maximum values>> for all types of images.
1005e5c31af7Sopenharmony_ciIt follows that the query for additional capabilities must: return extent
1006e5c31af7Sopenharmony_civalues that are at least as large as the required values.
1007e5c31af7Sopenharmony_ci====
1008e5c31af7Sopenharmony_ci
1009e5c31af7Sopenharmony_ciFor ename:VK_IMAGE_TYPE_1D:
1010e5c31af7Sopenharmony_ci
1011e5c31af7Sopenharmony_ci  * [eq]#pname:maxExtent.width {geq}
1012e5c31af7Sopenharmony_ci    slink:VkPhysicalDeviceLimits::pname:maxImageDimension1D#
1013e5c31af7Sopenharmony_ci  * [eq]#pname:maxExtent.height = 1#
1014e5c31af7Sopenharmony_ci  * [eq]#pname:maxExtent.depth = 1#
1015e5c31af7Sopenharmony_ci
1016e5c31af7Sopenharmony_ciFor ename:VK_IMAGE_TYPE_2D when pname:flags does not contain
1017e5c31af7Sopenharmony_ciename:VK_IMAGE_CREATE_CUBE_COMPATIBLE_BIT:
1018e5c31af7Sopenharmony_ci
1019e5c31af7Sopenharmony_ci  * [eq]#pname:maxExtent.width {geq}
1020e5c31af7Sopenharmony_ci    slink:VkPhysicalDeviceLimits::pname:maxImageDimension2D#
1021e5c31af7Sopenharmony_ci  * [eq]#pname:maxExtent.height {geq}
1022e5c31af7Sopenharmony_ci    slink:VkPhysicalDeviceLimits::pname:maxImageDimension2D#
1023e5c31af7Sopenharmony_ci  * [eq]#pname:maxExtent.depth = 1#
1024e5c31af7Sopenharmony_ci
1025e5c31af7Sopenharmony_ciFor ename:VK_IMAGE_TYPE_2D when pname:flags contains
1026e5c31af7Sopenharmony_ciename:VK_IMAGE_CREATE_CUBE_COMPATIBLE_BIT:
1027e5c31af7Sopenharmony_ci
1028e5c31af7Sopenharmony_ci  * [eq]#pname:maxExtent.width {geq}
1029e5c31af7Sopenharmony_ci    slink:VkPhysicalDeviceLimits::pname:maxImageDimensionCube#
1030e5c31af7Sopenharmony_ci  * [eq]#pname:maxExtent.height {geq}
1031e5c31af7Sopenharmony_ci    slink:VkPhysicalDeviceLimits::pname:maxImageDimensionCube#
1032e5c31af7Sopenharmony_ci  * [eq]#pname:maxExtent.depth = 1#
1033e5c31af7Sopenharmony_ci
1034e5c31af7Sopenharmony_ciFor ename:VK_IMAGE_TYPE_3D:
1035e5c31af7Sopenharmony_ci
1036e5c31af7Sopenharmony_ci  * [eq]#pname:maxExtent.width {geq}
1037e5c31af7Sopenharmony_ci    slink:VkPhysicalDeviceLimits::pname:maxImageDimension3D#
1038e5c31af7Sopenharmony_ci  * [eq]#pname:maxExtent.height {geq}
1039e5c31af7Sopenharmony_ci    slink:VkPhysicalDeviceLimits::pname:maxImageDimension3D#
1040e5c31af7Sopenharmony_ci  * [eq]#pname:maxExtent.depth {geq}
1041e5c31af7Sopenharmony_ci    slink:VkPhysicalDeviceLimits::pname:maxImageDimension3D#
1042e5c31af7Sopenharmony_ci
1043e5c31af7Sopenharmony_ci
1044e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_1,VK_KHR_external_memory_capabilities[]
1045e5c31af7Sopenharmony_ci[[capabilities-buffer]]
1046e5c31af7Sopenharmony_ci== Additional Buffer Capabilities
1047e5c31af7Sopenharmony_ci
1048e5c31af7Sopenharmony_ci[open,refpage='vkGetPhysicalDeviceExternalBufferProperties',desc='Query external handle types supported by buffers',type='protos']
1049e5c31af7Sopenharmony_ci--
1050e5c31af7Sopenharmony_ciTo query the external handle types supported by buffers, call:
1051e5c31af7Sopenharmony_ci
1052e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_1[]
1053e5c31af7Sopenharmony_ciinclude::{generated}/api/protos/vkGetPhysicalDeviceExternalBufferProperties.txt[]
1054e5c31af7Sopenharmony_ciendif::VK_VERSION_1_1[]
1055e5c31af7Sopenharmony_ci
1056e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_1+VK_KHR_external_memory_capabilities[or the equivalent command]
1057e5c31af7Sopenharmony_ci
1058e5c31af7Sopenharmony_ciifdef::VK_KHR_external_memory_capabilities[]
1059e5c31af7Sopenharmony_ciinclude::{generated}/api/protos/vkGetPhysicalDeviceExternalBufferPropertiesKHR.txt[]
1060e5c31af7Sopenharmony_ciendif::VK_KHR_external_memory_capabilities[]
1061e5c31af7Sopenharmony_ci
1062e5c31af7Sopenharmony_ci  * pname:physicalDevice is the physical device from which to query the
1063e5c31af7Sopenharmony_ci    buffer capabilities.
1064e5c31af7Sopenharmony_ci  * pname:pExternalBufferInfo is a pointer to a
1065e5c31af7Sopenharmony_ci    slink:VkPhysicalDeviceExternalBufferInfo structure describing the
1066e5c31af7Sopenharmony_ci    parameters that would be consumed by flink:vkCreateBuffer.
1067e5c31af7Sopenharmony_ci  * pname:pExternalBufferProperties is a pointer to a
1068e5c31af7Sopenharmony_ci    slink:VkExternalBufferProperties structure in which capabilities are
1069e5c31af7Sopenharmony_ci    returned.
1070e5c31af7Sopenharmony_ci
1071e5c31af7Sopenharmony_ciinclude::{generated}/validity/protos/vkGetPhysicalDeviceExternalBufferProperties.txt[]
1072e5c31af7Sopenharmony_ci--
1073e5c31af7Sopenharmony_ci
1074e5c31af7Sopenharmony_ci[open,refpage='VkPhysicalDeviceExternalBufferInfo',desc='Structure specifying buffer creation parameters',type='structs']
1075e5c31af7Sopenharmony_ci--
1076e5c31af7Sopenharmony_ciThe sname:VkPhysicalDeviceExternalBufferInfo structure is defined as:
1077e5c31af7Sopenharmony_ci
1078e5c31af7Sopenharmony_ciinclude::{generated}/api/structs/VkPhysicalDeviceExternalBufferInfo.txt[]
1079e5c31af7Sopenharmony_ci
1080e5c31af7Sopenharmony_ciifdef::VK_KHR_external_memory_capabilities[]
1081e5c31af7Sopenharmony_cior the equivalent
1082e5c31af7Sopenharmony_ci
1083e5c31af7Sopenharmony_ciinclude::{generated}/api/structs/VkPhysicalDeviceExternalBufferInfoKHR.txt[]
1084e5c31af7Sopenharmony_ciendif::VK_KHR_external_memory_capabilities[]
1085e5c31af7Sopenharmony_ci
1086e5c31af7Sopenharmony_ci  * pname:sType is the type of this structure.
1087e5c31af7Sopenharmony_ci  * pname:pNext is `NULL` or a pointer to a structure extending this
1088e5c31af7Sopenharmony_ci    structure.
1089e5c31af7Sopenharmony_ci  * pname:flags is a bitmask of elink:VkBufferCreateFlagBits describing
1090e5c31af7Sopenharmony_ci    additional parameters of the buffer, corresponding to
1091e5c31af7Sopenharmony_ci    slink:VkBufferCreateInfo::pname:flags.
1092e5c31af7Sopenharmony_ci  * pname:usage is a bitmask of elink:VkBufferUsageFlagBits describing the
1093e5c31af7Sopenharmony_ci    intended usage of the buffer, corresponding to
1094e5c31af7Sopenharmony_ci    slink:VkBufferCreateInfo::pname:usage.
1095e5c31af7Sopenharmony_ci  * pname:handleType is a elink:VkExternalMemoryHandleTypeFlagBits value
1096e5c31af7Sopenharmony_ci    specifying the memory handle type that will be used with the memory
1097e5c31af7Sopenharmony_ci    associated with the buffer.
1098e5c31af7Sopenharmony_ci
1099e5c31af7Sopenharmony_ciinclude::{generated}/validity/structs/VkPhysicalDeviceExternalBufferInfo.txt[]
1100e5c31af7Sopenharmony_ci--
1101e5c31af7Sopenharmony_ci
1102e5c31af7Sopenharmony_ci[open,refpage='VkExternalBufferProperties',desc='Structure specifying supported external handle capabilities',type='structs']
1103e5c31af7Sopenharmony_ci--
1104e5c31af7Sopenharmony_ciThe sname:VkExternalBufferProperties structure is defined as:
1105e5c31af7Sopenharmony_ci
1106e5c31af7Sopenharmony_ciinclude::{generated}/api/structs/VkExternalBufferProperties.txt[]
1107e5c31af7Sopenharmony_ci
1108e5c31af7Sopenharmony_ciifdef::VK_KHR_external_memory_capabilities[]
1109e5c31af7Sopenharmony_cior the equivalent
1110e5c31af7Sopenharmony_ci
1111e5c31af7Sopenharmony_ciinclude::{generated}/api/structs/VkExternalBufferPropertiesKHR.txt[]
1112e5c31af7Sopenharmony_ciendif::VK_KHR_external_memory_capabilities[]
1113e5c31af7Sopenharmony_ci
1114e5c31af7Sopenharmony_ci  * pname:sType is the type of this structure.
1115e5c31af7Sopenharmony_ci  * pname:pNext is `NULL` or a pointer to a structure extending this
1116e5c31af7Sopenharmony_ci    structure.
1117e5c31af7Sopenharmony_ci  * pname:externalMemoryProperties is a slink:VkExternalMemoryProperties
1118e5c31af7Sopenharmony_ci    structure specifying various capabilities of the external handle type
1119e5c31af7Sopenharmony_ci    when used with the specified buffer creation parameters.
1120e5c31af7Sopenharmony_ci
1121e5c31af7Sopenharmony_ciinclude::{generated}/validity/structs/VkExternalBufferProperties.txt[]
1122e5c31af7Sopenharmony_ci--
1123e5c31af7Sopenharmony_ciendif::VK_VERSION_1_1,VK_KHR_external_memory_capabilities[]
1124e5c31af7Sopenharmony_ci
1125e5c31af7Sopenharmony_ci
1126e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_1,VK_KHR_external_semaphore_capabilities[]
1127e5c31af7Sopenharmony_ci[[capabilities-semaphore]]
1128e5c31af7Sopenharmony_ci== Optional Semaphore Capabilities
1129e5c31af7Sopenharmony_ci
1130e5c31af7Sopenharmony_ci[open,refpage='vkGetPhysicalDeviceExternalSemaphoreProperties',desc='Function for querying external semaphore handle capabilities.',type='protos']
1131e5c31af7Sopenharmony_ci--
1132e5c31af7Sopenharmony_ciSemaphores may: support import and export of their
1133e5c31af7Sopenharmony_ci<<synchronization-semaphores-payloads, payload>> to external handles.
1134e5c31af7Sopenharmony_ciTo query the external handle types supported by semaphores, call:
1135e5c31af7Sopenharmony_ci
1136e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_1[]
1137e5c31af7Sopenharmony_ciinclude::{generated}/api/protos/vkGetPhysicalDeviceExternalSemaphoreProperties.txt[]
1138e5c31af7Sopenharmony_ciendif::VK_VERSION_1_1[]
1139e5c31af7Sopenharmony_ci
1140e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_1+VK_KHR_external_semaphore_capabilities[or the equivalent command]
1141e5c31af7Sopenharmony_ci
1142e5c31af7Sopenharmony_ciifdef::VK_KHR_external_semaphore_capabilities[]
1143e5c31af7Sopenharmony_ciinclude::{generated}/api/protos/vkGetPhysicalDeviceExternalSemaphorePropertiesKHR.txt[]
1144e5c31af7Sopenharmony_ciendif::VK_KHR_external_semaphore_capabilities[]
1145e5c31af7Sopenharmony_ci
1146e5c31af7Sopenharmony_ci  * pname:physicalDevice is the physical device from which to query the
1147e5c31af7Sopenharmony_ci    semaphore capabilities.
1148e5c31af7Sopenharmony_ci  * pname:pExternalSemaphoreInfo is a pointer to a
1149e5c31af7Sopenharmony_ci    slink:VkPhysicalDeviceExternalSemaphoreInfo structure describing the
1150e5c31af7Sopenharmony_ci    parameters that would be consumed by flink:vkCreateSemaphore.
1151e5c31af7Sopenharmony_ci  * pname:pExternalSemaphoreProperties is a pointer to a
1152e5c31af7Sopenharmony_ci    slink:VkExternalSemaphoreProperties structure in which capabilities are
1153e5c31af7Sopenharmony_ci    returned.
1154e5c31af7Sopenharmony_ci
1155e5c31af7Sopenharmony_ciinclude::{generated}/validity/protos/vkGetPhysicalDeviceExternalSemaphoreProperties.txt[]
1156e5c31af7Sopenharmony_ci--
1157e5c31af7Sopenharmony_ci
1158e5c31af7Sopenharmony_ci[open,refpage='VkPhysicalDeviceExternalSemaphoreInfo',desc='Structure specifying semaphore creation parameters.',type='structs']
1159e5c31af7Sopenharmony_ci--
1160e5c31af7Sopenharmony_ciThe sname:VkPhysicalDeviceExternalSemaphoreInfo structure is defined as:
1161e5c31af7Sopenharmony_ci
1162e5c31af7Sopenharmony_ciinclude::{generated}/api/structs/VkPhysicalDeviceExternalSemaphoreInfo.txt[]
1163e5c31af7Sopenharmony_ci
1164e5c31af7Sopenharmony_ciifdef::VK_KHR_external_semaphore_capabilities[]
1165e5c31af7Sopenharmony_cior the equivalent
1166e5c31af7Sopenharmony_ci
1167e5c31af7Sopenharmony_ciinclude::{generated}/api/structs/VkPhysicalDeviceExternalSemaphoreInfoKHR.txt[]
1168e5c31af7Sopenharmony_ciendif::VK_KHR_external_semaphore_capabilities[]
1169e5c31af7Sopenharmony_ci
1170e5c31af7Sopenharmony_ci  * pname:sType is the type of this structure.
1171e5c31af7Sopenharmony_ci  * pname:pNext is `NULL` or a pointer to a structure extending this
1172e5c31af7Sopenharmony_ci    structure.
1173e5c31af7Sopenharmony_ci  * pname:handleType is a elink:VkExternalSemaphoreHandleTypeFlagBits value
1174e5c31af7Sopenharmony_ci    specifying the external semaphore handle type for which capabilities
1175e5c31af7Sopenharmony_ci    will be returned.
1176e5c31af7Sopenharmony_ci
1177e5c31af7Sopenharmony_ciinclude::{generated}/validity/structs/VkPhysicalDeviceExternalSemaphoreInfo.txt[]
1178e5c31af7Sopenharmony_ci--
1179e5c31af7Sopenharmony_ci
1180e5c31af7Sopenharmony_ci[open,refpage='VkExternalSemaphoreHandleTypeFlagBits',desc='Bitmask of valid external semaphore handle types',type='enums']
1181e5c31af7Sopenharmony_ci--
1182e5c31af7Sopenharmony_ciBits which may: be set in
1183e5c31af7Sopenharmony_cislink:VkPhysicalDeviceExternalSemaphoreInfo::pname:handleType, specifying an
1184e5c31af7Sopenharmony_ciexternal semaphore handle type, are:
1185e5c31af7Sopenharmony_ci
1186e5c31af7Sopenharmony_ciinclude::{generated}/api/enums/VkExternalSemaphoreHandleTypeFlagBits.txt[]
1187e5c31af7Sopenharmony_ci
1188e5c31af7Sopenharmony_ciifdef::VK_KHR_external_semaphore_capabilities[]
1189e5c31af7Sopenharmony_cior the equivalent
1190e5c31af7Sopenharmony_ci
1191e5c31af7Sopenharmony_ciinclude::{generated}/api/enums/VkExternalSemaphoreHandleTypeFlagBitsKHR.txt[]
1192e5c31af7Sopenharmony_ciendif::VK_KHR_external_semaphore_capabilities[]
1193e5c31af7Sopenharmony_ci
1194e5c31af7Sopenharmony_ci  * ename:VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_FD_BIT specifies a POSIX
1195e5c31af7Sopenharmony_ci    file descriptor handle that has only limited valid usage outside of
1196e5c31af7Sopenharmony_ci    Vulkan and other compatible APIs.
1197e5c31af7Sopenharmony_ci    It must: be compatible with the POSIX system calls code:dup, code:dup2,
1198e5c31af7Sopenharmony_ci    code:close, and the non-standard system call code:dup3.
1199e5c31af7Sopenharmony_ci    Additionally, it must: be transportable over a socket using an
1200e5c31af7Sopenharmony_ci    code:SCM_RIGHTS control message.
1201e5c31af7Sopenharmony_ci    It owns a reference to the underlying synchronization primitive
1202e5c31af7Sopenharmony_ci    represented by its Vulkan semaphore object.
1203e5c31af7Sopenharmony_ci  * ename:VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_WIN32_BIT specifies an NT
1204e5c31af7Sopenharmony_ci    handle that has only limited valid usage outside of Vulkan and other
1205e5c31af7Sopenharmony_ci    compatible APIs.
1206e5c31af7Sopenharmony_ci    It must: be compatible with the functions code:DuplicateHandle,
1207e5c31af7Sopenharmony_ci    code:CloseHandle, code:CompareObjectHandles, code:GetHandleInformation,
1208e5c31af7Sopenharmony_ci    and code:SetHandleInformation.
1209e5c31af7Sopenharmony_ci    It owns a reference to the underlying synchronization primitive
1210e5c31af7Sopenharmony_ci    represented by its Vulkan semaphore object.
1211e5c31af7Sopenharmony_ci  * ename:VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_WIN32_KMT_BIT specifies a
1212e5c31af7Sopenharmony_ci    global share handle that has only limited valid usage outside of Vulkan
1213e5c31af7Sopenharmony_ci    and other compatible APIs.
1214e5c31af7Sopenharmony_ci    It is not compatible with any native APIs.
1215e5c31af7Sopenharmony_ci    It does not own a reference to the underlying synchronization primitive
1216e5c31af7Sopenharmony_ci    represented by its Vulkan semaphore object, and will therefore become
1217e5c31af7Sopenharmony_ci    invalid when all Vulkan semaphore objects associated with it are
1218e5c31af7Sopenharmony_ci    destroyed.
1219e5c31af7Sopenharmony_ci  * ename:VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_D3D12_FENCE_BIT specifies an NT
1220e5c31af7Sopenharmony_ci    handle returned by code:ID3D12Device::code:CreateSharedHandle referring
1221e5c31af7Sopenharmony_ci    to a Direct3D 12 fence, or code:ID3D11Device5::code:CreateFence
1222e5c31af7Sopenharmony_ci    referring to a Direct3D 11 fence.
1223e5c31af7Sopenharmony_ci    It owns a reference to the underlying synchronization primitive
1224e5c31af7Sopenharmony_ci    associated with the Direct3D fence.
1225e5c31af7Sopenharmony_ci  * ename:VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_D3D11_FENCE_BIT is an alias of
1226e5c31af7Sopenharmony_ci    ename:VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_D3D12_FENCE_BIT with the same
1227e5c31af7Sopenharmony_ci    meaning.
1228e5c31af7Sopenharmony_ci    It is provided for convenience and code clarity when interacting with
1229e5c31af7Sopenharmony_ci    D3D11 fences.
1230e5c31af7Sopenharmony_ci  * ename:VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_SYNC_FD_BIT specifies a POSIX
1231e5c31af7Sopenharmony_ci    file descriptor handle to a Linux Sync File or Android Fence object.
1232e5c31af7Sopenharmony_ci    It can be used with any native API accepting a valid sync file or fence
1233e5c31af7Sopenharmony_ci    as input.
1234e5c31af7Sopenharmony_ci    It owns a reference to the underlying synchronization primitive
1235e5c31af7Sopenharmony_ci    associated with the file descriptor.
1236e5c31af7Sopenharmony_ci    Implementations which support importing this handle type must: accept
1237e5c31af7Sopenharmony_ci    any type of sync or fence FD supported by the native system they are
1238e5c31af7Sopenharmony_ci    running on.
1239e5c31af7Sopenharmony_ciifdef::VK_FUCHSIA_external_semaphore[]
1240e5c31af7Sopenharmony_ci  * ename:VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_ZIRCON_EVENT_BIT_FUCHSIA
1241e5c31af7Sopenharmony_ci    specifies a handle to a Zircon event object.
1242e5c31af7Sopenharmony_ci    It can be used with any native API that accepts a Zircon event handle.
1243e5c31af7Sopenharmony_ci    Zircon event handles are created with code:ZX_RIGHTS_BASIC and
1244e5c31af7Sopenharmony_ci    code:ZX_RIGHTS_SIGNAL rights.
1245e5c31af7Sopenharmony_ci    Vulkan on Fuchsia uses only the ZX_EVENT_SIGNALED bit when signaling or
1246e5c31af7Sopenharmony_ci    waiting.
1247e5c31af7Sopenharmony_ciendif::VK_FUCHSIA_external_semaphore[]
1248e5c31af7Sopenharmony_ci
1249e5c31af7Sopenharmony_ci[NOTE]
1250e5c31af7Sopenharmony_ci.Note
1251e5c31af7Sopenharmony_ci====
1252e5c31af7Sopenharmony_ciHandles of type ename:VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_SYNC_FD_BIT
1253e5c31af7Sopenharmony_cigenerated by the implementation may represent either Linux Sync Files or
1254e5c31af7Sopenharmony_ciAndroid Fences at the implementation's discretion.
1255e5c31af7Sopenharmony_ciApplications should: only use operations defined for both types of file
1256e5c31af7Sopenharmony_cidescriptors, unless they know via means external to Vulkan the type of the
1257e5c31af7Sopenharmony_cifile descriptor, or are prepared to deal with the system-defined operation
1258e5c31af7Sopenharmony_cifailures resulting from using the wrong type.
1259e5c31af7Sopenharmony_ci====
1260e5c31af7Sopenharmony_ci
1261e5c31af7Sopenharmony_ci<<<
1262e5c31af7Sopenharmony_ci
1263e5c31af7Sopenharmony_ciSome external semaphore handle types can only be shared within the same
1264e5c31af7Sopenharmony_ciunderlying physical device and/or the same driver version, as defined in the
1265e5c31af7Sopenharmony_cifollowing table:
1266e5c31af7Sopenharmony_ci
1267e5c31af7Sopenharmony_ci[[external-semaphore-handle-types-compatibility]]
1268e5c31af7Sopenharmony_ci.External semaphore handle types compatibility
1269e5c31af7Sopenharmony_ci|====
1270e5c31af7Sopenharmony_ci| Handle type | sname:VkPhysicalDeviceIDProperties{wbro}::pname:driverUUID | sname:VkPhysicalDeviceIDProperties{wbro}::pname:deviceUUID
1271e5c31af7Sopenharmony_ci| ename:VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_FD_BIT | Must match | Must match
1272e5c31af7Sopenharmony_ci| ename:VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_WIN32_BIT | Must match | Must match
1273e5c31af7Sopenharmony_ci| ename:VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_WIN32_KMT_BIT | Must match | Must match
1274e5c31af7Sopenharmony_ci| ename:VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_D3D12_FENCE_BIT | Must match | Must match
1275e5c31af7Sopenharmony_ci| ename:VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_SYNC_FD_BIT | No restriction | No restriction
1276e5c31af7Sopenharmony_ci| ename:VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_ZIRCON_EVENT_BIT_FUCHSIA | No restriction | No restriction
1277e5c31af7Sopenharmony_ci|====
1278e5c31af7Sopenharmony_ci--
1279e5c31af7Sopenharmony_ci
1280e5c31af7Sopenharmony_ci[open,refpage='VkExternalSemaphoreHandleTypeFlags',desc='Bitmask of VkExternalSemaphoreHandleTypeFlagBits',type='flags']
1281e5c31af7Sopenharmony_ci--
1282e5c31af7Sopenharmony_ciinclude::{generated}/api/flags/VkExternalSemaphoreHandleTypeFlags.txt[]
1283e5c31af7Sopenharmony_ci
1284e5c31af7Sopenharmony_ciifdef::VK_KHR_external_semaphore_capabilities[]
1285e5c31af7Sopenharmony_cior the equivalent
1286e5c31af7Sopenharmony_ci
1287e5c31af7Sopenharmony_ciinclude::{generated}/api/flags/VkExternalSemaphoreHandleTypeFlagsKHR.txt[]
1288e5c31af7Sopenharmony_ciendif::VK_KHR_external_semaphore_capabilities[]
1289e5c31af7Sopenharmony_ci
1290e5c31af7Sopenharmony_citname:VkExternalSemaphoreHandleTypeFlags is a bitmask type for setting a
1291e5c31af7Sopenharmony_cimask of zero or more elink:VkExternalSemaphoreHandleTypeFlagBits.
1292e5c31af7Sopenharmony_ci--
1293e5c31af7Sopenharmony_ci
1294e5c31af7Sopenharmony_ci[open,refpage='VkExternalSemaphoreProperties',desc='Structure describing supported external semaphore handle features',type='structs']
1295e5c31af7Sopenharmony_ci--
1296e5c31af7Sopenharmony_ciThe sname:VkExternalSemaphoreProperties structure is defined as:
1297e5c31af7Sopenharmony_ci
1298e5c31af7Sopenharmony_ciinclude::{generated}/api/structs/VkExternalSemaphoreProperties.txt[]
1299e5c31af7Sopenharmony_ci
1300e5c31af7Sopenharmony_ciifdef::VK_KHR_external_semaphore_capabilities[]
1301e5c31af7Sopenharmony_cior the equivalent
1302e5c31af7Sopenharmony_ci
1303e5c31af7Sopenharmony_ciinclude::{generated}/api/structs/VkExternalSemaphorePropertiesKHR.txt[]
1304e5c31af7Sopenharmony_ciendif::VK_KHR_external_semaphore_capabilities[]
1305e5c31af7Sopenharmony_ci
1306e5c31af7Sopenharmony_ci  * pname:sType is the type of this structure
1307e5c31af7Sopenharmony_ci  * pname:pNext is `NULL` or a pointer to a structure extending this
1308e5c31af7Sopenharmony_ci    structure.
1309e5c31af7Sopenharmony_ci  * pname:exportFromImportedHandleTypes is a bitmask of
1310e5c31af7Sopenharmony_ci    elink:VkExternalSemaphoreHandleTypeFlagBits specifying which types of
1311e5c31af7Sopenharmony_ci    imported handle pname:handleType can: be exported from.
1312e5c31af7Sopenharmony_ci  * pname:compatibleHandleTypes is a bitmask of
1313e5c31af7Sopenharmony_ci    elink:VkExternalSemaphoreHandleTypeFlagBits specifying handle types
1314e5c31af7Sopenharmony_ci    which can: be specified at the same time as pname:handleType when
1315e5c31af7Sopenharmony_ci    creating a semaphore.
1316e5c31af7Sopenharmony_ci  * pname:externalSemaphoreFeatures is a bitmask of
1317e5c31af7Sopenharmony_ci    elink:VkExternalSemaphoreFeatureFlagBits describing the features of
1318e5c31af7Sopenharmony_ci    pname:handleType.
1319e5c31af7Sopenharmony_ci
1320e5c31af7Sopenharmony_ciIf pname:handleType is not supported by the implementation, then
1321e5c31af7Sopenharmony_cislink:VkExternalSemaphoreProperties::pname:externalSemaphoreFeatures will be
1322e5c31af7Sopenharmony_ciset to zero.
1323e5c31af7Sopenharmony_ci
1324e5c31af7Sopenharmony_ciinclude::{generated}/validity/structs/VkExternalSemaphoreProperties.txt[]
1325e5c31af7Sopenharmony_ci--
1326e5c31af7Sopenharmony_ci
1327e5c31af7Sopenharmony_ci[open,refpage='VkExternalSemaphoreFeatureFlagBits',desc='Bitfield describing features of an external semaphore handle type',type='enums']
1328e5c31af7Sopenharmony_ci--
1329e5c31af7Sopenharmony_ciPossible values of
1330e5c31af7Sopenharmony_cislink:VkExternalSemaphoreProperties::pname:externalSemaphoreFeatures,
1331e5c31af7Sopenharmony_cispecifying the features of an external semaphore handle type, are:
1332e5c31af7Sopenharmony_ci
1333e5c31af7Sopenharmony_ciinclude::{generated}/api/enums/VkExternalSemaphoreFeatureFlagBits.txt[]
1334e5c31af7Sopenharmony_ci
1335e5c31af7Sopenharmony_ciifdef::VK_KHR_external_semaphore_capabilities[]
1336e5c31af7Sopenharmony_cior the equivalent
1337e5c31af7Sopenharmony_ci
1338e5c31af7Sopenharmony_ciinclude::{generated}/api/enums/VkExternalSemaphoreFeatureFlagBitsKHR.txt[]
1339e5c31af7Sopenharmony_ciendif::VK_KHR_external_semaphore_capabilities[]
1340e5c31af7Sopenharmony_ci
1341e5c31af7Sopenharmony_ci  * ename:VK_EXTERNAL_SEMAPHORE_FEATURE_EXPORTABLE_BIT specifies that
1342e5c31af7Sopenharmony_ci    handles of this type can: be exported from Vulkan semaphore objects.
1343e5c31af7Sopenharmony_ci  * ename:VK_EXTERNAL_SEMAPHORE_FEATURE_IMPORTABLE_BIT specifies that
1344e5c31af7Sopenharmony_ci    handles of this type can: be imported as Vulkan semaphore objects.
1345e5c31af7Sopenharmony_ci--
1346e5c31af7Sopenharmony_ci
1347e5c31af7Sopenharmony_ci[open,refpage='VkExternalSemaphoreFeatureFlags',desc='Bitmask of VkExternalSemaphoreFeatureFlagBitsKHR',type='flags']
1348e5c31af7Sopenharmony_ci--
1349e5c31af7Sopenharmony_ciinclude::{generated}/api/flags/VkExternalSemaphoreFeatureFlags.txt[]
1350e5c31af7Sopenharmony_ci
1351e5c31af7Sopenharmony_ciifdef::VK_KHR_external_semaphore_capabilities[]
1352e5c31af7Sopenharmony_cior the equivalent
1353e5c31af7Sopenharmony_ci
1354e5c31af7Sopenharmony_ciinclude::{generated}/api/flags/VkExternalSemaphoreFeatureFlagsKHR.txt[]
1355e5c31af7Sopenharmony_ciendif::VK_KHR_external_semaphore_capabilities[]
1356e5c31af7Sopenharmony_ci
1357e5c31af7Sopenharmony_citname:VkExternalSemaphoreFeatureFlags is a bitmask type for setting a mask
1358e5c31af7Sopenharmony_ciof zero or more elink:VkExternalSemaphoreFeatureFlagBits.
1359e5c31af7Sopenharmony_ci--
1360e5c31af7Sopenharmony_ciendif::VK_VERSION_1_1,VK_KHR_external_semaphore_capabilities[]
1361e5c31af7Sopenharmony_ci
1362e5c31af7Sopenharmony_ci
1363e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_1,VK_KHR_external_fence_capabilities[]
1364e5c31af7Sopenharmony_ci[[capabilities-fence]]
1365e5c31af7Sopenharmony_ci== Optional Fence Capabilities
1366e5c31af7Sopenharmony_ci
1367e5c31af7Sopenharmony_ci[open,refpage='vkGetPhysicalDeviceExternalFenceProperties',desc='Function for querying external fence handle capabilities.',type='protos']
1368e5c31af7Sopenharmony_ci--
1369e5c31af7Sopenharmony_ciFences may: support import and export of their
1370e5c31af7Sopenharmony_ci<<synchronization-fences-payloads, payload>> to external handles.
1371e5c31af7Sopenharmony_ciTo query the external handle types supported by fences, call:
1372e5c31af7Sopenharmony_ci
1373e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_1[]
1374e5c31af7Sopenharmony_ciinclude::{generated}/api/protos/vkGetPhysicalDeviceExternalFenceProperties.txt[]
1375e5c31af7Sopenharmony_ciendif::VK_VERSION_1_1[]
1376e5c31af7Sopenharmony_ci
1377e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_1+VK_KHR_external_fence_capabilities[or the equivalent command]
1378e5c31af7Sopenharmony_ci
1379e5c31af7Sopenharmony_ciifdef::VK_KHR_external_fence_capabilities[]
1380e5c31af7Sopenharmony_ciinclude::{generated}/api/protos/vkGetPhysicalDeviceExternalFencePropertiesKHR.txt[]
1381e5c31af7Sopenharmony_ciendif::VK_KHR_external_fence_capabilities[]
1382e5c31af7Sopenharmony_ci
1383e5c31af7Sopenharmony_ci  * pname:physicalDevice is the physical device from which to query the
1384e5c31af7Sopenharmony_ci    fence capabilities.
1385e5c31af7Sopenharmony_ci  * pname:pExternalFenceInfo is a pointer to a
1386e5c31af7Sopenharmony_ci    slink:VkPhysicalDeviceExternalFenceInfo structure describing the
1387e5c31af7Sopenharmony_ci    parameters that would be consumed by flink:vkCreateFence.
1388e5c31af7Sopenharmony_ci  * pname:pExternalFenceProperties is a pointer to a
1389e5c31af7Sopenharmony_ci    slink:VkExternalFenceProperties structure in which capabilities are
1390e5c31af7Sopenharmony_ci    returned.
1391e5c31af7Sopenharmony_ci
1392e5c31af7Sopenharmony_ciinclude::{generated}/validity/protos/vkGetPhysicalDeviceExternalFenceProperties.txt[]
1393e5c31af7Sopenharmony_ci--
1394e5c31af7Sopenharmony_ci
1395e5c31af7Sopenharmony_ci[open,refpage='VkPhysicalDeviceExternalFenceInfo',desc='Structure specifying fence creation parameters.',type='structs']
1396e5c31af7Sopenharmony_ci--
1397e5c31af7Sopenharmony_ciThe sname:VkPhysicalDeviceExternalFenceInfo structure is defined as:
1398e5c31af7Sopenharmony_ci
1399e5c31af7Sopenharmony_ciinclude::{generated}/api/structs/VkPhysicalDeviceExternalFenceInfo.txt[]
1400e5c31af7Sopenharmony_ci
1401e5c31af7Sopenharmony_ciifdef::VK_KHR_external_fence_capabilities[]
1402e5c31af7Sopenharmony_cior the equivalent
1403e5c31af7Sopenharmony_ci
1404e5c31af7Sopenharmony_ciinclude::{generated}/api/structs/VkPhysicalDeviceExternalFenceInfoKHR.txt[]
1405e5c31af7Sopenharmony_ciendif::VK_KHR_external_fence_capabilities[]
1406e5c31af7Sopenharmony_ci
1407e5c31af7Sopenharmony_ci  * pname:sType is the type of this structure.
1408e5c31af7Sopenharmony_ci  * pname:pNext is `NULL` or a pointer to a structure extending this
1409e5c31af7Sopenharmony_ci    structure.
1410e5c31af7Sopenharmony_ci  * pname:handleType is a elink:VkExternalFenceHandleTypeFlagBits value
1411e5c31af7Sopenharmony_ci    specifying an external fence handle type for which capabilities will be
1412e5c31af7Sopenharmony_ci    returned.
1413e5c31af7Sopenharmony_ci
1414e5c31af7Sopenharmony_ci[NOTE]
1415e5c31af7Sopenharmony_ci.Note
1416e5c31af7Sopenharmony_ci====
1417e5c31af7Sopenharmony_ciHandles of type ename:VK_EXTERNAL_FENCE_HANDLE_TYPE_SYNC_FD_BIT generated by
1418e5c31af7Sopenharmony_cithe implementation may represent either Linux Sync Files or Android Fences
1419e5c31af7Sopenharmony_ciat the implementation's discretion.
1420e5c31af7Sopenharmony_ciApplications should: only use operations defined for both types of file
1421e5c31af7Sopenharmony_cidescriptors, unless they know via means external to Vulkan the type of the
1422e5c31af7Sopenharmony_cifile descriptor, or are prepared to deal with the system-defined operation
1423e5c31af7Sopenharmony_cifailures resulting from using the wrong type.
1424e5c31af7Sopenharmony_ci====
1425e5c31af7Sopenharmony_ci
1426e5c31af7Sopenharmony_ciinclude::{generated}/validity/structs/VkPhysicalDeviceExternalFenceInfo.txt[]
1427e5c31af7Sopenharmony_ci--
1428e5c31af7Sopenharmony_ci
1429e5c31af7Sopenharmony_ci[open,refpage='VkExternalFenceHandleTypeFlagBits',desc='Bitmask of valid external fence handle types',type='enums']
1430e5c31af7Sopenharmony_ci--
1431e5c31af7Sopenharmony_ciBits which may: be set in
1432e5c31af7Sopenharmony_cislink:VkPhysicalDeviceExternalFenceInfo::pname:handleType, and in the
1433e5c31af7Sopenharmony_cipname:exportFromImportedHandleTypes and pname:compatibleHandleTypes members
1434e5c31af7Sopenharmony_ciof slink:VkExternalFenceProperties, to indicate external fence handle types,
1435e5c31af7Sopenharmony_ciare:
1436e5c31af7Sopenharmony_ci
1437e5c31af7Sopenharmony_ciinclude::{generated}/api/enums/VkExternalFenceHandleTypeFlagBits.txt[]
1438e5c31af7Sopenharmony_ci
1439e5c31af7Sopenharmony_ciifdef::VK_KHR_external_fence_capabilities[]
1440e5c31af7Sopenharmony_cior the equivalent
1441e5c31af7Sopenharmony_ci
1442e5c31af7Sopenharmony_ciinclude::{generated}/api/enums/VkExternalFenceHandleTypeFlagBitsKHR.txt[]
1443e5c31af7Sopenharmony_ciendif::VK_KHR_external_fence_capabilities[]
1444e5c31af7Sopenharmony_ci
1445e5c31af7Sopenharmony_ci  * ename:VK_EXTERNAL_FENCE_HANDLE_TYPE_OPAQUE_FD_BIT specifies a POSIX file
1446e5c31af7Sopenharmony_ci    descriptor handle that has only limited valid usage outside of Vulkan
1447e5c31af7Sopenharmony_ci    and other compatible APIs.
1448e5c31af7Sopenharmony_ci    It must: be compatible with the POSIX system calls code:dup, code:dup2,
1449e5c31af7Sopenharmony_ci    code:close, and the non-standard system call code:dup3.
1450e5c31af7Sopenharmony_ci    Additionally, it must: be transportable over a socket using an
1451e5c31af7Sopenharmony_ci    code:SCM_RIGHTS control message.
1452e5c31af7Sopenharmony_ci    It owns a reference to the underlying synchronization primitive
1453e5c31af7Sopenharmony_ci    represented by its Vulkan fence object.
1454e5c31af7Sopenharmony_ci  * ename:VK_EXTERNAL_FENCE_HANDLE_TYPE_OPAQUE_WIN32_BIT specifies an NT
1455e5c31af7Sopenharmony_ci    handle that has only limited valid usage outside of Vulkan and other
1456e5c31af7Sopenharmony_ci    compatible APIs.
1457e5c31af7Sopenharmony_ci    It must: be compatible with the functions code:DuplicateHandle,
1458e5c31af7Sopenharmony_ci    code:CloseHandle, code:CompareObjectHandles, code:GetHandleInformation,
1459e5c31af7Sopenharmony_ci    and code:SetHandleInformation.
1460e5c31af7Sopenharmony_ci    It owns a reference to the underlying synchronization primitive
1461e5c31af7Sopenharmony_ci    represented by its Vulkan fence object.
1462e5c31af7Sopenharmony_ci  * ename:VK_EXTERNAL_FENCE_HANDLE_TYPE_OPAQUE_WIN32_KMT_BIT specifies a
1463e5c31af7Sopenharmony_ci    global share handle that has only limited valid usage outside of Vulkan
1464e5c31af7Sopenharmony_ci    and other compatible APIs.
1465e5c31af7Sopenharmony_ci    It is not compatible with any native APIs.
1466e5c31af7Sopenharmony_ci    It does not own a reference to the underlying synchronization primitive
1467e5c31af7Sopenharmony_ci    represented by its Vulkan fence object, and will therefore become
1468e5c31af7Sopenharmony_ci    invalid when all Vulkan fence objects associated with it are destroyed.
1469e5c31af7Sopenharmony_ci  * ename:VK_EXTERNAL_FENCE_HANDLE_TYPE_SYNC_FD_BIT specifies a POSIX file
1470e5c31af7Sopenharmony_ci    descriptor handle to a Linux Sync File or Android Fence.
1471e5c31af7Sopenharmony_ci    It can be used with any native API accepting a valid sync file or fence
1472e5c31af7Sopenharmony_ci    as input.
1473e5c31af7Sopenharmony_ci    It owns a reference to the underlying synchronization primitive
1474e5c31af7Sopenharmony_ci    associated with the file descriptor.
1475e5c31af7Sopenharmony_ci    Implementations which support importing this handle type must: accept
1476e5c31af7Sopenharmony_ci    any type of sync or fence FD supported by the native system they are
1477e5c31af7Sopenharmony_ci    running on.
1478e5c31af7Sopenharmony_ci
1479e5c31af7Sopenharmony_ci<<<
1480e5c31af7Sopenharmony_ci
1481e5c31af7Sopenharmony_ciSome external fence handle types can only be shared within the same
1482e5c31af7Sopenharmony_ciunderlying physical device and/or the same driver version, as defined in the
1483e5c31af7Sopenharmony_cifollowing table:
1484e5c31af7Sopenharmony_ci
1485e5c31af7Sopenharmony_ci[[external-fence-handle-types-compatibility]]
1486e5c31af7Sopenharmony_ci.External fence handle types compatibility
1487e5c31af7Sopenharmony_ci|====
1488e5c31af7Sopenharmony_ci| Handle type | sname:VkPhysicalDeviceIDProperties{wbro}::pname:driverUUID | sname:VkPhysicalDeviceIDProperties{wbro}::pname:deviceUUID
1489e5c31af7Sopenharmony_ci| ename:VK_EXTERNAL_FENCE_HANDLE_TYPE_OPAQUE_FD_BIT | Must match | Must match
1490e5c31af7Sopenharmony_ci| ename:VK_EXTERNAL_FENCE_HANDLE_TYPE_OPAQUE_WIN32_BIT | Must match | Must match
1491e5c31af7Sopenharmony_ci| ename:VK_EXTERNAL_FENCE_HANDLE_TYPE_OPAQUE_WIN32_KMT_BIT | Must match | Must match
1492e5c31af7Sopenharmony_ci| ename:VK_EXTERNAL_FENCE_HANDLE_TYPE_SYNC_FD_BIT | No restriction | No restriction
1493e5c31af7Sopenharmony_ci|====
1494e5c31af7Sopenharmony_ci--
1495e5c31af7Sopenharmony_ci
1496e5c31af7Sopenharmony_ci[open,refpage='VkExternalFenceHandleTypeFlags',desc='Bitmask of VkExternalFenceHandleTypeFlagBits',type='flags']
1497e5c31af7Sopenharmony_ci--
1498e5c31af7Sopenharmony_ciinclude::{generated}/api/flags/VkExternalFenceHandleTypeFlags.txt[]
1499e5c31af7Sopenharmony_ci
1500e5c31af7Sopenharmony_ciifdef::VK_KHR_external_fence_capabilities[]
1501e5c31af7Sopenharmony_cior the equivalent
1502e5c31af7Sopenharmony_ci
1503e5c31af7Sopenharmony_ciinclude::{generated}/api/flags/VkExternalFenceHandleTypeFlagsKHR.txt[]
1504e5c31af7Sopenharmony_ciendif::VK_KHR_external_fence_capabilities[]
1505e5c31af7Sopenharmony_ci
1506e5c31af7Sopenharmony_citname:VkExternalFenceHandleTypeFlags is a bitmask type for setting a mask of
1507e5c31af7Sopenharmony_cizero or more elink:VkExternalFenceHandleTypeFlagBits.
1508e5c31af7Sopenharmony_ci--
1509e5c31af7Sopenharmony_ci
1510e5c31af7Sopenharmony_ci[open,refpage='VkExternalFenceProperties',desc='Structure describing supported external fence handle features',type='structs']
1511e5c31af7Sopenharmony_ci--
1512e5c31af7Sopenharmony_ciThe sname:VkExternalFenceProperties structure is defined as:
1513e5c31af7Sopenharmony_ci
1514e5c31af7Sopenharmony_ciinclude::{generated}/api/structs/VkExternalFenceProperties.txt[]
1515e5c31af7Sopenharmony_ci
1516e5c31af7Sopenharmony_ciifdef::VK_KHR_external_fence_capabilities[]
1517e5c31af7Sopenharmony_cior the equivalent
1518e5c31af7Sopenharmony_ci
1519e5c31af7Sopenharmony_ciinclude::{generated}/api/structs/VkExternalFencePropertiesKHR.txt[]
1520e5c31af7Sopenharmony_ciendif::VK_KHR_external_fence_capabilities[]
1521e5c31af7Sopenharmony_ci
1522e5c31af7Sopenharmony_ci  * pname:exportFromImportedHandleTypes is a bitmask of
1523e5c31af7Sopenharmony_ci    elink:VkExternalFenceHandleTypeFlagBits indicating which types of
1524e5c31af7Sopenharmony_ci    imported handle pname:handleType can: be exported from.
1525e5c31af7Sopenharmony_ci  * pname:compatibleHandleTypes is a bitmask of
1526e5c31af7Sopenharmony_ci    elink:VkExternalFenceHandleTypeFlagBits specifying handle types which
1527e5c31af7Sopenharmony_ci    can: be specified at the same time as pname:handleType when creating a
1528e5c31af7Sopenharmony_ci    fence.
1529e5c31af7Sopenharmony_ci  * pname:externalFenceFeatures is a bitmask of
1530e5c31af7Sopenharmony_ci    elink:VkExternalFenceFeatureFlagBits indicating the features of
1531e5c31af7Sopenharmony_ci    pname:handleType.
1532e5c31af7Sopenharmony_ci
1533e5c31af7Sopenharmony_ciIf pname:handleType is not supported by the implementation, then
1534e5c31af7Sopenharmony_cislink:VkExternalFenceProperties::pname:externalFenceFeatures will be set to
1535e5c31af7Sopenharmony_cizero.
1536e5c31af7Sopenharmony_ci
1537e5c31af7Sopenharmony_ciinclude::{generated}/validity/structs/VkExternalFenceProperties.txt[]
1538e5c31af7Sopenharmony_ci--
1539e5c31af7Sopenharmony_ci
1540e5c31af7Sopenharmony_ci[open,refpage='VkExternalFenceFeatureFlagBits',desc='Bitfield describing features of an external fence handle type',type='enums']
1541e5c31af7Sopenharmony_ci--
1542e5c31af7Sopenharmony_ciBits which may: be set in
1543e5c31af7Sopenharmony_cislink:VkExternalFenceProperties::pname:externalFenceFeatures, indicating
1544e5c31af7Sopenharmony_cifeatures of a fence external handle type, are:
1545e5c31af7Sopenharmony_ci
1546e5c31af7Sopenharmony_ciinclude::{generated}/api/enums/VkExternalFenceFeatureFlagBits.txt[]
1547e5c31af7Sopenharmony_ci
1548e5c31af7Sopenharmony_ciifdef::VK_KHR_external_fence_capabilities[]
1549e5c31af7Sopenharmony_cior the equivalent
1550e5c31af7Sopenharmony_ci
1551e5c31af7Sopenharmony_ciinclude::{generated}/api/enums/VkExternalFenceFeatureFlagBitsKHR.txt[]
1552e5c31af7Sopenharmony_ciendif::VK_KHR_external_fence_capabilities[]
1553e5c31af7Sopenharmony_ci
1554e5c31af7Sopenharmony_ci  * ename:VK_EXTERNAL_FENCE_FEATURE_EXPORTABLE_BIT specifies handles of this
1555e5c31af7Sopenharmony_ci    type can: be exported from Vulkan fence objects.
1556e5c31af7Sopenharmony_ci  * ename:VK_EXTERNAL_FENCE_FEATURE_IMPORTABLE_BIT specifies handles of this
1557e5c31af7Sopenharmony_ci    type can: be imported to Vulkan fence objects.
1558e5c31af7Sopenharmony_ci--
1559e5c31af7Sopenharmony_ci
1560e5c31af7Sopenharmony_ci[open,refpage='VkExternalFenceFeatureFlags',desc='Bitmask of VkExternalFenceFeatureFlagBits',type='flags']
1561e5c31af7Sopenharmony_ci--
1562e5c31af7Sopenharmony_ciinclude::{generated}/api/flags/VkExternalFenceFeatureFlags.txt[]
1563e5c31af7Sopenharmony_ci
1564e5c31af7Sopenharmony_ciifdef::VK_KHR_external_fence_capabilities[]
1565e5c31af7Sopenharmony_cior the equivalent
1566e5c31af7Sopenharmony_ci
1567e5c31af7Sopenharmony_ciinclude::{generated}/api/flags/VkExternalFenceFeatureFlagsKHR.txt[]
1568e5c31af7Sopenharmony_ciendif::VK_KHR_external_fence_capabilities[]
1569e5c31af7Sopenharmony_ci
1570e5c31af7Sopenharmony_citname:VkExternalFenceFeatureFlags is a bitmask type for setting a mask of
1571e5c31af7Sopenharmony_cizero or more elink:VkExternalFenceFeatureFlagBits.
1572e5c31af7Sopenharmony_ci--
1573e5c31af7Sopenharmony_ciendif::VK_VERSION_1_1,VK_KHR_external_fence_capabilities[]
1574e5c31af7Sopenharmony_ci
1575e5c31af7Sopenharmony_ci
1576e5c31af7Sopenharmony_ciifdef::VK_EXT_calibrated_timestamps[]
1577e5c31af7Sopenharmony_ci[[features-timestamp-calibration]]
1578e5c31af7Sopenharmony_ci== Timestamp Calibration Capabilities
1579e5c31af7Sopenharmony_ci
1580e5c31af7Sopenharmony_ci[open,refpage='vkGetPhysicalDeviceCalibrateableTimeDomainsEXT',desc='Query calibrateable time domains',type='protos']
1581e5c31af7Sopenharmony_ci--
1582e5c31af7Sopenharmony_ciTo query the set of time domains for which a physical device supports
1583e5c31af7Sopenharmony_citimestamp calibration, call:
1584e5c31af7Sopenharmony_ci
1585e5c31af7Sopenharmony_ciinclude::{generated}/api/protos/vkGetPhysicalDeviceCalibrateableTimeDomainsEXT.txt[]
1586e5c31af7Sopenharmony_ci
1587e5c31af7Sopenharmony_ci  * pname:physicalDevice is the physical device from which to query the set
1588e5c31af7Sopenharmony_ci    of calibrateable time domains.
1589e5c31af7Sopenharmony_ci  * pname:pTimeDomainCount is a pointer to an integer related to the number
1590e5c31af7Sopenharmony_ci    of calibrateable time domains available or queried, as described below.
1591e5c31af7Sopenharmony_ci  * pname:pTimeDomains is either `NULL` or a pointer to an array of
1592e5c31af7Sopenharmony_ci    elink:VkTimeDomainEXT values, indicating the supported calibrateable
1593e5c31af7Sopenharmony_ci    time domains.
1594e5c31af7Sopenharmony_ci
1595e5c31af7Sopenharmony_ciIf pname:pTimeDomains is `NULL`, then the number of calibrateable time
1596e5c31af7Sopenharmony_cidomains supported for the given pname:physicalDevice is returned in
1597e5c31af7Sopenharmony_cipname:pTimeDomainCount.
1598e5c31af7Sopenharmony_ciOtherwise, pname:pTimeDomainCount must: point to a variable set by the user
1599e5c31af7Sopenharmony_cito the number of elements in the pname:pTimeDomains array, and on return the
1600e5c31af7Sopenharmony_civariable is overwritten with the number of values actually written to
1601e5c31af7Sopenharmony_cipname:pTimeDomains.
1602e5c31af7Sopenharmony_ciIf the value of pname:pTimeDomainCount is less than the number of
1603e5c31af7Sopenharmony_cicalibrateable time domains supported, at most pname:pTimeDomainCount values
1604e5c31af7Sopenharmony_ciwill be written to pname:pTimeDomains, and ename:VK_INCOMPLETE will be
1605e5c31af7Sopenharmony_cireturned instead of ename:VK_SUCCESS, to indicate that not all the available
1606e5c31af7Sopenharmony_citime domains were returned.
1607e5c31af7Sopenharmony_ci
1608e5c31af7Sopenharmony_ciinclude::{generated}/validity/protos/vkGetPhysicalDeviceCalibrateableTimeDomainsEXT.txt[]
1609e5c31af7Sopenharmony_ci--
1610e5c31af7Sopenharmony_ciendif::VK_EXT_calibrated_timestamps[]
1611