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