1e5c31af7Sopenharmony_ci// Copyright 2016-2024 The Khronos Group Inc.
2e5c31af7Sopenharmony_ci//
3e5c31af7Sopenharmony_ci// SPDX-License-Identifier: CC-BY-4.0
4e5c31af7Sopenharmony_ci
5e5c31af7Sopenharmony_ci[appendix]
6e5c31af7Sopenharmony_ci[[boilerplate]]
7e5c31af7Sopenharmony_ci= API Boilerplate
8e5c31af7Sopenharmony_ci
9e5c31af7Sopenharmony_ciThis appendix defines Vulkan API features that are infrastructure required
10e5c31af7Sopenharmony_cifor a complete functional description of Vulkan, but do not logically belong
11e5c31af7Sopenharmony_cielsewhere in the Specification.
12e5c31af7Sopenharmony_ci
13e5c31af7Sopenharmony_ci
14e5c31af7Sopenharmony_ci[[boilerplate-headers]]
15e5c31af7Sopenharmony_ci== Vulkan Header Files
16e5c31af7Sopenharmony_ci
17e5c31af7Sopenharmony_ciVulkan is defined as an API in the C99 language.
18e5c31af7Sopenharmony_ciKhronos provides a corresponding set of header files for applications using
19e5c31af7Sopenharmony_cithe API, which may be used in either C or C++ code.
20e5c31af7Sopenharmony_ciThe interface descriptions in the specification are the same as the
21e5c31af7Sopenharmony_ciinterfaces defined in these header files, and both are derived from the
22e5c31af7Sopenharmony_ci`vk.xml` XML API Registry, which is the canonical machine-readable
23e5c31af7Sopenharmony_cidescription of the Vulkan API.
24e5c31af7Sopenharmony_ciThe Registry, scripts used for processing it into various forms, and
25e5c31af7Sopenharmony_cidocumentation of the registry schema are available as described at
26e5c31af7Sopenharmony_ciifndef::VKSC_VERSION_1_0[https://registry.khronos.org/vulkan/#apiregistry .]
27e5c31af7Sopenharmony_ciifdef::VKSC_VERSION_1_0[https://registry.khronos.org/vulkansc/#apiregistry .]
28e5c31af7Sopenharmony_ci
29e5c31af7Sopenharmony_ciLanguage bindings for other languages can be defined using the information
30e5c31af7Sopenharmony_ciin the Specification and the Registry.
31e5c31af7Sopenharmony_ciKhronos does not provide any such bindings, but third-party developers have
32e5c31af7Sopenharmony_cicreated some additional bindings.
33e5c31af7Sopenharmony_ci
34e5c31af7Sopenharmony_ci
35e5c31af7Sopenharmony_ci[[boilerplate-vulkan-h]]
36e5c31af7Sopenharmony_ci=== Vulkan Combined API Header `{full_header}` (Informative)
37e5c31af7Sopenharmony_ci
38e5c31af7Sopenharmony_ciApplications normally will include the header `{full_header}`.
39e5c31af7Sopenharmony_ciIn turn, `{full_header}` always includes the following headers:
40e5c31af7Sopenharmony_ci
41e5c31af7Sopenharmony_ci  * <<boilerplate-platform-macros,`vk_platform.h`>>, defining
42e5c31af7Sopenharmony_ci    platform-specific macros and headers.
43e5c31af7Sopenharmony_ci  * <<boilerplate-vulkan-core,`{core_header}`>>, defining APIs for the
44e5c31af7Sopenharmony_ci    Vulkan core and all registered extensions _other_ than
45e5c31af7Sopenharmony_ci    <<boilerplate-wsi-header, window system-specific>> and
46e5c31af7Sopenharmony_ci    <<boilerplate-provisional-header, provisional>> extensions, which are
47e5c31af7Sopenharmony_ci    included in separate header files.
48e5c31af7Sopenharmony_ci
49e5c31af7Sopenharmony_ciIn addition, specific preprocessor macros defined at the time
50e5c31af7Sopenharmony_ci`{full_header}` is included cause header files for the corresponding window
51e5c31af7Sopenharmony_cisystem-specific and provisional interfaces to be included, as described
52e5c31af7Sopenharmony_cibelow.
53e5c31af7Sopenharmony_ci
54e5c31af7Sopenharmony_ci
55e5c31af7Sopenharmony_ci[[boilerplate-platform-macros]]
56e5c31af7Sopenharmony_ci=== Vulkan Platform-Specific Header `vk_platform.h` (Informative)
57e5c31af7Sopenharmony_ci
58e5c31af7Sopenharmony_ciPlatform-specific macros and interfaces are defined in `vk_platform.h`.
59e5c31af7Sopenharmony_ciThese macros are used to control platform-dependent behavior, and their
60e5c31af7Sopenharmony_ciexact definitions are under the control of specific platforms and Vulkan
61e5c31af7Sopenharmony_ciimplementations.
62e5c31af7Sopenharmony_ci
63e5c31af7Sopenharmony_ci
64e5c31af7Sopenharmony_ci[[boilerplate-platform-specific-calling-conventions]]
65e5c31af7Sopenharmony_ci==== Platform-Specific Calling Conventions
66e5c31af7Sopenharmony_ci
67e5c31af7Sopenharmony_ciOn many platforms the following macros are empty strings, causing platform-
68e5c31af7Sopenharmony_ciand compiler-specific default calling conventions to be used.
69e5c31af7Sopenharmony_ci
70e5c31af7Sopenharmony_ci[open,refpage='VKAPI_ATTR',desc='Vulkan function attribute macro',type='freeform',anchor='boilerplate-platform-specific-calling-conventions',xrefs='VKAPI_CALL VKAPI_PTR']
71e5c31af7Sopenharmony_ci--
72e5c31af7Sopenharmony_cidname:VKAPI_ATTR is a macro placed before the return type in Vulkan API
73e5c31af7Sopenharmony_cifunction declarations.
74e5c31af7Sopenharmony_ciThis macro controls calling conventions for C++11 and GCC/Clang-style
75e5c31af7Sopenharmony_cicompilers.
76e5c31af7Sopenharmony_ci--
77e5c31af7Sopenharmony_ci
78e5c31af7Sopenharmony_ci[open,refpage='VKAPI_CALL',desc='Vulkan function calling conventions macro',type='freeform',anchor='boilerplate-platform-specific-calling-conventions',xrefs='VKAPI_ATTR VKAPI_PTR']
79e5c31af7Sopenharmony_ci--
80e5c31af7Sopenharmony_cidname:VKAPI_CALL is a macro placed after the return type in Vulkan API
81e5c31af7Sopenharmony_cifunction declarations.
82e5c31af7Sopenharmony_ciThis macro controls calling conventions for MSVC-style compilers.
83e5c31af7Sopenharmony_ci--
84e5c31af7Sopenharmony_ci
85e5c31af7Sopenharmony_ci[open,refpage='VKAPI_PTR',desc='Vulkan function pointer calling conventions macro',type='freeform',anchor='boilerplate-platform-specific-calling-conventions',xrefs='VKAPI_ATTR VKAPI_CALL']
86e5c31af7Sopenharmony_ci--
87e5c31af7Sopenharmony_cidname:VKAPI_PTR is a macro placed between the '(' and '*' in Vulkan API
88e5c31af7Sopenharmony_cifunction pointer declarations.
89e5c31af7Sopenharmony_ciThis macro also controls calling conventions, and typically has the same
90e5c31af7Sopenharmony_cidefinition as dname:VKAPI_ATTR or dname:VKAPI_CALL, depending on the
91e5c31af7Sopenharmony_cicompiler.
92e5c31af7Sopenharmony_ci--
93e5c31af7Sopenharmony_ci
94e5c31af7Sopenharmony_ciWith these macros, a Vulkan function declaration takes the form of:
95e5c31af7Sopenharmony_ci
96e5c31af7Sopenharmony_ci[source,c++]
97e5c31af7Sopenharmony_ci----
98e5c31af7Sopenharmony_ciVKAPI_ATTR <return_type> VKAPI_CALL <command_name>(<command_parameters>);
99e5c31af7Sopenharmony_ci----
100e5c31af7Sopenharmony_ci
101e5c31af7Sopenharmony_ciAdditionally, a Vulkan function pointer type declaration takes the form of:
102e5c31af7Sopenharmony_ci
103e5c31af7Sopenharmony_ci[source,c++]
104e5c31af7Sopenharmony_ci----
105e5c31af7Sopenharmony_citypedef <return_type> (VKAPI_PTR *PFN_<command_name>)(<command_parameters>);
106e5c31af7Sopenharmony_ci----
107e5c31af7Sopenharmony_ci
108e5c31af7Sopenharmony_ci
109e5c31af7Sopenharmony_ci[[boilerplate-platform-specific-header-control]]
110e5c31af7Sopenharmony_ci==== Platform-Specific Header Control
111e5c31af7Sopenharmony_ci
112e5c31af7Sopenharmony_ci[open,refpage='VK_NO_STDINT_H',desc='Control definition of <stdint.h> types',type='freeform',anchor='boilerplate-platform-specific-header-control']
113e5c31af7Sopenharmony_ci--
114e5c31af7Sopenharmony_ciIf the dname:VK_NO_STDINT_H macro is defined by the application at compile
115e5c31af7Sopenharmony_citime, extended integer types used by the Vulkan API, such as code:uint8_t,
116e5c31af7Sopenharmony_cimust: also be defined by the application.
117e5c31af7Sopenharmony_ciOtherwise, the Vulkan headers will not compile.
118e5c31af7Sopenharmony_ciIf dname:VK_NO_STDINT_H is not defined, the system `<stdint.h>` is used to
119e5c31af7Sopenharmony_cidefine these types.
120e5c31af7Sopenharmony_ciThere is a fallback path when Microsoft Visual Studio version 2008 and
121e5c31af7Sopenharmony_ciearlier versions are detected at compile time.
122e5c31af7Sopenharmony_ci--
123e5c31af7Sopenharmony_ci
124e5c31af7Sopenharmony_ci[open,refpage='VK_NO_STDDEF_H',desc='Control definition of <stddef.h> types',type='freeform',anchor='boilerplate-platform-specific-header-control']
125e5c31af7Sopenharmony_ci--
126e5c31af7Sopenharmony_ciIf the dname:VK_NO_STDDEF_H macro is defined by the application at compile
127e5c31af7Sopenharmony_citime, code:size_t, must: also be defined by the application.
128e5c31af7Sopenharmony_ciOtherwise, the Vulkan headers will not compile.
129e5c31af7Sopenharmony_ciIf dname:VK_NO_STDDEF_H is not defined, the system `<stddef.h>` is used to
130e5c31af7Sopenharmony_cidefine this type.
131e5c31af7Sopenharmony_ci--
132e5c31af7Sopenharmony_ci
133e5c31af7Sopenharmony_ci
134e5c31af7Sopenharmony_ci[[boilerplate-vulkan-core]]
135e5c31af7Sopenharmony_ci=== Vulkan Core API Header `{core_header}`
136e5c31af7Sopenharmony_ci
137e5c31af7Sopenharmony_ciApplications that do not make use of window system-specific extensions may
138e5c31af7Sopenharmony_cisimply include `{core_header}` instead of `{full_header}`, although there is
139e5c31af7Sopenharmony_ciusually no reason to do so.
140e5c31af7Sopenharmony_ciIn addition to the Vulkan API, `{core_header}` also defines a small number
141e5c31af7Sopenharmony_ciof C preprocessor macros that are described below.
142e5c31af7Sopenharmony_ci
143e5c31af7Sopenharmony_ciifdef::VKSC_VERSION_1_0[]
144e5c31af7Sopenharmony_ci`{core_header_hpp}` provides the same functionality as `{core_header}`, but
145e5c31af7Sopenharmony_cidoes so in a manner that is aligned for compliance with MISRA C++.
146e5c31af7Sopenharmony_ciIn contrast, `{core_header}` is aligned for compliance with MISRA C:2012.
147e5c31af7Sopenharmony_ciendif::VKSC_VERSION_1_0[]
148e5c31af7Sopenharmony_ci
149e5c31af7Sopenharmony_ci
150e5c31af7Sopenharmony_ci
151e5c31af7Sopenharmony_ci
152e5c31af7Sopenharmony_ci==== Vulkan Header File Version Number
153e5c31af7Sopenharmony_ci
154e5c31af7Sopenharmony_ci[open,refpage='VK_HEADER_VERSION',desc='Vulkan header file version number',type='defines']
155e5c31af7Sopenharmony_ci--
156e5c31af7Sopenharmony_cidname:VK_HEADER_VERSION is the version number of the `{core_header}` header.
157e5c31af7Sopenharmony_ciThis value is kept synchronized with the patch version of the released
158e5c31af7Sopenharmony_ciSpecification.
159e5c31af7Sopenharmony_ci
160e5c31af7Sopenharmony_ciinclude::{generated}/api/defines/VK_HEADER_VERSION.adoc[]
161e5c31af7Sopenharmony_ci--
162e5c31af7Sopenharmony_ci
163e5c31af7Sopenharmony_ci[open,refpage='VK_HEADER_VERSION_COMPLETE',desc='Vulkan header file complete version number',type='defines']
164e5c31af7Sopenharmony_ci--
165e5c31af7Sopenharmony_cidname:VK_HEADER_VERSION_COMPLETE is the complete version number of the
166e5c31af7Sopenharmony_ci`{core_header}` header, comprising the major, minor, and patch versions.
167e5c31af7Sopenharmony_ciThe major/minor values are kept synchronized with the complete version of
168e5c31af7Sopenharmony_cithe released Specification.
169e5c31af7Sopenharmony_ciThis value is intended for use by automated tools to identify exactly which
170e5c31af7Sopenharmony_civersion of the header was used during their generation.
171e5c31af7Sopenharmony_ci
172e5c31af7Sopenharmony_ciApplications should not use this value as their
173e5c31af7Sopenharmony_cislink:VkApplicationInfo::pname:apiVersion.
174e5c31af7Sopenharmony_ciInstead applications should explicitly select a specific fixed major/minor
175e5c31af7Sopenharmony_ciAPI version using, for example, one of the dname:VK_API_VERSION_*_* values.
176e5c31af7Sopenharmony_ci
177e5c31af7Sopenharmony_ciinclude::{generated}/api/defines/VK_HEADER_VERSION_COMPLETE.adoc[]
178e5c31af7Sopenharmony_ci--
179e5c31af7Sopenharmony_ci
180e5c31af7Sopenharmony_ciifndef::VKSC_VERSION_1_0[]
181e5c31af7Sopenharmony_ci[open,refpage='VK_API_VERSION',desc='Deprecated version number macro',type='defines']
182e5c31af7Sopenharmony_ci--
183e5c31af7Sopenharmony_cidname:VK_API_VERSION is now commented out of `{core_header}` and cannot: be
184e5c31af7Sopenharmony_ciused.
185e5c31af7Sopenharmony_ci
186e5c31af7Sopenharmony_ciinclude::{generated}/api/defines/VK_API_VERSION.adoc[]
187e5c31af7Sopenharmony_ci--
188e5c31af7Sopenharmony_ciendif::VKSC_VERSION_1_0[]
189e5c31af7Sopenharmony_ci
190e5c31af7Sopenharmony_ci==== Vulkan Handle Macros
191e5c31af7Sopenharmony_ci
192e5c31af7Sopenharmony_ci[open,refpage='VK_DEFINE_HANDLE',desc='Declare a dispatchable object handle',type='defines',xrefs='VkCommandBuffer VkDevice VkInstance VkPhysicalDevice VkQueue']
193e5c31af7Sopenharmony_ci--
194e5c31af7Sopenharmony_cidname:VK_DEFINE_HANDLE defines a <<fundamentals-objectmodel-overview,
195e5c31af7Sopenharmony_cidispatchable handle>> type.
196e5c31af7Sopenharmony_ci
197e5c31af7Sopenharmony_ciinclude::{generated}/api/defines/VK_DEFINE_HANDLE.adoc[]
198e5c31af7Sopenharmony_ci
199e5c31af7Sopenharmony_ci  * pname:object is the name of the resulting C type.
200e5c31af7Sopenharmony_ci
201e5c31af7Sopenharmony_ciThe only dispatchable handle types are those related to device and instance
202e5c31af7Sopenharmony_cimanagement, such as slink:VkDevice.
203e5c31af7Sopenharmony_ci--
204e5c31af7Sopenharmony_ci
205e5c31af7Sopenharmony_ci[open,refpage='VK_DEFINE_NON_DISPATCHABLE_HANDLE',desc='Declare a non-dispatchable object handle',type='defines',xrefs='VkBuffer']
206e5c31af7Sopenharmony_ci--
207e5c31af7Sopenharmony_cidname:VK_DEFINE_NON_DISPATCHABLE_HANDLE defines a
208e5c31af7Sopenharmony_ci<<fundamentals-objectmodel-overview, non-dispatchable handle>> type.
209e5c31af7Sopenharmony_ci
210e5c31af7Sopenharmony_ciinclude::{generated}/api/defines/VK_DEFINE_NON_DISPATCHABLE_HANDLE.adoc[]
211e5c31af7Sopenharmony_ci
212e5c31af7Sopenharmony_ci  * pname:object is the name of the resulting C type.
213e5c31af7Sopenharmony_ci
214e5c31af7Sopenharmony_ciMost Vulkan handle types, such as slink:VkBuffer, are non-dispatchable.
215e5c31af7Sopenharmony_ci
216e5c31af7Sopenharmony_ci[NOTE]
217e5c31af7Sopenharmony_ci.Note
218e5c31af7Sopenharmony_ci====
219e5c31af7Sopenharmony_ciThe `{core_header}` header allows the
220e5c31af7Sopenharmony_cidlink:VK_DEFINE_NON_DISPATCHABLE_HANDLE and dlink:VK_NULL_HANDLE definitions
221e5c31af7Sopenharmony_cito be overridden by the application.
222e5c31af7Sopenharmony_ciIf dlink:VK_DEFINE_NON_DISPATCHABLE_HANDLE is already defined when
223e5c31af7Sopenharmony_ci`{core_header}` is compiled, the default definitions for
224e5c31af7Sopenharmony_cidlink:VK_DEFINE_NON_DISPATCHABLE_HANDLE and dlink:VK_NULL_HANDLE are
225e5c31af7Sopenharmony_ciskipped.
226e5c31af7Sopenharmony_ciThis allows the application to define a binary-compatible custom handle
227e5c31af7Sopenharmony_ciwhich may: provide more type-safety or other features needed by the
228e5c31af7Sopenharmony_ciapplication.
229e5c31af7Sopenharmony_ciApplications must: not define handles in a way that is not binary compatible
230e5c31af7Sopenharmony_ci- where binary compatibility is platform dependent.
231e5c31af7Sopenharmony_ci====
232e5c31af7Sopenharmony_ci--
233e5c31af7Sopenharmony_ci
234e5c31af7Sopenharmony_ci[open,refpage='VK_NULL_HANDLE',desc='Reserved non-valid object handle',type='defines']
235e5c31af7Sopenharmony_ci--
236e5c31af7Sopenharmony_cidname:VK_NULL_HANDLE is a reserved value representing a non-valid object
237e5c31af7Sopenharmony_cihandle.
238e5c31af7Sopenharmony_ciIt may be passed to and returned from Vulkan commands only when
239e5c31af7Sopenharmony_ci<<fundamentals-validusage-handles, specifically allowed>>.
240e5c31af7Sopenharmony_ci
241e5c31af7Sopenharmony_ciinclude::{generated}/api/defines/VK_NULL_HANDLE.adoc[]
242e5c31af7Sopenharmony_ci--
243e5c31af7Sopenharmony_ci
244e5c31af7Sopenharmony_ci[open,refpage='VK_USE_64_BIT_PTR_DEFINES',desc='Defines whether non-dispatchable handles are a 64-bit pointer type or a 64-bit unsigned integer type',type='defines']
245e5c31af7Sopenharmony_ci--
246e5c31af7Sopenharmony_cidname:VK_USE_64_BIT_PTR_DEFINES defines whether the default non-dispatchable
247e5c31af7Sopenharmony_cihandles are declared using either a 64-bit pointer type or a 64-bit unsigned
248e5c31af7Sopenharmony_ciinteger type.
249e5c31af7Sopenharmony_ci
250e5c31af7Sopenharmony_cidname:VK_USE_64_BIT_PTR_DEFINES is set to '1' to use a 64-bit pointer type
251e5c31af7Sopenharmony_cior any other value to use a 64-bit unsigned integer type.
252e5c31af7Sopenharmony_ci
253e5c31af7Sopenharmony_ciinclude::{generated}/api/defines/VK_USE_64_BIT_PTR_DEFINES.adoc[]
254e5c31af7Sopenharmony_ci
255e5c31af7Sopenharmony_ci[NOTE]
256e5c31af7Sopenharmony_ci.Note
257e5c31af7Sopenharmony_ci====
258e5c31af7Sopenharmony_ciThe `{core_header}` header allows the dname:VK_USE_64_BIT_PTR_DEFINES
259e5c31af7Sopenharmony_cidefinition to be overridden by the application.
260e5c31af7Sopenharmony_ciThis allows the application to select either a 64-bit pointer type or a
261e5c31af7Sopenharmony_ci64-bit unsigned integer type for non-dispatchable handles in the case where
262e5c31af7Sopenharmony_cithe predefined preprocessor check does not identify the desired
263e5c31af7Sopenharmony_ciconfiguration.
264e5c31af7Sopenharmony_ci====
265e5c31af7Sopenharmony_ci
266e5c31af7Sopenharmony_ciifndef::VKSC_VERSION_1_0[]
267e5c31af7Sopenharmony_ci[NOTE]
268e5c31af7Sopenharmony_ci.Note
269e5c31af7Sopenharmony_ci====
270e5c31af7Sopenharmony_ciThis macro was introduced starting with the Vulkan 1.2.174 headers, and its
271e5c31af7Sopenharmony_ciavailability can be checked at compile time by requiring
272e5c31af7Sopenharmony_ci`dname:VK_HEADER_VERSION >= 174`.
273e5c31af7Sopenharmony_ci
274e5c31af7Sopenharmony_ciIt is not available if you are using older headers, such as may be shipped
275e5c31af7Sopenharmony_ciwith an older Vulkan SDK.
276e5c31af7Sopenharmony_ciDevelopers requiring this functionality may wish to include a copy of the
277e5c31af7Sopenharmony_cicurrent Vulkan headers with their project in this case.
278e5c31af7Sopenharmony_ci====
279e5c31af7Sopenharmony_ciendif::VKSC_VERSION_1_0[]
280e5c31af7Sopenharmony_ci--
281e5c31af7Sopenharmony_ci
282e5c31af7Sopenharmony_ci
283e5c31af7Sopenharmony_ci[[boilerplate-wsi-header]]
284e5c31af7Sopenharmony_ci== Window System-Specific Header Control (Informative)
285e5c31af7Sopenharmony_ci
286e5c31af7Sopenharmony_ci[open,refpage='WSIheaders',desc='Control inclusion of window system interface extensions',type='freeform',anchor='boilerplate-wsi-header',xrefs='provisional-headers']
287e5c31af7Sopenharmony_ci--
288e5c31af7Sopenharmony_ciTo use a Vulkan extension supporting a platform-specific window system,
289e5c31af7Sopenharmony_ciheader files for that window system must: be included at compile time, or
290e5c31af7Sopenharmony_ciplatform-specific types must: be forward-declared.
291e5c31af7Sopenharmony_ciThe Vulkan header files are unable to determine whether or not an external
292e5c31af7Sopenharmony_ciheader is available at compile time, so platform-specific extensions are
293e5c31af7Sopenharmony_ciprovided in separate headers from the core API and platform-independent
294e5c31af7Sopenharmony_ciextensions, allowing applications to decide which ones they need to be
295e5c31af7Sopenharmony_cidefined and how the external headers are included.
296e5c31af7Sopenharmony_ci
297e5c31af7Sopenharmony_ciExtensions dependent on particular sets of platform headers, or that
298e5c31af7Sopenharmony_ciforward-declare platform-specific types, are declared in a header named for
299e5c31af7Sopenharmony_cithat platform.
300e5c31af7Sopenharmony_ciBefore including these platform-specific Vulkan headers, applications must:
301e5c31af7Sopenharmony_ciinclude both `{core_header}` and any external native headers the platform
302e5c31af7Sopenharmony_ciextensions depend on.
303e5c31af7Sopenharmony_ci
304e5c31af7Sopenharmony_ciAs a convenience for applications that do not need the flexibility of
305e5c31af7Sopenharmony_ciseparate platform-specific Vulkan headers, `{full_header}` includes
306e5c31af7Sopenharmony_ci`{core_header}`, and then conditionally includes platform-specific Vulkan
307e5c31af7Sopenharmony_ciheaders and the external headers they depend on.
308e5c31af7Sopenharmony_ciApplications control which platform-specific headers are included by
309e5c31af7Sopenharmony_ci#defining macros before including `{full_header}`.
310e5c31af7Sopenharmony_ci
311e5c31af7Sopenharmony_ciThe correspondence between platform-specific extensions, external headers
312e5c31af7Sopenharmony_cithey require, the platform-specific header which declares them, and the
313e5c31af7Sopenharmony_cipreprocessor macros which enable inclusion by `{full_header}` are shown in
314e5c31af7Sopenharmony_cithe <<boilerplate-wsi-header-table,following table>>.
315e5c31af7Sopenharmony_ci
316e5c31af7Sopenharmony_ci[[boilerplate-wsi-header-table]]
317e5c31af7Sopenharmony_ci.Window System Extensions and Headers
318e5c31af7Sopenharmony_ci[options="header"]
319e5c31af7Sopenharmony_ci|====
320e5c31af7Sopenharmony_ci| Extension Name                        | Window System Name     | Platform-specific Header | Required External Headers  | Controlling `{full_header}` Macro
321e5c31af7Sopenharmony_ci| `apiext:VK_KHR_android_surface`       | Android                | `vulkan_android.h`       | None                       | dname:VK_USE_PLATFORM_ANDROID_KHR
322e5c31af7Sopenharmony_ci| `apiext:VK_KHR_wayland_surface`       | Wayland                | `vulkan_wayland.h`       | `<wayland-client.h>`       | dname:VK_USE_PLATFORM_WAYLAND_KHR
323e5c31af7Sopenharmony_ci| `apiext:VK_KHR_win32_surface`,
324e5c31af7Sopenharmony_ci  `apiext:VK_KHR_external_memory_win32`,
325e5c31af7Sopenharmony_ci  `apiext:VK_KHR_win32_keyed_mutex`,
326e5c31af7Sopenharmony_ci  `apiext:VK_KHR_external_semaphore_win32`,
327e5c31af7Sopenharmony_ci  `apiext:VK_KHR_external_fence_win32`,
328e5c31af7Sopenharmony_ci  `apiext:VK_NV_external_memory_win32`,
329e5c31af7Sopenharmony_ci  `apiext:VK_NV_win32_keyed_mutex`
330e5c31af7Sopenharmony_ci                                        | Microsoft Windows      | `vulkan_win32.h`         | `<windows.h>`              | dname:VK_USE_PLATFORM_WIN32_KHR
331e5c31af7Sopenharmony_ci| `apiext:VK_KHR_xcb_surface`           | X11 Xcb                | `vulkan_xcb.h`           | `<xcb/xcb.h>`              | dname:VK_USE_PLATFORM_XCB_KHR
332e5c31af7Sopenharmony_ci| `apiext:VK_KHR_xlib_surface`          | X11 Xlib               | `vulkan_xlib.h`          | `<X11/Xlib.h>`             | dname:VK_USE_PLATFORM_XLIB_KHR
333e5c31af7Sopenharmony_ci| `apiext:VK_EXT_directfb_surface`      | DirectFB               | `vulkan_directfb.h`      | `<directfb/directfb.h>`    | dname:VK_USE_PLATFORM_DIRECTFB_EXT
334e5c31af7Sopenharmony_ci| `apiext:VK_EXT_acquire_xlib_display`  | X11 XRAndR             | `vulkan_xlib_xrandr.h`   | `<X11/Xlib.h>`,
335e5c31af7Sopenharmony_ci                                                                                       `<X11/extensions{wbro}/Xrandr.h>` | dname:VK_USE_PLATFORM_XLIB_XRANDR_EXT
336e5c31af7Sopenharmony_ci| `apiext:VK_GGP_stream_descriptor_surface`,
337e5c31af7Sopenharmony_ci  `apiext:VK_GGP_frame_token`           | Google Games Platform  | `vulkan_ggp.h`           | <ggp_c/vulkan_types.h>     | dname:VK_USE_PLATFORM_GGP
338e5c31af7Sopenharmony_ci| `apiext:VK_MVK_ios_surface`           | iOS                    | `vulkan_ios.h`           | None                       | dname:VK_USE_PLATFORM_IOS_MVK
339e5c31af7Sopenharmony_ci| `apiext:VK_MVK_macos_surface`         | macOS                  | `vulkan_macos.h`         | None                       | dname:VK_USE_PLATFORM_MACOS_MVK
340e5c31af7Sopenharmony_ci| `apiext:VK_NN_vi_surface`             | VI                     | `vulkan_vi.h`            | None                       | dname:VK_USE_PLATFORM_VI_NN
341e5c31af7Sopenharmony_ci| `apiext:VK_FUCHSIA_imagepipe_surface` | Fuchsia                | `vulkan_fuchsia.h`       | `<zircon/types.h>`         | dname:VK_USE_PLATFORM_FUCHSIA
342e5c31af7Sopenharmony_ci| `apiext:VK_EXT_metal_surface`         | Metal on CoreAnimation | `vulkan_metal.h`         | None                       | dname:VK_USE_PLATFORM_METAL_EXT
343e5c31af7Sopenharmony_ci| `apiext:VK_QNX_screen_surface`        | QNX Screen             | `vulkan_screen.h`        | `<screen/screen.h>`        | dname:VK_USE_PLATFORM_SCREEN_QNX
344e5c31af7Sopenharmony_ciifdef::VKSC_VERSION_1_0[]
345e5c31af7Sopenharmony_ci| `apiext:VK_NV_external_sci_sync`, `apiext:VK_NV_external_sci_sync2`,
346e5c31af7Sopenharmony_ci  `apiext:VK_NV_external_memory_sci_buf`| NVIDIA Sci             | `vulkan_sci.h`           | `<nvscisync.h>`,
347e5c31af7Sopenharmony_ci                                                                                              `<nvscibuf.h>`             | dname:VK_USE_PLATFORM_SCI
348e5c31af7Sopenharmony_ciendif::VKSC_VERSION_1_0[]
349e5c31af7Sopenharmony_ci|====
350e5c31af7Sopenharmony_ci
351e5c31af7Sopenharmony_ci[NOTE]
352e5c31af7Sopenharmony_ci.Note
353e5c31af7Sopenharmony_ci====
354e5c31af7Sopenharmony_ciThis section describes the purpose of the headers independently of the
355e5c31af7Sopenharmony_cispecific underlying functionality of the window system extensions
356e5c31af7Sopenharmony_cithemselves.
357e5c31af7Sopenharmony_ciEach extension name will only link to a description of that extension when
358e5c31af7Sopenharmony_civiewing a specification built with that extension included.
359e5c31af7Sopenharmony_ci====
360e5c31af7Sopenharmony_ci--
361e5c31af7Sopenharmony_ci
362e5c31af7Sopenharmony_ci
363e5c31af7Sopenharmony_ci[[boilerplate-provisional-header]]
364e5c31af7Sopenharmony_ci== Provisional Extension Header Control (Informative)
365e5c31af7Sopenharmony_ci
366e5c31af7Sopenharmony_ci[open,refpage='provisional-headers',desc='Control inclusion of provisional extensions',type='freeform',alias='VK_ENABLE_BETA_EXTENSIONS',anchor='boilerplate-provisional-header',xrefs='WSIheaders']
367e5c31af7Sopenharmony_ci--
368e5c31af7Sopenharmony_ci_Provisional_ extensions should: not be used in production applications.
369e5c31af7Sopenharmony_ciThe functionality defined by such extensions may: change in ways that break
370e5c31af7Sopenharmony_cibackwards compatibility between revisions, and before final release of a
371e5c31af7Sopenharmony_cinon-provisional version of that extension.
372e5c31af7Sopenharmony_ci
373e5c31af7Sopenharmony_ciProvisional extensions are defined in a separate _provisional header_,
374e5c31af7Sopenharmony_ci`vulkan_beta.h`, allowing applications to decide whether or not to include
375e5c31af7Sopenharmony_cithem.
376e5c31af7Sopenharmony_ciThe mechanism is similar to <<boilerplate-wsi-header, window system-specific
377e5c31af7Sopenharmony_ciheaders>>: before including `vulkan_beta.h`, applications must: include
378e5c31af7Sopenharmony_ci`{core_header}`.
379e5c31af7Sopenharmony_ci
380e5c31af7Sopenharmony_ci[NOTE]
381e5c31af7Sopenharmony_ci.Note
382e5c31af7Sopenharmony_ci====
383e5c31af7Sopenharmony_ciSometimes a provisional extension will include a subset of its interfaces in
384e5c31af7Sopenharmony_ci`{core_header}`.
385e5c31af7Sopenharmony_ciThis may occur if the provisional extension is promoted from an existing
386e5c31af7Sopenharmony_civendor or EXT extension and some of the existing interfaces are defined as
387e5c31af7Sopenharmony_cialiases of the provisional extension interfaces.
388e5c31af7Sopenharmony_ciAll other interfaces of that provisional extension which are not aliased
389e5c31af7Sopenharmony_ciwill be included in `vulkan_beta.h`.
390e5c31af7Sopenharmony_ci====
391e5c31af7Sopenharmony_ci
392e5c31af7Sopenharmony_ciAs a convenience for applications, `{full_header}` conditionally includes
393e5c31af7Sopenharmony_ci`vulkan_beta.h`.
394e5c31af7Sopenharmony_ciApplications can: control inclusion of `vulkan_beta.h` by #defining the
395e5c31af7Sopenharmony_cimacro etext:VK_ENABLE_BETA_EXTENSIONS before including `{full_header}`.
396e5c31af7Sopenharmony_ci
397e5c31af7Sopenharmony_ci[NOTE]
398e5c31af7Sopenharmony_ci.Note
399e5c31af7Sopenharmony_ci====
400e5c31af7Sopenharmony_ciStarting in version 1.2.171 of the Specification, all provisional enumerants
401e5c31af7Sopenharmony_ciare protected by the macro etext:VK_ENABLE_BETA_EXTENSIONS.
402e5c31af7Sopenharmony_ciApplications needing to use provisional extensions must always define this
403e5c31af7Sopenharmony_cimacro, even if they are explicitly including `vulkan_beta.h`.
404e5c31af7Sopenharmony_ciThis is a minor change to behavior, affecting only provisional extensions.
405e5c31af7Sopenharmony_ci====
406e5c31af7Sopenharmony_ci
407e5c31af7Sopenharmony_ci[NOTE]
408e5c31af7Sopenharmony_ci.Note
409e5c31af7Sopenharmony_ci====
410e5c31af7Sopenharmony_ciThis section describes the purpose of the provisional header independently
411e5c31af7Sopenharmony_ciof the specific provisional extensions which are contained in that header at
412e5c31af7Sopenharmony_ciany given time.
413e5c31af7Sopenharmony_ciThe extension appendices for provisional extensions note their provisional
414e5c31af7Sopenharmony_cistatus, and link back to this section for more information.
415e5c31af7Sopenharmony_ciProvisional extensions are intended to provide early access for
416e5c31af7Sopenharmony_cibleeding-edge developers, with the understanding that extension interfaces
417e5c31af7Sopenharmony_cimay change in response to developer feedback.
418e5c31af7Sopenharmony_ciProvisional extensions are very likely to eventually be updated and released
419e5c31af7Sopenharmony_cias non-provisional extensions, but there is no guarantee this will happen,
420e5c31af7Sopenharmony_cior how long it will take if it does happen.
421e5c31af7Sopenharmony_ci====
422e5c31af7Sopenharmony_ci--
423e5c31af7Sopenharmony_ci
424e5c31af7Sopenharmony_ci
425e5c31af7Sopenharmony_ciifndef::VKSC_VERSION_1_0[]
426e5c31af7Sopenharmony_ci[[boilerplate-video-std-headers]]
427e5c31af7Sopenharmony_ci== Video Std Headers
428e5c31af7Sopenharmony_ci
429e5c31af7Sopenharmony_ciPerforming video coding operations usually involves the application having
430e5c31af7Sopenharmony_cito provide various parameters, data structures, or other syntax elements
431e5c31af7Sopenharmony_cispecific to the particular video compression standard used, and the
432e5c31af7Sopenharmony_ciassociated semantics are covered by the specification of those.
433e5c31af7Sopenharmony_ci
434e5c31af7Sopenharmony_ciThe interface descriptions of these are available in the header files
435e5c31af7Sopenharmony_ciderived from the `video.xml` XML file, which is the canonical
436e5c31af7Sopenharmony_cimachine-readable description of data structures and enumerations that are
437e5c31af7Sopenharmony_ciassociated with the externally-provided video compression standards.
438e5c31af7Sopenharmony_ci
439e5c31af7Sopenharmony_ci[[boilerplate-video-std-header-table]]
440e5c31af7Sopenharmony_ci.Video Std Headers
441e5c31af7Sopenharmony_ci[options="header"]
442e5c31af7Sopenharmony_ci|====
443e5c31af7Sopenharmony_ci| Video Std Header Name               | Description                             | Header File                                      | Related Extensions
444e5c31af7Sopenharmony_ci| `vulkan_video_codecs_common`        | Codec-independent common definitions    | `<vk_video/vulkan_video_codecs_common.h>`        | -
445e5c31af7Sopenharmony_ci| `vulkan_video_codec_h264std`        | ITU-T H.264 common definitions          | `<vk_video/vulkan_video_codec_h264std.h>`        | apiext:VK_KHR_video_decode_h264, apiext:VK_KHR_video_encode_h264
446e5c31af7Sopenharmony_ci| `vulkan_video_codec_h264std_decode` | ITU-T H.264 decode-specific definitions | `<vk_video/vulkan_video_codec_h264std_decode.h>` | apiext:VK_KHR_video_decode_h264
447e5c31af7Sopenharmony_ci| `vulkan_video_codec_h264std_encode` | ITU-T H.264 encode-specific definitions | `<vk_video/vulkan_video_codec_h264std_encode.h>` | apiext:VK_KHR_video_encode_h264
448e5c31af7Sopenharmony_ci| `vulkan_video_codec_h265std`        | ITU-T H.265 common definitions          | `<vk_video/vulkan_video_codec_h265std.h>`        | apiext:VK_KHR_video_decode_h265, apiext:VK_KHR_video_encode_h265
449e5c31af7Sopenharmony_ci| `vulkan_video_codec_h265std_decode` | ITU-T H.265 decode-specific definitions | `<vk_video/vulkan_video_codec_h265std_decode.h>` | apiext:VK_KHR_video_decode_h265
450e5c31af7Sopenharmony_ci| `vulkan_video_codec_h265std_encode` | ITU-T H.265 encode-specific definitions | `<vk_video/vulkan_video_codec_h265std_encode.h>` | apiext:VK_KHR_video_encode_h265
451e5c31af7Sopenharmony_ci|====
452e5c31af7Sopenharmony_ciendif::VKSC_VERSION_1_0[]
453