• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // *** THIS FILE IS GENERATED - DO NOT EDIT ***
2 // See helper_file_generator.py for modifications
3 
4 
5 /***************************************************************************
6  *
7  * Copyright (c) 2015-2019 The Khronos Group Inc.
8  * Copyright (c) 2015-2019 Valve Corporation
9  * Copyright (c) 2015-2019 LunarG, Inc.
10  * Copyright (c) 2015-2019 Google Inc.
11  *
12  * Licensed under the Apache License, Version 2.0 (the "License");
13  * you may not use this file except in compliance with the License.
14  * You may obtain a copy of the License at
15  *
16  *     http://www.apache.org/licenses/LICENSE-2.0
17  *
18  * Unless required by applicable law or agreed to in writing, software
19  * distributed under the License is distributed on an "AS IS" BASIS,
20  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
21  * See the License for the specific language governing permissions and
22  * limitations under the License.
23  *
24  * Author: Mark Lobodzinski <mark@lunarg.com>
25  * Author: Courtney Goeltzenleuchter <courtneygo@google.com>
26  * Author: Tobin Ehlis <tobine@google.com>
27  * Author: Chris Forbes <chrisforbes@google.com>
28  * Author: John Zulauf<jzulauf@lunarg.com>
29  *
30  ****************************************************************************/
31 
32 
33 #ifndef VK_EXTENSION_HELPER_H_
34 #define VK_EXTENSION_HELPER_H_
35 #include <unordered_set>
36 #include <string>
37 #include <unordered_map>
38 #include <utility>
39 #include <set>
40 #include <vector>
41 
42 #include <vulkan/vulkan.h>
43 
44 struct InstanceExtensions {
45     bool vk_feature_version_1_1{false};
46     bool vk_ext_acquire_xlib_display{false};
47     bool vk_ext_debug_report{false};
48     bool vk_ext_debug_utils{false};
49     bool vk_ext_direct_mode_display{false};
50     bool vk_ext_display_surface_counter{false};
51     bool vk_ext_headless_surface{false};
52     bool vk_ext_metal_surface{false};
53     bool vk_ext_swapchain_color_space{false};
54     bool vk_ext_validation_features{false};
55     bool vk_ext_validation_flags{false};
56     bool vk_fuchsia_imagepipe_surface{false};
57     bool vk_ggp_stream_descriptor_surface{false};
58     bool vk_khr_android_surface{false};
59     bool vk_khr_device_group_creation{false};
60     bool vk_khr_display{false};
61     bool vk_khr_external_fence_capabilities{false};
62     bool vk_khr_external_memory_capabilities{false};
63     bool vk_khr_external_semaphore_capabilities{false};
64     bool vk_khr_get_display_properties_2{false};
65     bool vk_khr_get_physical_device_properties_2{false};
66     bool vk_khr_get_surface_capabilities_2{false};
67     bool vk_khr_surface{false};
68     bool vk_khr_surface_protected_capabilities{false};
69     bool vk_khr_wayland_surface{false};
70     bool vk_khr_win32_surface{false};
71     bool vk_khr_xcb_surface{false};
72     bool vk_khr_xlib_surface{false};
73     bool vk_mvk_ios_surface{false};
74     bool vk_mvk_macos_surface{false};
75     bool vk_nn_vi_surface{false};
76     bool vk_nv_external_memory_capabilities{false};
77 
78     struct InstanceReq {
79         const bool InstanceExtensions::* enabled;
80         const char *name;
81     };
82     typedef std::vector<InstanceReq> InstanceReqVec;
83     struct InstanceInfo {
InstanceInfoInstanceExtensions::InstanceInfo84        InstanceInfo(bool InstanceExtensions::* state_, const InstanceReqVec requires_): state(state_), requires(requires_) {}
85        bool InstanceExtensions::* state;
86        InstanceReqVec requires;
87     };
88 
89     typedef std::unordered_map<std::string,InstanceInfo> InstanceInfoMap;
get_infoInstanceExtensions90     static const InstanceInfo &get_info(const char *name) {
91         static const InstanceInfoMap info_map = {
92             std::make_pair("VK_VERSION_1_1", InstanceInfo(&InstanceExtensions::vk_feature_version_1_1, {})),
93 #ifdef VK_USE_PLATFORM_XLIB_XRANDR_EXT
94             std::make_pair(VK_EXT_ACQUIRE_XLIB_DISPLAY_EXTENSION_NAME, InstanceInfo(&InstanceExtensions::vk_ext_acquire_xlib_display, {{
95                            {&InstanceExtensions::vk_ext_direct_mode_display, VK_EXT_DIRECT_MODE_DISPLAY_EXTENSION_NAME}}})),
96 #endif
97             std::make_pair(VK_EXT_DEBUG_REPORT_EXTENSION_NAME, InstanceInfo(&InstanceExtensions::vk_ext_debug_report, {})),
98             std::make_pair(VK_EXT_DEBUG_UTILS_EXTENSION_NAME, InstanceInfo(&InstanceExtensions::vk_ext_debug_utils, {})),
99             std::make_pair(VK_EXT_DIRECT_MODE_DISPLAY_EXTENSION_NAME, InstanceInfo(&InstanceExtensions::vk_ext_direct_mode_display, {{
100                            {&InstanceExtensions::vk_khr_display, VK_KHR_DISPLAY_EXTENSION_NAME}}})),
101             std::make_pair(VK_EXT_DISPLAY_SURFACE_COUNTER_EXTENSION_NAME, InstanceInfo(&InstanceExtensions::vk_ext_display_surface_counter, {{
102                            {&InstanceExtensions::vk_khr_display, VK_KHR_DISPLAY_EXTENSION_NAME}}})),
103             std::make_pair(VK_EXT_HEADLESS_SURFACE_EXTENSION_NAME, InstanceInfo(&InstanceExtensions::vk_ext_headless_surface, {{
104                            {&InstanceExtensions::vk_khr_surface, VK_KHR_SURFACE_EXTENSION_NAME}}})),
105 #ifdef VK_USE_PLATFORM_METAL_EXT
106             std::make_pair(VK_EXT_METAL_SURFACE_EXTENSION_NAME, InstanceInfo(&InstanceExtensions::vk_ext_metal_surface, {{
107                            {&InstanceExtensions::vk_khr_surface, VK_KHR_SURFACE_EXTENSION_NAME}}})),
108 #endif
109             std::make_pair(VK_EXT_SWAPCHAIN_COLOR_SPACE_EXTENSION_NAME, InstanceInfo(&InstanceExtensions::vk_ext_swapchain_color_space, {{
110                            {&InstanceExtensions::vk_khr_surface, VK_KHR_SURFACE_EXTENSION_NAME}}})),
111             std::make_pair(VK_EXT_VALIDATION_FEATURES_EXTENSION_NAME, InstanceInfo(&InstanceExtensions::vk_ext_validation_features, {})),
112             std::make_pair(VK_EXT_VALIDATION_FLAGS_EXTENSION_NAME, InstanceInfo(&InstanceExtensions::vk_ext_validation_flags, {})),
113 #ifdef VK_USE_PLATFORM_FUCHSIA
114             std::make_pair(VK_FUCHSIA_IMAGEPIPE_SURFACE_EXTENSION_NAME, InstanceInfo(&InstanceExtensions::vk_fuchsia_imagepipe_surface, {{
115                            {&InstanceExtensions::vk_khr_surface, VK_KHR_SURFACE_EXTENSION_NAME}}})),
116 #endif
117 #ifdef VK_USE_PLATFORM_GGP
118             std::make_pair(VK_GGP_STREAM_DESCRIPTOR_SURFACE_EXTENSION_NAME, InstanceInfo(&InstanceExtensions::vk_ggp_stream_descriptor_surface, {{
119                            {&InstanceExtensions::vk_khr_surface, VK_KHR_SURFACE_EXTENSION_NAME}}})),
120 #endif
121 #ifdef VK_USE_PLATFORM_ANDROID_KHR
122             std::make_pair(VK_KHR_ANDROID_SURFACE_EXTENSION_NAME, InstanceInfo(&InstanceExtensions::vk_khr_android_surface, {{
123                            {&InstanceExtensions::vk_khr_surface, VK_KHR_SURFACE_EXTENSION_NAME}}})),
124 #endif
125             std::make_pair(VK_KHR_DEVICE_GROUP_CREATION_EXTENSION_NAME, InstanceInfo(&InstanceExtensions::vk_khr_device_group_creation, {})),
126             std::make_pair(VK_KHR_DISPLAY_EXTENSION_NAME, InstanceInfo(&InstanceExtensions::vk_khr_display, {{
127                            {&InstanceExtensions::vk_khr_surface, VK_KHR_SURFACE_EXTENSION_NAME}}})),
128             std::make_pair(VK_KHR_EXTERNAL_FENCE_CAPABILITIES_EXTENSION_NAME, InstanceInfo(&InstanceExtensions::vk_khr_external_fence_capabilities, {{
129                            {&InstanceExtensions::vk_khr_get_physical_device_properties_2, VK_KHR_GET_PHYSICAL_DEVICE_PROPERTIES_2_EXTENSION_NAME}}})),
130             std::make_pair(VK_KHR_EXTERNAL_MEMORY_CAPABILITIES_EXTENSION_NAME, InstanceInfo(&InstanceExtensions::vk_khr_external_memory_capabilities, {{
131                            {&InstanceExtensions::vk_khr_get_physical_device_properties_2, VK_KHR_GET_PHYSICAL_DEVICE_PROPERTIES_2_EXTENSION_NAME}}})),
132             std::make_pair(VK_KHR_EXTERNAL_SEMAPHORE_CAPABILITIES_EXTENSION_NAME, InstanceInfo(&InstanceExtensions::vk_khr_external_semaphore_capabilities, {{
133                            {&InstanceExtensions::vk_khr_get_physical_device_properties_2, VK_KHR_GET_PHYSICAL_DEVICE_PROPERTIES_2_EXTENSION_NAME}}})),
134             std::make_pair(VK_KHR_GET_DISPLAY_PROPERTIES_2_EXTENSION_NAME, InstanceInfo(&InstanceExtensions::vk_khr_get_display_properties_2, {{
135                            {&InstanceExtensions::vk_khr_display, VK_KHR_DISPLAY_EXTENSION_NAME}}})),
136             std::make_pair(VK_KHR_GET_PHYSICAL_DEVICE_PROPERTIES_2_EXTENSION_NAME, InstanceInfo(&InstanceExtensions::vk_khr_get_physical_device_properties_2, {})),
137             std::make_pair(VK_KHR_GET_SURFACE_CAPABILITIES_2_EXTENSION_NAME, InstanceInfo(&InstanceExtensions::vk_khr_get_surface_capabilities_2, {{
138                            {&InstanceExtensions::vk_khr_surface, VK_KHR_SURFACE_EXTENSION_NAME}}})),
139             std::make_pair(VK_KHR_SURFACE_EXTENSION_NAME, InstanceInfo(&InstanceExtensions::vk_khr_surface, {})),
140             std::make_pair(VK_KHR_SURFACE_PROTECTED_CAPABILITIES_EXTENSION_NAME, InstanceInfo(&InstanceExtensions::vk_khr_surface_protected_capabilities, {{
141                            {&InstanceExtensions::vk_khr_get_surface_capabilities_2, VK_KHR_GET_SURFACE_CAPABILITIES_2_EXTENSION_NAME}}})),
142 #ifdef VK_USE_PLATFORM_WAYLAND_KHR
143             std::make_pair(VK_KHR_WAYLAND_SURFACE_EXTENSION_NAME, InstanceInfo(&InstanceExtensions::vk_khr_wayland_surface, {{
144                            {&InstanceExtensions::vk_khr_surface, VK_KHR_SURFACE_EXTENSION_NAME}}})),
145 #endif
146 #ifdef VK_USE_PLATFORM_WIN32_KHR
147             std::make_pair(VK_KHR_WIN32_SURFACE_EXTENSION_NAME, InstanceInfo(&InstanceExtensions::vk_khr_win32_surface, {{
148                            {&InstanceExtensions::vk_khr_surface, VK_KHR_SURFACE_EXTENSION_NAME}}})),
149 #endif
150 #ifdef VK_USE_PLATFORM_XCB_KHR
151             std::make_pair(VK_KHR_XCB_SURFACE_EXTENSION_NAME, InstanceInfo(&InstanceExtensions::vk_khr_xcb_surface, {{
152                            {&InstanceExtensions::vk_khr_surface, VK_KHR_SURFACE_EXTENSION_NAME}}})),
153 #endif
154 #ifdef VK_USE_PLATFORM_XLIB_KHR
155             std::make_pair(VK_KHR_XLIB_SURFACE_EXTENSION_NAME, InstanceInfo(&InstanceExtensions::vk_khr_xlib_surface, {{
156                            {&InstanceExtensions::vk_khr_surface, VK_KHR_SURFACE_EXTENSION_NAME}}})),
157 #endif
158 #ifdef VK_USE_PLATFORM_IOS_MVK
159             std::make_pair(VK_MVK_IOS_SURFACE_EXTENSION_NAME, InstanceInfo(&InstanceExtensions::vk_mvk_ios_surface, {{
160                            {&InstanceExtensions::vk_khr_surface, VK_KHR_SURFACE_EXTENSION_NAME}}})),
161 #endif
162 #ifdef VK_USE_PLATFORM_MACOS_MVK
163             std::make_pair(VK_MVK_MACOS_SURFACE_EXTENSION_NAME, InstanceInfo(&InstanceExtensions::vk_mvk_macos_surface, {{
164                            {&InstanceExtensions::vk_khr_surface, VK_KHR_SURFACE_EXTENSION_NAME}}})),
165 #endif
166 #ifdef VK_USE_PLATFORM_VI_NN
167             std::make_pair(VK_NN_VI_SURFACE_EXTENSION_NAME, InstanceInfo(&InstanceExtensions::vk_nn_vi_surface, {{
168                            {&InstanceExtensions::vk_khr_surface, VK_KHR_SURFACE_EXTENSION_NAME}}})),
169 #endif
170             std::make_pair(VK_NV_EXTERNAL_MEMORY_CAPABILITIES_EXTENSION_NAME, InstanceInfo(&InstanceExtensions::vk_nv_external_memory_capabilities, {})),
171         };
172 
173         static const InstanceInfo empty_info {nullptr, InstanceReqVec()};
174         InstanceInfoMap::const_iterator info = info_map.find(name);
175         if ( info != info_map.cend()) {
176             return info->second;
177         }
178         return empty_info;
179     }
180 
NormalizeApiVersionInstanceExtensions181     uint32_t NormalizeApiVersion(uint32_t specified_version) {
182         uint32_t api_version = (specified_version < VK_API_VERSION_1_1) ? VK_API_VERSION_1_0 : VK_API_VERSION_1_1;
183         return api_version;
184     }
185 
InitFromInstanceCreateInfoInstanceExtensions186     uint32_t InitFromInstanceCreateInfo(uint32_t requested_api_version, const VkInstanceCreateInfo *pCreateInfo) {
187 
188         static const std::vector<const char *> V_1_1_promoted_instance_apis = {
189             VK_KHR_DEVICE_GROUP_CREATION_EXTENSION_NAME,
190             VK_KHR_EXTERNAL_FENCE_CAPABILITIES_EXTENSION_NAME,
191             VK_KHR_EXTERNAL_MEMORY_CAPABILITIES_EXTENSION_NAME,
192             VK_KHR_EXTERNAL_SEMAPHORE_CAPABILITIES_EXTENSION_NAME,
193             VK_KHR_GET_PHYSICAL_DEVICE_PROPERTIES_2_EXTENSION_NAME,
194             "VK_VERSION_1_1",
195         };
196 
197         // Initialize struct data, robust to invalid pCreateInfo
198         if (pCreateInfo->ppEnabledExtensionNames) {
199             for (uint32_t i = 0; i < pCreateInfo->enabledExtensionCount; i++) {
200                 if (!pCreateInfo->ppEnabledExtensionNames[i]) continue;
201                 auto info = get_info(pCreateInfo->ppEnabledExtensionNames[i]);
202                 if(info.state) this->*(info.state) = true;
203             }
204         }
205         uint32_t api_version = NormalizeApiVersion(requested_api_version);
206         if (api_version >= VK_API_VERSION_1_1) {
207             for (auto promoted_ext : V_1_1_promoted_instance_apis) {
208                 auto info = get_info(promoted_ext);
209                 assert(info.state);
210                 if (info.state) this->*(info.state) = true;
211             }
212         }
213         return api_version;
214     }
215 };
216 
217 static const std::set<std::string> kInstanceExtensionNames = {
218 #ifdef VK_USE_PLATFORM_XLIB_XRANDR_EXT
219     VK_EXT_ACQUIRE_XLIB_DISPLAY_EXTENSION_NAME,
220 #endif
221     VK_EXT_DEBUG_REPORT_EXTENSION_NAME,
222     VK_EXT_DEBUG_UTILS_EXTENSION_NAME,
223     VK_EXT_DIRECT_MODE_DISPLAY_EXTENSION_NAME,
224     VK_EXT_DISPLAY_SURFACE_COUNTER_EXTENSION_NAME,
225     VK_EXT_HEADLESS_SURFACE_EXTENSION_NAME,
226 #ifdef VK_USE_PLATFORM_METAL_EXT
227     VK_EXT_METAL_SURFACE_EXTENSION_NAME,
228 #endif
229     VK_EXT_SWAPCHAIN_COLOR_SPACE_EXTENSION_NAME,
230     VK_EXT_VALIDATION_FEATURES_EXTENSION_NAME,
231     VK_EXT_VALIDATION_FLAGS_EXTENSION_NAME,
232 #ifdef VK_USE_PLATFORM_FUCHSIA
233     VK_FUCHSIA_IMAGEPIPE_SURFACE_EXTENSION_NAME,
234 #endif
235 #ifdef VK_USE_PLATFORM_GGP
236     VK_GGP_STREAM_DESCRIPTOR_SURFACE_EXTENSION_NAME,
237 #endif
238 #ifdef VK_USE_PLATFORM_ANDROID_KHR
239     VK_KHR_ANDROID_SURFACE_EXTENSION_NAME,
240 #endif
241     VK_KHR_DEVICE_GROUP_CREATION_EXTENSION_NAME,
242     VK_KHR_DISPLAY_EXTENSION_NAME,
243     VK_KHR_EXTERNAL_FENCE_CAPABILITIES_EXTENSION_NAME,
244     VK_KHR_EXTERNAL_MEMORY_CAPABILITIES_EXTENSION_NAME,
245     VK_KHR_EXTERNAL_SEMAPHORE_CAPABILITIES_EXTENSION_NAME,
246     VK_KHR_GET_DISPLAY_PROPERTIES_2_EXTENSION_NAME,
247     VK_KHR_GET_PHYSICAL_DEVICE_PROPERTIES_2_EXTENSION_NAME,
248     VK_KHR_GET_SURFACE_CAPABILITIES_2_EXTENSION_NAME,
249     VK_KHR_SURFACE_EXTENSION_NAME,
250     VK_KHR_SURFACE_PROTECTED_CAPABILITIES_EXTENSION_NAME,
251 #ifdef VK_USE_PLATFORM_WAYLAND_KHR
252     VK_KHR_WAYLAND_SURFACE_EXTENSION_NAME,
253 #endif
254 #ifdef VK_USE_PLATFORM_WIN32_KHR
255     VK_KHR_WIN32_SURFACE_EXTENSION_NAME,
256 #endif
257 #ifdef VK_USE_PLATFORM_XCB_KHR
258     VK_KHR_XCB_SURFACE_EXTENSION_NAME,
259 #endif
260 #ifdef VK_USE_PLATFORM_XLIB_KHR
261     VK_KHR_XLIB_SURFACE_EXTENSION_NAME,
262 #endif
263 #ifdef VK_USE_PLATFORM_IOS_MVK
264     VK_MVK_IOS_SURFACE_EXTENSION_NAME,
265 #endif
266 #ifdef VK_USE_PLATFORM_MACOS_MVK
267     VK_MVK_MACOS_SURFACE_EXTENSION_NAME,
268 #endif
269 #ifdef VK_USE_PLATFORM_VI_NN
270     VK_NN_VI_SURFACE_EXTENSION_NAME,
271 #endif
272     VK_NV_EXTERNAL_MEMORY_CAPABILITIES_EXTENSION_NAME,
273 };
274 
275 struct DeviceExtensions : public InstanceExtensions {
276     bool vk_feature_version_1_1{false};
277     bool vk_amd_buffer_marker{false};
278     bool vk_amd_device_coherent_memory{false};
279     bool vk_amd_display_native_hdr{false};
280     bool vk_amd_draw_indirect_count{false};
281     bool vk_amd_gcn_shader{false};
282     bool vk_amd_gpu_shader_half_float{false};
283     bool vk_amd_gpu_shader_int16{false};
284     bool vk_amd_memory_overallocation_behavior{false};
285     bool vk_amd_mixed_attachment_samples{false};
286     bool vk_amd_negative_viewport_height{false};
287     bool vk_amd_pipeline_compiler_control{false};
288     bool vk_amd_rasterization_order{false};
289     bool vk_amd_shader_ballot{false};
290     bool vk_amd_shader_core_properties{false};
291     bool vk_amd_shader_core_properties_2{false};
292     bool vk_amd_shader_explicit_vertex_parameter{false};
293     bool vk_amd_shader_fragment_mask{false};
294     bool vk_amd_shader_image_load_store_lod{false};
295     bool vk_amd_shader_info{false};
296     bool vk_amd_shader_trinary_minmax{false};
297     bool vk_amd_texture_gather_bias_lod{false};
298     bool vk_android_external_memory_android_hardware_buffer{false};
299     bool vk_ext_astc_decode_mode{false};
300     bool vk_ext_blend_operation_advanced{false};
301     bool vk_ext_buffer_device_address{false};
302     bool vk_ext_calibrated_timestamps{false};
303     bool vk_ext_conditional_rendering{false};
304     bool vk_ext_conservative_rasterization{false};
305     bool vk_ext_debug_marker{false};
306     bool vk_ext_depth_clip_enable{false};
307     bool vk_ext_depth_range_unrestricted{false};
308     bool vk_ext_descriptor_indexing{false};
309     bool vk_ext_discard_rectangles{false};
310     bool vk_ext_display_control{false};
311     bool vk_ext_external_memory_dma_buf{false};
312     bool vk_ext_external_memory_host{false};
313     bool vk_ext_filter_cubic{false};
314     bool vk_ext_fragment_density_map{false};
315     bool vk_ext_fragment_shader_interlock{false};
316     bool vk_ext_full_screen_exclusive{false};
317     bool vk_ext_global_priority{false};
318     bool vk_ext_hdr_metadata{false};
319     bool vk_ext_host_query_reset{false};
320     bool vk_ext_image_drm_format_modifier{false};
321     bool vk_ext_index_type_uint8{false};
322     bool vk_ext_inline_uniform_block{false};
323     bool vk_ext_line_rasterization{false};
324     bool vk_ext_memory_budget{false};
325     bool vk_ext_memory_priority{false};
326     bool vk_ext_pci_bus_info{false};
327     bool vk_ext_pipeline_creation_feedback{false};
328     bool vk_ext_post_depth_coverage{false};
329     bool vk_ext_queue_family_foreign{false};
330     bool vk_ext_sample_locations{false};
331     bool vk_ext_sampler_filter_minmax{false};
332     bool vk_ext_scalar_block_layout{false};
333     bool vk_ext_separate_stencil_usage{false};
334     bool vk_ext_shader_demote_to_helper_invocation{false};
335     bool vk_ext_shader_stencil_export{false};
336     bool vk_ext_shader_subgroup_ballot{false};
337     bool vk_ext_shader_subgroup_vote{false};
338     bool vk_ext_shader_viewport_index_layer{false};
339     bool vk_ext_subgroup_size_control{false};
340     bool vk_ext_texel_buffer_alignment{false};
341     bool vk_ext_texture_compression_astc_hdr{false};
342     bool vk_ext_transform_feedback{false};
343     bool vk_ext_validation_cache{false};
344     bool vk_ext_vertex_attribute_divisor{false};
345     bool vk_ext_ycbcr_image_arrays{false};
346     bool vk_ggp_frame_token{false};
347     bool vk_google_decorate_string{false};
348     bool vk_google_display_timing{false};
349     bool vk_google_hlsl_functionality1{false};
350     bool vk_img_filter_cubic{false};
351     bool vk_img_format_pvrtc{false};
352     bool vk_intel_performance_query{false};
353     bool vk_intel_shader_integer_functions_2{false};
354     bool vk_khr_16bit_storage{false};
355     bool vk_khr_8bit_storage{false};
356     bool vk_khr_bind_memory_2{false};
357     bool vk_khr_create_renderpass_2{false};
358     bool vk_khr_dedicated_allocation{false};
359     bool vk_khr_depth_stencil_resolve{false};
360     bool vk_khr_descriptor_update_template{false};
361     bool vk_khr_device_group{false};
362     bool vk_khr_display_swapchain{false};
363     bool vk_khr_draw_indirect_count{false};
364     bool vk_khr_driver_properties{false};
365     bool vk_khr_external_fence{false};
366     bool vk_khr_external_fence_fd{false};
367     bool vk_khr_external_fence_win32{false};
368     bool vk_khr_external_memory{false};
369     bool vk_khr_external_memory_fd{false};
370     bool vk_khr_external_memory_win32{false};
371     bool vk_khr_external_semaphore{false};
372     bool vk_khr_external_semaphore_fd{false};
373     bool vk_khr_external_semaphore_win32{false};
374     bool vk_khr_get_memory_requirements_2{false};
375     bool vk_khr_image_format_list{false};
376     bool vk_khr_imageless_framebuffer{false};
377     bool vk_khr_incremental_present{false};
378     bool vk_khr_maintenance1{false};
379     bool vk_khr_maintenance2{false};
380     bool vk_khr_maintenance3{false};
381     bool vk_khr_multiview{false};
382     bool vk_khr_pipeline_executable_properties{false};
383     bool vk_khr_push_descriptor{false};
384     bool vk_khr_relaxed_block_layout{false};
385     bool vk_khr_sampler_mirror_clamp_to_edge{false};
386     bool vk_khr_sampler_ycbcr_conversion{false};
387     bool vk_khr_shader_atomic_int64{false};
388     bool vk_khr_shader_draw_parameters{false};
389     bool vk_khr_shader_float16_int8{false};
390     bool vk_khr_shader_float_controls{false};
391     bool vk_khr_shared_presentable_image{false};
392     bool vk_khr_storage_buffer_storage_class{false};
393     bool vk_khr_swapchain{false};
394     bool vk_khr_swapchain_mutable_format{false};
395     bool vk_khr_uniform_buffer_standard_layout{false};
396     bool vk_khr_variable_pointers{false};
397     bool vk_khr_vulkan_memory_model{false};
398     bool vk_khr_win32_keyed_mutex{false};
399     bool vk_nvx_device_generated_commands{false};
400     bool vk_nvx_image_view_handle{false};
401     bool vk_nvx_multiview_per_view_attributes{false};
402     bool vk_nv_clip_space_w_scaling{false};
403     bool vk_nv_compute_shader_derivatives{false};
404     bool vk_nv_cooperative_matrix{false};
405     bool vk_nv_corner_sampled_image{false};
406     bool vk_nv_coverage_reduction_mode{false};
407     bool vk_nv_dedicated_allocation{false};
408     bool vk_nv_dedicated_allocation_image_aliasing{false};
409     bool vk_nv_device_diagnostic_checkpoints{false};
410     bool vk_nv_external_memory{false};
411     bool vk_nv_external_memory_win32{false};
412     bool vk_nv_fill_rectangle{false};
413     bool vk_nv_fragment_coverage_to_color{false};
414     bool vk_nv_fragment_shader_barycentric{false};
415     bool vk_nv_framebuffer_mixed_samples{false};
416     bool vk_nv_geometry_shader_passthrough{false};
417     bool vk_nv_glsl_shader{false};
418     bool vk_nv_mesh_shader{false};
419     bool vk_nv_ray_tracing{false};
420     bool vk_nv_representative_fragment_test{false};
421     bool vk_nv_sample_mask_override_coverage{false};
422     bool vk_nv_scissor_exclusive{false};
423     bool vk_nv_shader_image_footprint{false};
424     bool vk_nv_shader_sm_builtins{false};
425     bool vk_nv_shader_subgroup_partitioned{false};
426     bool vk_nv_shading_rate_image{false};
427     bool vk_nv_viewport_array2{false};
428     bool vk_nv_viewport_swizzle{false};
429     bool vk_nv_win32_keyed_mutex{false};
430 
431     struct DeviceReq {
432         const bool DeviceExtensions::* enabled;
433         const char *name;
434     };
435     typedef std::vector<DeviceReq> DeviceReqVec;
436     struct DeviceInfo {
DeviceInfoDeviceExtensions::DeviceInfo437        DeviceInfo(bool DeviceExtensions::* state_, const DeviceReqVec requires_): state(state_), requires(requires_) {}
438        bool DeviceExtensions::* state;
439        DeviceReqVec requires;
440     };
441 
442     typedef std::unordered_map<std::string,DeviceInfo> DeviceInfoMap;
get_infoDeviceExtensions443     static const DeviceInfo &get_info(const char *name) {
444         static const DeviceInfoMap info_map = {
445             std::make_pair("VK_VERSION_1_1", DeviceInfo(&DeviceExtensions::vk_feature_version_1_1, {})),
446             std::make_pair(VK_AMD_BUFFER_MARKER_EXTENSION_NAME, DeviceInfo(&DeviceExtensions::vk_amd_buffer_marker, {})),
447             std::make_pair(VK_AMD_DEVICE_COHERENT_MEMORY_EXTENSION_NAME, DeviceInfo(&DeviceExtensions::vk_amd_device_coherent_memory, {})),
448             std::make_pair(VK_AMD_DISPLAY_NATIVE_HDR_EXTENSION_NAME, DeviceInfo(&DeviceExtensions::vk_amd_display_native_hdr, {{
449                            {&DeviceExtensions::vk_khr_get_physical_device_properties_2, VK_KHR_GET_PHYSICAL_DEVICE_PROPERTIES_2_EXTENSION_NAME},
450                            {&DeviceExtensions::vk_khr_get_surface_capabilities_2, VK_KHR_GET_SURFACE_CAPABILITIES_2_EXTENSION_NAME},
451                            {&DeviceExtensions::vk_khr_swapchain, VK_KHR_SWAPCHAIN_EXTENSION_NAME}}})),
452             std::make_pair(VK_AMD_DRAW_INDIRECT_COUNT_EXTENSION_NAME, DeviceInfo(&DeviceExtensions::vk_amd_draw_indirect_count, {})),
453             std::make_pair(VK_AMD_GCN_SHADER_EXTENSION_NAME, DeviceInfo(&DeviceExtensions::vk_amd_gcn_shader, {})),
454             std::make_pair(VK_AMD_GPU_SHADER_HALF_FLOAT_EXTENSION_NAME, DeviceInfo(&DeviceExtensions::vk_amd_gpu_shader_half_float, {})),
455             std::make_pair(VK_AMD_GPU_SHADER_INT16_EXTENSION_NAME, DeviceInfo(&DeviceExtensions::vk_amd_gpu_shader_int16, {})),
456             std::make_pair(VK_AMD_MEMORY_OVERALLOCATION_BEHAVIOR_EXTENSION_NAME, DeviceInfo(&DeviceExtensions::vk_amd_memory_overallocation_behavior, {})),
457             std::make_pair(VK_AMD_MIXED_ATTACHMENT_SAMPLES_EXTENSION_NAME, DeviceInfo(&DeviceExtensions::vk_amd_mixed_attachment_samples, {})),
458             std::make_pair(VK_AMD_NEGATIVE_VIEWPORT_HEIGHT_EXTENSION_NAME, DeviceInfo(&DeviceExtensions::vk_amd_negative_viewport_height, {})),
459             std::make_pair(VK_AMD_PIPELINE_COMPILER_CONTROL_EXTENSION_NAME, DeviceInfo(&DeviceExtensions::vk_amd_pipeline_compiler_control, {})),
460             std::make_pair(VK_AMD_RASTERIZATION_ORDER_EXTENSION_NAME, DeviceInfo(&DeviceExtensions::vk_amd_rasterization_order, {})),
461             std::make_pair(VK_AMD_SHADER_BALLOT_EXTENSION_NAME, DeviceInfo(&DeviceExtensions::vk_amd_shader_ballot, {})),
462             std::make_pair(VK_AMD_SHADER_CORE_PROPERTIES_EXTENSION_NAME, DeviceInfo(&DeviceExtensions::vk_amd_shader_core_properties, {{
463                            {&DeviceExtensions::vk_khr_get_physical_device_properties_2, VK_KHR_GET_PHYSICAL_DEVICE_PROPERTIES_2_EXTENSION_NAME}}})),
464             std::make_pair(VK_AMD_SHADER_CORE_PROPERTIES_2_EXTENSION_NAME, DeviceInfo(&DeviceExtensions::vk_amd_shader_core_properties_2, {{
465                            {&DeviceExtensions::vk_amd_shader_core_properties, VK_AMD_SHADER_CORE_PROPERTIES_EXTENSION_NAME}}})),
466             std::make_pair(VK_AMD_SHADER_EXPLICIT_VERTEX_PARAMETER_EXTENSION_NAME, DeviceInfo(&DeviceExtensions::vk_amd_shader_explicit_vertex_parameter, {})),
467             std::make_pair(VK_AMD_SHADER_FRAGMENT_MASK_EXTENSION_NAME, DeviceInfo(&DeviceExtensions::vk_amd_shader_fragment_mask, {})),
468             std::make_pair(VK_AMD_SHADER_IMAGE_LOAD_STORE_LOD_EXTENSION_NAME, DeviceInfo(&DeviceExtensions::vk_amd_shader_image_load_store_lod, {})),
469             std::make_pair(VK_AMD_SHADER_INFO_EXTENSION_NAME, DeviceInfo(&DeviceExtensions::vk_amd_shader_info, {})),
470             std::make_pair(VK_AMD_SHADER_TRINARY_MINMAX_EXTENSION_NAME, DeviceInfo(&DeviceExtensions::vk_amd_shader_trinary_minmax, {})),
471             std::make_pair(VK_AMD_TEXTURE_GATHER_BIAS_LOD_EXTENSION_NAME, DeviceInfo(&DeviceExtensions::vk_amd_texture_gather_bias_lod, {{
472                            {&DeviceExtensions::vk_khr_get_physical_device_properties_2, VK_KHR_GET_PHYSICAL_DEVICE_PROPERTIES_2_EXTENSION_NAME}}})),
473 #ifdef VK_USE_PLATFORM_ANDROID_KHR
474             std::make_pair(VK_ANDROID_EXTERNAL_MEMORY_ANDROID_HARDWARE_BUFFER_EXTENSION_NAME, DeviceInfo(&DeviceExtensions::vk_android_external_memory_android_hardware_buffer, {{
475                            {&DeviceExtensions::vk_khr_sampler_ycbcr_conversion, VK_KHR_SAMPLER_YCBCR_CONVERSION_EXTENSION_NAME},
476                            {&DeviceExtensions::vk_khr_external_memory, VK_KHR_EXTERNAL_MEMORY_EXTENSION_NAME},
477                            {&DeviceExtensions::vk_ext_queue_family_foreign, VK_EXT_QUEUE_FAMILY_FOREIGN_EXTENSION_NAME}}})),
478 #endif
479             std::make_pair(VK_EXT_ASTC_DECODE_MODE_EXTENSION_NAME, DeviceInfo(&DeviceExtensions::vk_ext_astc_decode_mode, {{
480                            {&DeviceExtensions::vk_khr_get_physical_device_properties_2, VK_KHR_GET_PHYSICAL_DEVICE_PROPERTIES_2_EXTENSION_NAME}}})),
481             std::make_pair(VK_EXT_BLEND_OPERATION_ADVANCED_EXTENSION_NAME, DeviceInfo(&DeviceExtensions::vk_ext_blend_operation_advanced, {})),
482             std::make_pair(VK_EXT_BUFFER_DEVICE_ADDRESS_EXTENSION_NAME, DeviceInfo(&DeviceExtensions::vk_ext_buffer_device_address, {{
483                            {&DeviceExtensions::vk_khr_get_physical_device_properties_2, VK_KHR_GET_PHYSICAL_DEVICE_PROPERTIES_2_EXTENSION_NAME}}})),
484             std::make_pair(VK_EXT_CALIBRATED_TIMESTAMPS_EXTENSION_NAME, DeviceInfo(&DeviceExtensions::vk_ext_calibrated_timestamps, {})),
485             std::make_pair(VK_EXT_CONDITIONAL_RENDERING_EXTENSION_NAME, DeviceInfo(&DeviceExtensions::vk_ext_conditional_rendering, {})),
486             std::make_pair(VK_EXT_CONSERVATIVE_RASTERIZATION_EXTENSION_NAME, DeviceInfo(&DeviceExtensions::vk_ext_conservative_rasterization, {{
487                            {&DeviceExtensions::vk_khr_get_physical_device_properties_2, VK_KHR_GET_PHYSICAL_DEVICE_PROPERTIES_2_EXTENSION_NAME}}})),
488             std::make_pair(VK_EXT_DEBUG_MARKER_EXTENSION_NAME, DeviceInfo(&DeviceExtensions::vk_ext_debug_marker, {{
489                            {&DeviceExtensions::vk_ext_debug_report, VK_EXT_DEBUG_REPORT_EXTENSION_NAME}}})),
490             std::make_pair(VK_EXT_DEPTH_CLIP_ENABLE_EXTENSION_NAME, DeviceInfo(&DeviceExtensions::vk_ext_depth_clip_enable, {})),
491             std::make_pair(VK_EXT_DEPTH_RANGE_UNRESTRICTED_EXTENSION_NAME, DeviceInfo(&DeviceExtensions::vk_ext_depth_range_unrestricted, {})),
492             std::make_pair(VK_EXT_DESCRIPTOR_INDEXING_EXTENSION_NAME, DeviceInfo(&DeviceExtensions::vk_ext_descriptor_indexing, {{
493                            {&DeviceExtensions::vk_khr_get_physical_device_properties_2, VK_KHR_GET_PHYSICAL_DEVICE_PROPERTIES_2_EXTENSION_NAME},
494                            {&DeviceExtensions::vk_khr_maintenance3, VK_KHR_MAINTENANCE3_EXTENSION_NAME}}})),
495             std::make_pair(VK_EXT_DISCARD_RECTANGLES_EXTENSION_NAME, DeviceInfo(&DeviceExtensions::vk_ext_discard_rectangles, {{
496                            {&DeviceExtensions::vk_khr_get_physical_device_properties_2, VK_KHR_GET_PHYSICAL_DEVICE_PROPERTIES_2_EXTENSION_NAME}}})),
497             std::make_pair(VK_EXT_DISPLAY_CONTROL_EXTENSION_NAME, DeviceInfo(&DeviceExtensions::vk_ext_display_control, {{
498                            {&DeviceExtensions::vk_ext_display_surface_counter, VK_EXT_DISPLAY_SURFACE_COUNTER_EXTENSION_NAME},
499                            {&DeviceExtensions::vk_khr_swapchain, VK_KHR_SWAPCHAIN_EXTENSION_NAME}}})),
500             std::make_pair(VK_EXT_EXTERNAL_MEMORY_DMA_BUF_EXTENSION_NAME, DeviceInfo(&DeviceExtensions::vk_ext_external_memory_dma_buf, {{
501                            {&DeviceExtensions::vk_khr_external_memory_fd, VK_KHR_EXTERNAL_MEMORY_FD_EXTENSION_NAME}}})),
502             std::make_pair(VK_EXT_EXTERNAL_MEMORY_HOST_EXTENSION_NAME, DeviceInfo(&DeviceExtensions::vk_ext_external_memory_host, {{
503                            {&DeviceExtensions::vk_khr_external_memory, VK_KHR_EXTERNAL_MEMORY_EXTENSION_NAME}}})),
504             std::make_pair(VK_EXT_FILTER_CUBIC_EXTENSION_NAME, DeviceInfo(&DeviceExtensions::vk_ext_filter_cubic, {{
505                            {&DeviceExtensions::vk_img_filter_cubic, VK_IMG_FILTER_CUBIC_EXTENSION_NAME}}})),
506             std::make_pair(VK_EXT_FRAGMENT_DENSITY_MAP_EXTENSION_NAME, DeviceInfo(&DeviceExtensions::vk_ext_fragment_density_map, {{
507                            {&DeviceExtensions::vk_khr_get_physical_device_properties_2, VK_KHR_GET_PHYSICAL_DEVICE_PROPERTIES_2_EXTENSION_NAME}}})),
508             std::make_pair(VK_EXT_FRAGMENT_SHADER_INTERLOCK_EXTENSION_NAME, DeviceInfo(&DeviceExtensions::vk_ext_fragment_shader_interlock, {{
509                            {&DeviceExtensions::vk_khr_get_physical_device_properties_2, VK_KHR_GET_PHYSICAL_DEVICE_PROPERTIES_2_EXTENSION_NAME}}})),
510 #ifdef VK_USE_PLATFORM_WIN32_KHR
511             std::make_pair(VK_EXT_FULL_SCREEN_EXCLUSIVE_EXTENSION_NAME, DeviceInfo(&DeviceExtensions::vk_ext_full_screen_exclusive, {{
512                            {&DeviceExtensions::vk_khr_get_physical_device_properties_2, VK_KHR_GET_PHYSICAL_DEVICE_PROPERTIES_2_EXTENSION_NAME},
513                            {&DeviceExtensions::vk_khr_surface, VK_KHR_SURFACE_EXTENSION_NAME},
514                            {&DeviceExtensions::vk_khr_get_surface_capabilities_2, VK_KHR_GET_SURFACE_CAPABILITIES_2_EXTENSION_NAME},
515                            {&DeviceExtensions::vk_khr_swapchain, VK_KHR_SWAPCHAIN_EXTENSION_NAME}}})),
516 #endif
517             std::make_pair(VK_EXT_GLOBAL_PRIORITY_EXTENSION_NAME, DeviceInfo(&DeviceExtensions::vk_ext_global_priority, {})),
518             std::make_pair(VK_EXT_HDR_METADATA_EXTENSION_NAME, DeviceInfo(&DeviceExtensions::vk_ext_hdr_metadata, {{
519                            {&DeviceExtensions::vk_khr_swapchain, VK_KHR_SWAPCHAIN_EXTENSION_NAME}}})),
520             std::make_pair(VK_EXT_HOST_QUERY_RESET_EXTENSION_NAME, DeviceInfo(&DeviceExtensions::vk_ext_host_query_reset, {{
521                            {&DeviceExtensions::vk_khr_get_physical_device_properties_2, VK_KHR_GET_PHYSICAL_DEVICE_PROPERTIES_2_EXTENSION_NAME}}})),
522             std::make_pair(VK_EXT_IMAGE_DRM_FORMAT_MODIFIER_EXTENSION_NAME, DeviceInfo(&DeviceExtensions::vk_ext_image_drm_format_modifier, {{
523                            {&DeviceExtensions::vk_khr_bind_memory_2, VK_KHR_BIND_MEMORY_2_EXTENSION_NAME},
524                            {&DeviceExtensions::vk_khr_get_physical_device_properties_2, VK_KHR_GET_PHYSICAL_DEVICE_PROPERTIES_2_EXTENSION_NAME},
525                            {&DeviceExtensions::vk_khr_image_format_list, VK_KHR_IMAGE_FORMAT_LIST_EXTENSION_NAME},
526                            {&DeviceExtensions::vk_khr_sampler_ycbcr_conversion, VK_KHR_SAMPLER_YCBCR_CONVERSION_EXTENSION_NAME}}})),
527             std::make_pair(VK_EXT_INDEX_TYPE_UINT8_EXTENSION_NAME, DeviceInfo(&DeviceExtensions::vk_ext_index_type_uint8, {})),
528             std::make_pair(VK_EXT_INLINE_UNIFORM_BLOCK_EXTENSION_NAME, DeviceInfo(&DeviceExtensions::vk_ext_inline_uniform_block, {{
529                            {&DeviceExtensions::vk_khr_get_physical_device_properties_2, VK_KHR_GET_PHYSICAL_DEVICE_PROPERTIES_2_EXTENSION_NAME},
530                            {&DeviceExtensions::vk_khr_maintenance1, VK_KHR_MAINTENANCE1_EXTENSION_NAME}}})),
531             std::make_pair(VK_EXT_LINE_RASTERIZATION_EXTENSION_NAME, DeviceInfo(&DeviceExtensions::vk_ext_line_rasterization, {{
532                            {&DeviceExtensions::vk_khr_get_physical_device_properties_2, VK_KHR_GET_PHYSICAL_DEVICE_PROPERTIES_2_EXTENSION_NAME}}})),
533             std::make_pair(VK_EXT_MEMORY_BUDGET_EXTENSION_NAME, DeviceInfo(&DeviceExtensions::vk_ext_memory_budget, {{
534                            {&DeviceExtensions::vk_khr_get_physical_device_properties_2, VK_KHR_GET_PHYSICAL_DEVICE_PROPERTIES_2_EXTENSION_NAME}}})),
535             std::make_pair(VK_EXT_MEMORY_PRIORITY_EXTENSION_NAME, DeviceInfo(&DeviceExtensions::vk_ext_memory_priority, {{
536                            {&DeviceExtensions::vk_khr_get_physical_device_properties_2, VK_KHR_GET_PHYSICAL_DEVICE_PROPERTIES_2_EXTENSION_NAME}}})),
537             std::make_pair(VK_EXT_PCI_BUS_INFO_EXTENSION_NAME, DeviceInfo(&DeviceExtensions::vk_ext_pci_bus_info, {{
538                            {&DeviceExtensions::vk_khr_get_physical_device_properties_2, VK_KHR_GET_PHYSICAL_DEVICE_PROPERTIES_2_EXTENSION_NAME}}})),
539             std::make_pair(VK_EXT_PIPELINE_CREATION_FEEDBACK_EXTENSION_NAME, DeviceInfo(&DeviceExtensions::vk_ext_pipeline_creation_feedback, {})),
540             std::make_pair(VK_EXT_POST_DEPTH_COVERAGE_EXTENSION_NAME, DeviceInfo(&DeviceExtensions::vk_ext_post_depth_coverage, {})),
541             std::make_pair(VK_EXT_QUEUE_FAMILY_FOREIGN_EXTENSION_NAME, DeviceInfo(&DeviceExtensions::vk_ext_queue_family_foreign, {{
542                            {&DeviceExtensions::vk_khr_external_memory, VK_KHR_EXTERNAL_MEMORY_EXTENSION_NAME}}})),
543             std::make_pair(VK_EXT_SAMPLE_LOCATIONS_EXTENSION_NAME, DeviceInfo(&DeviceExtensions::vk_ext_sample_locations, {{
544                            {&DeviceExtensions::vk_khr_get_physical_device_properties_2, VK_KHR_GET_PHYSICAL_DEVICE_PROPERTIES_2_EXTENSION_NAME}}})),
545             std::make_pair(VK_EXT_SAMPLER_FILTER_MINMAX_EXTENSION_NAME, DeviceInfo(&DeviceExtensions::vk_ext_sampler_filter_minmax, {{
546                            {&DeviceExtensions::vk_khr_get_physical_device_properties_2, VK_KHR_GET_PHYSICAL_DEVICE_PROPERTIES_2_EXTENSION_NAME}}})),
547             std::make_pair(VK_EXT_SCALAR_BLOCK_LAYOUT_EXTENSION_NAME, DeviceInfo(&DeviceExtensions::vk_ext_scalar_block_layout, {{
548                            {&DeviceExtensions::vk_khr_get_physical_device_properties_2, VK_KHR_GET_PHYSICAL_DEVICE_PROPERTIES_2_EXTENSION_NAME}}})),
549             std::make_pair(VK_EXT_SEPARATE_STENCIL_USAGE_EXTENSION_NAME, DeviceInfo(&DeviceExtensions::vk_ext_separate_stencil_usage, {})),
550             std::make_pair(VK_EXT_SHADER_DEMOTE_TO_HELPER_INVOCATION_EXTENSION_NAME, DeviceInfo(&DeviceExtensions::vk_ext_shader_demote_to_helper_invocation, {{
551                            {&DeviceExtensions::vk_khr_get_physical_device_properties_2, VK_KHR_GET_PHYSICAL_DEVICE_PROPERTIES_2_EXTENSION_NAME}}})),
552             std::make_pair(VK_EXT_SHADER_STENCIL_EXPORT_EXTENSION_NAME, DeviceInfo(&DeviceExtensions::vk_ext_shader_stencil_export, {})),
553             std::make_pair(VK_EXT_SHADER_SUBGROUP_BALLOT_EXTENSION_NAME, DeviceInfo(&DeviceExtensions::vk_ext_shader_subgroup_ballot, {})),
554             std::make_pair(VK_EXT_SHADER_SUBGROUP_VOTE_EXTENSION_NAME, DeviceInfo(&DeviceExtensions::vk_ext_shader_subgroup_vote, {})),
555             std::make_pair(VK_EXT_SHADER_VIEWPORT_INDEX_LAYER_EXTENSION_NAME, DeviceInfo(&DeviceExtensions::vk_ext_shader_viewport_index_layer, {})),
556             std::make_pair(VK_EXT_SUBGROUP_SIZE_CONTROL_EXTENSION_NAME, DeviceInfo(&DeviceExtensions::vk_ext_subgroup_size_control, {})),
557             std::make_pair(VK_EXT_TEXEL_BUFFER_ALIGNMENT_EXTENSION_NAME, DeviceInfo(&DeviceExtensions::vk_ext_texel_buffer_alignment, {{
558                            {&DeviceExtensions::vk_khr_get_physical_device_properties_2, VK_KHR_GET_PHYSICAL_DEVICE_PROPERTIES_2_EXTENSION_NAME}}})),
559             std::make_pair(VK_EXT_TEXTURE_COMPRESSION_ASTC_HDR_EXTENSION_NAME, DeviceInfo(&DeviceExtensions::vk_ext_texture_compression_astc_hdr, {{
560                            {&DeviceExtensions::vk_khr_get_physical_device_properties_2, VK_KHR_GET_PHYSICAL_DEVICE_PROPERTIES_2_EXTENSION_NAME}}})),
561             std::make_pair(VK_EXT_TRANSFORM_FEEDBACK_EXTENSION_NAME, DeviceInfo(&DeviceExtensions::vk_ext_transform_feedback, {{
562                            {&DeviceExtensions::vk_khr_get_physical_device_properties_2, VK_KHR_GET_PHYSICAL_DEVICE_PROPERTIES_2_EXTENSION_NAME}}})),
563             std::make_pair(VK_EXT_VALIDATION_CACHE_EXTENSION_NAME, DeviceInfo(&DeviceExtensions::vk_ext_validation_cache, {})),
564             std::make_pair(VK_EXT_VERTEX_ATTRIBUTE_DIVISOR_EXTENSION_NAME, DeviceInfo(&DeviceExtensions::vk_ext_vertex_attribute_divisor, {{
565                            {&DeviceExtensions::vk_khr_get_physical_device_properties_2, VK_KHR_GET_PHYSICAL_DEVICE_PROPERTIES_2_EXTENSION_NAME}}})),
566             std::make_pair(VK_EXT_YCBCR_IMAGE_ARRAYS_EXTENSION_NAME, DeviceInfo(&DeviceExtensions::vk_ext_ycbcr_image_arrays, {{
567                            {&DeviceExtensions::vk_khr_sampler_ycbcr_conversion, VK_KHR_SAMPLER_YCBCR_CONVERSION_EXTENSION_NAME}}})),
568 #ifdef VK_USE_PLATFORM_GGP
569             std::make_pair(VK_GGP_FRAME_TOKEN_EXTENSION_NAME, DeviceInfo(&DeviceExtensions::vk_ggp_frame_token, {{
570                            {&DeviceExtensions::vk_khr_swapchain, VK_KHR_SWAPCHAIN_EXTENSION_NAME},
571                            {&DeviceExtensions::vk_ggp_stream_descriptor_surface, VK_GGP_STREAM_DESCRIPTOR_SURFACE_EXTENSION_NAME}}})),
572 #endif
573             std::make_pair(VK_GOOGLE_DECORATE_STRING_EXTENSION_NAME, DeviceInfo(&DeviceExtensions::vk_google_decorate_string, {})),
574             std::make_pair(VK_GOOGLE_DISPLAY_TIMING_EXTENSION_NAME, DeviceInfo(&DeviceExtensions::vk_google_display_timing, {{
575                            {&DeviceExtensions::vk_khr_swapchain, VK_KHR_SWAPCHAIN_EXTENSION_NAME}}})),
576             std::make_pair(VK_GOOGLE_HLSL_FUNCTIONALITY1_EXTENSION_NAME, DeviceInfo(&DeviceExtensions::vk_google_hlsl_functionality1, {})),
577             std::make_pair(VK_IMG_FILTER_CUBIC_EXTENSION_NAME, DeviceInfo(&DeviceExtensions::vk_img_filter_cubic, {})),
578             std::make_pair(VK_IMG_FORMAT_PVRTC_EXTENSION_NAME, DeviceInfo(&DeviceExtensions::vk_img_format_pvrtc, {})),
579             std::make_pair(VK_INTEL_PERFORMANCE_QUERY_EXTENSION_NAME, DeviceInfo(&DeviceExtensions::vk_intel_performance_query, {})),
580             std::make_pair(VK_INTEL_SHADER_INTEGER_FUNCTIONS_2_EXTENSION_NAME, DeviceInfo(&DeviceExtensions::vk_intel_shader_integer_functions_2, {{
581                            {&DeviceExtensions::vk_khr_get_physical_device_properties_2, VK_KHR_GET_PHYSICAL_DEVICE_PROPERTIES_2_EXTENSION_NAME}}})),
582             std::make_pair(VK_KHR_16BIT_STORAGE_EXTENSION_NAME, DeviceInfo(&DeviceExtensions::vk_khr_16bit_storage, {{
583                            {&DeviceExtensions::vk_khr_get_physical_device_properties_2, VK_KHR_GET_PHYSICAL_DEVICE_PROPERTIES_2_EXTENSION_NAME},
584                            {&DeviceExtensions::vk_khr_storage_buffer_storage_class, VK_KHR_STORAGE_BUFFER_STORAGE_CLASS_EXTENSION_NAME}}})),
585             std::make_pair(VK_KHR_8BIT_STORAGE_EXTENSION_NAME, DeviceInfo(&DeviceExtensions::vk_khr_8bit_storage, {{
586                            {&DeviceExtensions::vk_khr_get_physical_device_properties_2, VK_KHR_GET_PHYSICAL_DEVICE_PROPERTIES_2_EXTENSION_NAME},
587                            {&DeviceExtensions::vk_khr_storage_buffer_storage_class, VK_KHR_STORAGE_BUFFER_STORAGE_CLASS_EXTENSION_NAME}}})),
588             std::make_pair(VK_KHR_BIND_MEMORY_2_EXTENSION_NAME, DeviceInfo(&DeviceExtensions::vk_khr_bind_memory_2, {})),
589             std::make_pair(VK_KHR_CREATE_RENDERPASS_2_EXTENSION_NAME, DeviceInfo(&DeviceExtensions::vk_khr_create_renderpass_2, {{
590                            {&DeviceExtensions::vk_khr_multiview, VK_KHR_MULTIVIEW_EXTENSION_NAME},
591                            {&DeviceExtensions::vk_khr_maintenance2, VK_KHR_MAINTENANCE2_EXTENSION_NAME}}})),
592             std::make_pair(VK_KHR_DEDICATED_ALLOCATION_EXTENSION_NAME, DeviceInfo(&DeviceExtensions::vk_khr_dedicated_allocation, {{
593                            {&DeviceExtensions::vk_khr_get_memory_requirements_2, VK_KHR_GET_MEMORY_REQUIREMENTS_2_EXTENSION_NAME}}})),
594             std::make_pair(VK_KHR_DEPTH_STENCIL_RESOLVE_EXTENSION_NAME, DeviceInfo(&DeviceExtensions::vk_khr_depth_stencil_resolve, {{
595                            {&DeviceExtensions::vk_khr_create_renderpass_2, VK_KHR_CREATE_RENDERPASS_2_EXTENSION_NAME}}})),
596             std::make_pair(VK_KHR_DESCRIPTOR_UPDATE_TEMPLATE_EXTENSION_NAME, DeviceInfo(&DeviceExtensions::vk_khr_descriptor_update_template, {})),
597             std::make_pair(VK_KHR_DEVICE_GROUP_EXTENSION_NAME, DeviceInfo(&DeviceExtensions::vk_khr_device_group, {{
598                            {&DeviceExtensions::vk_khr_device_group_creation, VK_KHR_DEVICE_GROUP_CREATION_EXTENSION_NAME}}})),
599             std::make_pair(VK_KHR_DISPLAY_SWAPCHAIN_EXTENSION_NAME, DeviceInfo(&DeviceExtensions::vk_khr_display_swapchain, {{
600                            {&DeviceExtensions::vk_khr_swapchain, VK_KHR_SWAPCHAIN_EXTENSION_NAME},
601                            {&DeviceExtensions::vk_khr_display, VK_KHR_DISPLAY_EXTENSION_NAME}}})),
602             std::make_pair(VK_KHR_DRAW_INDIRECT_COUNT_EXTENSION_NAME, DeviceInfo(&DeviceExtensions::vk_khr_draw_indirect_count, {})),
603             std::make_pair(VK_KHR_DRIVER_PROPERTIES_EXTENSION_NAME, DeviceInfo(&DeviceExtensions::vk_khr_driver_properties, {{
604                            {&DeviceExtensions::vk_khr_get_physical_device_properties_2, VK_KHR_GET_PHYSICAL_DEVICE_PROPERTIES_2_EXTENSION_NAME}}})),
605             std::make_pair(VK_KHR_EXTERNAL_FENCE_EXTENSION_NAME, DeviceInfo(&DeviceExtensions::vk_khr_external_fence, {{
606                            {&DeviceExtensions::vk_khr_external_fence_capabilities, VK_KHR_EXTERNAL_FENCE_CAPABILITIES_EXTENSION_NAME}}})),
607             std::make_pair(VK_KHR_EXTERNAL_FENCE_FD_EXTENSION_NAME, DeviceInfo(&DeviceExtensions::vk_khr_external_fence_fd, {{
608                            {&DeviceExtensions::vk_khr_external_fence, VK_KHR_EXTERNAL_FENCE_EXTENSION_NAME}}})),
609 #ifdef VK_USE_PLATFORM_WIN32_KHR
610             std::make_pair(VK_KHR_EXTERNAL_FENCE_WIN32_EXTENSION_NAME, DeviceInfo(&DeviceExtensions::vk_khr_external_fence_win32, {{
611                            {&DeviceExtensions::vk_khr_external_fence, VK_KHR_EXTERNAL_FENCE_EXTENSION_NAME}}})),
612 #endif
613             std::make_pair(VK_KHR_EXTERNAL_MEMORY_EXTENSION_NAME, DeviceInfo(&DeviceExtensions::vk_khr_external_memory, {{
614                            {&DeviceExtensions::vk_khr_external_memory_capabilities, VK_KHR_EXTERNAL_MEMORY_CAPABILITIES_EXTENSION_NAME}}})),
615             std::make_pair(VK_KHR_EXTERNAL_MEMORY_FD_EXTENSION_NAME, DeviceInfo(&DeviceExtensions::vk_khr_external_memory_fd, {{
616                            {&DeviceExtensions::vk_khr_external_memory, VK_KHR_EXTERNAL_MEMORY_EXTENSION_NAME}}})),
617 #ifdef VK_USE_PLATFORM_WIN32_KHR
618             std::make_pair(VK_KHR_EXTERNAL_MEMORY_WIN32_EXTENSION_NAME, DeviceInfo(&DeviceExtensions::vk_khr_external_memory_win32, {{
619                            {&DeviceExtensions::vk_khr_external_memory, VK_KHR_EXTERNAL_MEMORY_EXTENSION_NAME}}})),
620 #endif
621             std::make_pair(VK_KHR_EXTERNAL_SEMAPHORE_EXTENSION_NAME, DeviceInfo(&DeviceExtensions::vk_khr_external_semaphore, {{
622                            {&DeviceExtensions::vk_khr_external_semaphore_capabilities, VK_KHR_EXTERNAL_SEMAPHORE_CAPABILITIES_EXTENSION_NAME}}})),
623             std::make_pair(VK_KHR_EXTERNAL_SEMAPHORE_FD_EXTENSION_NAME, DeviceInfo(&DeviceExtensions::vk_khr_external_semaphore_fd, {{
624                            {&DeviceExtensions::vk_khr_external_semaphore, VK_KHR_EXTERNAL_SEMAPHORE_EXTENSION_NAME}}})),
625 #ifdef VK_USE_PLATFORM_WIN32_KHR
626             std::make_pair(VK_KHR_EXTERNAL_SEMAPHORE_WIN32_EXTENSION_NAME, DeviceInfo(&DeviceExtensions::vk_khr_external_semaphore_win32, {{
627                            {&DeviceExtensions::vk_khr_external_semaphore, VK_KHR_EXTERNAL_SEMAPHORE_EXTENSION_NAME}}})),
628 #endif
629             std::make_pair(VK_KHR_GET_MEMORY_REQUIREMENTS_2_EXTENSION_NAME, DeviceInfo(&DeviceExtensions::vk_khr_get_memory_requirements_2, {})),
630             std::make_pair(VK_KHR_IMAGE_FORMAT_LIST_EXTENSION_NAME, DeviceInfo(&DeviceExtensions::vk_khr_image_format_list, {})),
631             std::make_pair(VK_KHR_IMAGELESS_FRAMEBUFFER_EXTENSION_NAME, DeviceInfo(&DeviceExtensions::vk_khr_imageless_framebuffer, {{
632                            {&DeviceExtensions::vk_khr_maintenance2, VK_KHR_MAINTENANCE2_EXTENSION_NAME},
633                            {&DeviceExtensions::vk_khr_image_format_list, VK_KHR_IMAGE_FORMAT_LIST_EXTENSION_NAME}}})),
634             std::make_pair(VK_KHR_INCREMENTAL_PRESENT_EXTENSION_NAME, DeviceInfo(&DeviceExtensions::vk_khr_incremental_present, {{
635                            {&DeviceExtensions::vk_khr_swapchain, VK_KHR_SWAPCHAIN_EXTENSION_NAME}}})),
636             std::make_pair(VK_KHR_MAINTENANCE1_EXTENSION_NAME, DeviceInfo(&DeviceExtensions::vk_khr_maintenance1, {})),
637             std::make_pair(VK_KHR_MAINTENANCE2_EXTENSION_NAME, DeviceInfo(&DeviceExtensions::vk_khr_maintenance2, {})),
638             std::make_pair(VK_KHR_MAINTENANCE3_EXTENSION_NAME, DeviceInfo(&DeviceExtensions::vk_khr_maintenance3, {{
639                            {&DeviceExtensions::vk_khr_get_physical_device_properties_2, VK_KHR_GET_PHYSICAL_DEVICE_PROPERTIES_2_EXTENSION_NAME}}})),
640             std::make_pair(VK_KHR_MULTIVIEW_EXTENSION_NAME, DeviceInfo(&DeviceExtensions::vk_khr_multiview, {{
641                            {&DeviceExtensions::vk_khr_get_physical_device_properties_2, VK_KHR_GET_PHYSICAL_DEVICE_PROPERTIES_2_EXTENSION_NAME}}})),
642             std::make_pair(VK_KHR_PIPELINE_EXECUTABLE_PROPERTIES_EXTENSION_NAME, DeviceInfo(&DeviceExtensions::vk_khr_pipeline_executable_properties, {})),
643             std::make_pair(VK_KHR_PUSH_DESCRIPTOR_EXTENSION_NAME, DeviceInfo(&DeviceExtensions::vk_khr_push_descriptor, {{
644                            {&DeviceExtensions::vk_khr_get_physical_device_properties_2, VK_KHR_GET_PHYSICAL_DEVICE_PROPERTIES_2_EXTENSION_NAME}}})),
645             std::make_pair(VK_KHR_RELAXED_BLOCK_LAYOUT_EXTENSION_NAME, DeviceInfo(&DeviceExtensions::vk_khr_relaxed_block_layout, {})),
646             std::make_pair(VK_KHR_SAMPLER_MIRROR_CLAMP_TO_EDGE_EXTENSION_NAME, DeviceInfo(&DeviceExtensions::vk_khr_sampler_mirror_clamp_to_edge, {})),
647             std::make_pair(VK_KHR_SAMPLER_YCBCR_CONVERSION_EXTENSION_NAME, DeviceInfo(&DeviceExtensions::vk_khr_sampler_ycbcr_conversion, {{
648                            {&DeviceExtensions::vk_khr_maintenance1, VK_KHR_MAINTENANCE1_EXTENSION_NAME},
649                            {&DeviceExtensions::vk_khr_bind_memory_2, VK_KHR_BIND_MEMORY_2_EXTENSION_NAME},
650                            {&DeviceExtensions::vk_khr_get_memory_requirements_2, VK_KHR_GET_MEMORY_REQUIREMENTS_2_EXTENSION_NAME},
651                            {&DeviceExtensions::vk_khr_get_physical_device_properties_2, VK_KHR_GET_PHYSICAL_DEVICE_PROPERTIES_2_EXTENSION_NAME}}})),
652             std::make_pair(VK_KHR_SHADER_ATOMIC_INT64_EXTENSION_NAME, DeviceInfo(&DeviceExtensions::vk_khr_shader_atomic_int64, {{
653                            {&DeviceExtensions::vk_khr_get_physical_device_properties_2, VK_KHR_GET_PHYSICAL_DEVICE_PROPERTIES_2_EXTENSION_NAME}}})),
654             std::make_pair(VK_KHR_SHADER_DRAW_PARAMETERS_EXTENSION_NAME, DeviceInfo(&DeviceExtensions::vk_khr_shader_draw_parameters, {})),
655             std::make_pair(VK_KHR_SHADER_FLOAT16_INT8_EXTENSION_NAME, DeviceInfo(&DeviceExtensions::vk_khr_shader_float16_int8, {{
656                            {&DeviceExtensions::vk_khr_get_physical_device_properties_2, VK_KHR_GET_PHYSICAL_DEVICE_PROPERTIES_2_EXTENSION_NAME}}})),
657             std::make_pair(VK_KHR_SHADER_FLOAT_CONTROLS_EXTENSION_NAME, DeviceInfo(&DeviceExtensions::vk_khr_shader_float_controls, {{
658                            {&DeviceExtensions::vk_khr_get_physical_device_properties_2, VK_KHR_GET_PHYSICAL_DEVICE_PROPERTIES_2_EXTENSION_NAME}}})),
659             std::make_pair(VK_KHR_SHARED_PRESENTABLE_IMAGE_EXTENSION_NAME, DeviceInfo(&DeviceExtensions::vk_khr_shared_presentable_image, {{
660                            {&DeviceExtensions::vk_khr_swapchain, VK_KHR_SWAPCHAIN_EXTENSION_NAME},
661                            {&DeviceExtensions::vk_khr_get_physical_device_properties_2, VK_KHR_GET_PHYSICAL_DEVICE_PROPERTIES_2_EXTENSION_NAME},
662                            {&DeviceExtensions::vk_khr_get_surface_capabilities_2, VK_KHR_GET_SURFACE_CAPABILITIES_2_EXTENSION_NAME}}})),
663             std::make_pair(VK_KHR_STORAGE_BUFFER_STORAGE_CLASS_EXTENSION_NAME, DeviceInfo(&DeviceExtensions::vk_khr_storage_buffer_storage_class, {})),
664             std::make_pair(VK_KHR_SWAPCHAIN_EXTENSION_NAME, DeviceInfo(&DeviceExtensions::vk_khr_swapchain, {{
665                            {&DeviceExtensions::vk_khr_surface, VK_KHR_SURFACE_EXTENSION_NAME}}})),
666             std::make_pair(VK_KHR_SWAPCHAIN_MUTABLE_FORMAT_EXTENSION_NAME, DeviceInfo(&DeviceExtensions::vk_khr_swapchain_mutable_format, {{
667                            {&DeviceExtensions::vk_khr_swapchain, VK_KHR_SWAPCHAIN_EXTENSION_NAME},
668                            {&DeviceExtensions::vk_khr_maintenance2, VK_KHR_MAINTENANCE2_EXTENSION_NAME},
669                            {&DeviceExtensions::vk_khr_image_format_list, VK_KHR_IMAGE_FORMAT_LIST_EXTENSION_NAME}}})),
670             std::make_pair(VK_KHR_UNIFORM_BUFFER_STANDARD_LAYOUT_EXTENSION_NAME, DeviceInfo(&DeviceExtensions::vk_khr_uniform_buffer_standard_layout, {{
671                            {&DeviceExtensions::vk_khr_get_physical_device_properties_2, VK_KHR_GET_PHYSICAL_DEVICE_PROPERTIES_2_EXTENSION_NAME}}})),
672             std::make_pair(VK_KHR_VARIABLE_POINTERS_EXTENSION_NAME, DeviceInfo(&DeviceExtensions::vk_khr_variable_pointers, {{
673                            {&DeviceExtensions::vk_khr_get_physical_device_properties_2, VK_KHR_GET_PHYSICAL_DEVICE_PROPERTIES_2_EXTENSION_NAME},
674                            {&DeviceExtensions::vk_khr_storage_buffer_storage_class, VK_KHR_STORAGE_BUFFER_STORAGE_CLASS_EXTENSION_NAME}}})),
675             std::make_pair(VK_KHR_VULKAN_MEMORY_MODEL_EXTENSION_NAME, DeviceInfo(&DeviceExtensions::vk_khr_vulkan_memory_model, {})),
676 #ifdef VK_USE_PLATFORM_WIN32_KHR
677             std::make_pair(VK_KHR_WIN32_KEYED_MUTEX_EXTENSION_NAME, DeviceInfo(&DeviceExtensions::vk_khr_win32_keyed_mutex, {{
678                            {&DeviceExtensions::vk_khr_external_memory_win32, VK_KHR_EXTERNAL_MEMORY_WIN32_EXTENSION_NAME}}})),
679 #endif
680             std::make_pair(VK_NVX_DEVICE_GENERATED_COMMANDS_EXTENSION_NAME, DeviceInfo(&DeviceExtensions::vk_nvx_device_generated_commands, {})),
681             std::make_pair(VK_NVX_IMAGE_VIEW_HANDLE_EXTENSION_NAME, DeviceInfo(&DeviceExtensions::vk_nvx_image_view_handle, {})),
682             std::make_pair(VK_NVX_MULTIVIEW_PER_VIEW_ATTRIBUTES_EXTENSION_NAME, DeviceInfo(&DeviceExtensions::vk_nvx_multiview_per_view_attributes, {{
683                            {&DeviceExtensions::vk_khr_multiview, VK_KHR_MULTIVIEW_EXTENSION_NAME}}})),
684             std::make_pair(VK_NV_CLIP_SPACE_W_SCALING_EXTENSION_NAME, DeviceInfo(&DeviceExtensions::vk_nv_clip_space_w_scaling, {})),
685             std::make_pair(VK_NV_COMPUTE_SHADER_DERIVATIVES_EXTENSION_NAME, DeviceInfo(&DeviceExtensions::vk_nv_compute_shader_derivatives, {{
686                            {&DeviceExtensions::vk_khr_get_physical_device_properties_2, VK_KHR_GET_PHYSICAL_DEVICE_PROPERTIES_2_EXTENSION_NAME}}})),
687             std::make_pair(VK_NV_COOPERATIVE_MATRIX_EXTENSION_NAME, DeviceInfo(&DeviceExtensions::vk_nv_cooperative_matrix, {{
688                            {&DeviceExtensions::vk_khr_get_physical_device_properties_2, VK_KHR_GET_PHYSICAL_DEVICE_PROPERTIES_2_EXTENSION_NAME}}})),
689             std::make_pair(VK_NV_CORNER_SAMPLED_IMAGE_EXTENSION_NAME, DeviceInfo(&DeviceExtensions::vk_nv_corner_sampled_image, {{
690                            {&DeviceExtensions::vk_khr_get_physical_device_properties_2, VK_KHR_GET_PHYSICAL_DEVICE_PROPERTIES_2_EXTENSION_NAME}}})),
691             std::make_pair(VK_NV_COVERAGE_REDUCTION_MODE_EXTENSION_NAME, DeviceInfo(&DeviceExtensions::vk_nv_coverage_reduction_mode, {{
692                            {&DeviceExtensions::vk_nv_framebuffer_mixed_samples, VK_NV_FRAMEBUFFER_MIXED_SAMPLES_EXTENSION_NAME}}})),
693             std::make_pair(VK_NV_DEDICATED_ALLOCATION_EXTENSION_NAME, DeviceInfo(&DeviceExtensions::vk_nv_dedicated_allocation, {})),
694             std::make_pair(VK_NV_DEDICATED_ALLOCATION_IMAGE_ALIASING_EXTENSION_NAME, DeviceInfo(&DeviceExtensions::vk_nv_dedicated_allocation_image_aliasing, {{
695                            {&DeviceExtensions::vk_khr_dedicated_allocation, VK_KHR_DEDICATED_ALLOCATION_EXTENSION_NAME}}})),
696             std::make_pair(VK_NV_DEVICE_DIAGNOSTIC_CHECKPOINTS_EXTENSION_NAME, DeviceInfo(&DeviceExtensions::vk_nv_device_diagnostic_checkpoints, {{
697                            {&DeviceExtensions::vk_khr_get_physical_device_properties_2, VK_KHR_GET_PHYSICAL_DEVICE_PROPERTIES_2_EXTENSION_NAME}}})),
698             std::make_pair(VK_NV_EXTERNAL_MEMORY_EXTENSION_NAME, DeviceInfo(&DeviceExtensions::vk_nv_external_memory, {{
699                            {&DeviceExtensions::vk_nv_external_memory_capabilities, VK_NV_EXTERNAL_MEMORY_CAPABILITIES_EXTENSION_NAME}}})),
700 #ifdef VK_USE_PLATFORM_WIN32_KHR
701             std::make_pair(VK_NV_EXTERNAL_MEMORY_WIN32_EXTENSION_NAME, DeviceInfo(&DeviceExtensions::vk_nv_external_memory_win32, {{
702                            {&DeviceExtensions::vk_nv_external_memory, VK_NV_EXTERNAL_MEMORY_EXTENSION_NAME}}})),
703 #endif
704             std::make_pair(VK_NV_FILL_RECTANGLE_EXTENSION_NAME, DeviceInfo(&DeviceExtensions::vk_nv_fill_rectangle, {})),
705             std::make_pair(VK_NV_FRAGMENT_COVERAGE_TO_COLOR_EXTENSION_NAME, DeviceInfo(&DeviceExtensions::vk_nv_fragment_coverage_to_color, {})),
706             std::make_pair(VK_NV_FRAGMENT_SHADER_BARYCENTRIC_EXTENSION_NAME, DeviceInfo(&DeviceExtensions::vk_nv_fragment_shader_barycentric, {{
707                            {&DeviceExtensions::vk_khr_get_physical_device_properties_2, VK_KHR_GET_PHYSICAL_DEVICE_PROPERTIES_2_EXTENSION_NAME}}})),
708             std::make_pair(VK_NV_FRAMEBUFFER_MIXED_SAMPLES_EXTENSION_NAME, DeviceInfo(&DeviceExtensions::vk_nv_framebuffer_mixed_samples, {})),
709             std::make_pair(VK_NV_GEOMETRY_SHADER_PASSTHROUGH_EXTENSION_NAME, DeviceInfo(&DeviceExtensions::vk_nv_geometry_shader_passthrough, {})),
710             std::make_pair(VK_NV_GLSL_SHADER_EXTENSION_NAME, DeviceInfo(&DeviceExtensions::vk_nv_glsl_shader, {})),
711             std::make_pair(VK_NV_MESH_SHADER_EXTENSION_NAME, DeviceInfo(&DeviceExtensions::vk_nv_mesh_shader, {{
712                            {&DeviceExtensions::vk_khr_get_physical_device_properties_2, VK_KHR_GET_PHYSICAL_DEVICE_PROPERTIES_2_EXTENSION_NAME}}})),
713             std::make_pair(VK_NV_RAY_TRACING_EXTENSION_NAME, DeviceInfo(&DeviceExtensions::vk_nv_ray_tracing, {{
714                            {&DeviceExtensions::vk_khr_get_physical_device_properties_2, VK_KHR_GET_PHYSICAL_DEVICE_PROPERTIES_2_EXTENSION_NAME},
715                            {&DeviceExtensions::vk_khr_get_memory_requirements_2, VK_KHR_GET_MEMORY_REQUIREMENTS_2_EXTENSION_NAME}}})),
716             std::make_pair(VK_NV_REPRESENTATIVE_FRAGMENT_TEST_EXTENSION_NAME, DeviceInfo(&DeviceExtensions::vk_nv_representative_fragment_test, {})),
717             std::make_pair(VK_NV_SAMPLE_MASK_OVERRIDE_COVERAGE_EXTENSION_NAME, DeviceInfo(&DeviceExtensions::vk_nv_sample_mask_override_coverage, {})),
718             std::make_pair(VK_NV_SCISSOR_EXCLUSIVE_EXTENSION_NAME, DeviceInfo(&DeviceExtensions::vk_nv_scissor_exclusive, {{
719                            {&DeviceExtensions::vk_khr_get_physical_device_properties_2, VK_KHR_GET_PHYSICAL_DEVICE_PROPERTIES_2_EXTENSION_NAME}}})),
720             std::make_pair(VK_NV_SHADER_IMAGE_FOOTPRINT_EXTENSION_NAME, DeviceInfo(&DeviceExtensions::vk_nv_shader_image_footprint, {{
721                            {&DeviceExtensions::vk_khr_get_physical_device_properties_2, VK_KHR_GET_PHYSICAL_DEVICE_PROPERTIES_2_EXTENSION_NAME}}})),
722             std::make_pair(VK_NV_SHADER_SM_BUILTINS_EXTENSION_NAME, DeviceInfo(&DeviceExtensions::vk_nv_shader_sm_builtins, {})),
723             std::make_pair(VK_NV_SHADER_SUBGROUP_PARTITIONED_EXTENSION_NAME, DeviceInfo(&DeviceExtensions::vk_nv_shader_subgroup_partitioned, {})),
724             std::make_pair(VK_NV_SHADING_RATE_IMAGE_EXTENSION_NAME, DeviceInfo(&DeviceExtensions::vk_nv_shading_rate_image, {{
725                            {&DeviceExtensions::vk_khr_get_physical_device_properties_2, VK_KHR_GET_PHYSICAL_DEVICE_PROPERTIES_2_EXTENSION_NAME}}})),
726             std::make_pair(VK_NV_VIEWPORT_ARRAY2_EXTENSION_NAME, DeviceInfo(&DeviceExtensions::vk_nv_viewport_array2, {})),
727             std::make_pair(VK_NV_VIEWPORT_SWIZZLE_EXTENSION_NAME, DeviceInfo(&DeviceExtensions::vk_nv_viewport_swizzle, {})),
728 #ifdef VK_USE_PLATFORM_WIN32_KHR
729             std::make_pair(VK_NV_WIN32_KEYED_MUTEX_EXTENSION_NAME, DeviceInfo(&DeviceExtensions::vk_nv_win32_keyed_mutex, {{
730                            {&DeviceExtensions::vk_nv_external_memory_win32, VK_NV_EXTERNAL_MEMORY_WIN32_EXTENSION_NAME}}})),
731 #endif
732         };
733 
734         static const DeviceInfo empty_info {nullptr, DeviceReqVec()};
735         DeviceInfoMap::const_iterator info = info_map.find(name);
736         if ( info != info_map.cend()) {
737             return info->second;
738         }
739         return empty_info;
740     }
741 
742     DeviceExtensions() = default;
DeviceExtensionsDeviceExtensions743     DeviceExtensions(const InstanceExtensions& instance_ext) : InstanceExtensions(instance_ext) {}
744 
InitFromDeviceCreateInfoDeviceExtensions745     uint32_t InitFromDeviceCreateInfo(const InstanceExtensions *instance_extensions, uint32_t requested_api_version,
746                                       const VkDeviceCreateInfo *pCreateInfo) {
747         // Initialize: this to defaults,  base class fields to input.
748         assert(instance_extensions);
749         *this = DeviceExtensions(*instance_extensions);
750 
751 
752         static const std::vector<const char *> V_1_1_promoted_device_apis = {
753             VK_KHR_16BIT_STORAGE_EXTENSION_NAME,
754             VK_KHR_BIND_MEMORY_2_EXTENSION_NAME,
755             VK_KHR_DEDICATED_ALLOCATION_EXTENSION_NAME,
756             VK_KHR_DESCRIPTOR_UPDATE_TEMPLATE_EXTENSION_NAME,
757             VK_KHR_DEVICE_GROUP_EXTENSION_NAME,
758             VK_KHR_EXTERNAL_FENCE_EXTENSION_NAME,
759             VK_KHR_EXTERNAL_MEMORY_EXTENSION_NAME,
760             VK_KHR_EXTERNAL_SEMAPHORE_EXTENSION_NAME,
761             VK_KHR_GET_MEMORY_REQUIREMENTS_2_EXTENSION_NAME,
762             VK_KHR_MAINTENANCE1_EXTENSION_NAME,
763             VK_KHR_MAINTENANCE2_EXTENSION_NAME,
764             VK_KHR_MAINTENANCE3_EXTENSION_NAME,
765             VK_KHR_MULTIVIEW_EXTENSION_NAME,
766             VK_KHR_RELAXED_BLOCK_LAYOUT_EXTENSION_NAME,
767             VK_KHR_SAMPLER_YCBCR_CONVERSION_EXTENSION_NAME,
768             VK_KHR_SHADER_DRAW_PARAMETERS_EXTENSION_NAME,
769             VK_KHR_STORAGE_BUFFER_STORAGE_CLASS_EXTENSION_NAME,
770             VK_KHR_VARIABLE_POINTERS_EXTENSION_NAME,
771             "VK_VERSION_1_1",
772         };
773 
774         // Initialize struct data, robust to invalid pCreateInfo
775         if (pCreateInfo->ppEnabledExtensionNames) {
776             for (uint32_t i = 0; i < pCreateInfo->enabledExtensionCount; i++) {
777                 if (!pCreateInfo->ppEnabledExtensionNames[i]) continue;
778                 auto info = get_info(pCreateInfo->ppEnabledExtensionNames[i]);
779                 if(info.state) this->*(info.state) = true;
780             }
781         }
782         uint32_t api_version = NormalizeApiVersion(requested_api_version);
783         if (api_version >= VK_API_VERSION_1_1) {
784             for (auto promoted_ext : V_1_1_promoted_device_apis) {
785                 auto info = get_info(promoted_ext);
786                 assert(info.state);
787                 if (info.state) this->*(info.state) = true;
788             }
789         }
790         return api_version;
791     }
792 };
793 
794 static const std::set<std::string> kDeviceExtensionNames = {
795     VK_AMD_BUFFER_MARKER_EXTENSION_NAME,
796     VK_AMD_DEVICE_COHERENT_MEMORY_EXTENSION_NAME,
797     VK_AMD_DISPLAY_NATIVE_HDR_EXTENSION_NAME,
798     VK_AMD_DRAW_INDIRECT_COUNT_EXTENSION_NAME,
799     VK_AMD_GCN_SHADER_EXTENSION_NAME,
800     VK_AMD_GPU_SHADER_HALF_FLOAT_EXTENSION_NAME,
801     VK_AMD_GPU_SHADER_INT16_EXTENSION_NAME,
802     VK_AMD_MEMORY_OVERALLOCATION_BEHAVIOR_EXTENSION_NAME,
803     VK_AMD_MIXED_ATTACHMENT_SAMPLES_EXTENSION_NAME,
804     VK_AMD_NEGATIVE_VIEWPORT_HEIGHT_EXTENSION_NAME,
805     VK_AMD_PIPELINE_COMPILER_CONTROL_EXTENSION_NAME,
806     VK_AMD_RASTERIZATION_ORDER_EXTENSION_NAME,
807     VK_AMD_SHADER_BALLOT_EXTENSION_NAME,
808     VK_AMD_SHADER_CORE_PROPERTIES_EXTENSION_NAME,
809     VK_AMD_SHADER_CORE_PROPERTIES_2_EXTENSION_NAME,
810     VK_AMD_SHADER_EXPLICIT_VERTEX_PARAMETER_EXTENSION_NAME,
811     VK_AMD_SHADER_FRAGMENT_MASK_EXTENSION_NAME,
812     VK_AMD_SHADER_IMAGE_LOAD_STORE_LOD_EXTENSION_NAME,
813     VK_AMD_SHADER_INFO_EXTENSION_NAME,
814     VK_AMD_SHADER_TRINARY_MINMAX_EXTENSION_NAME,
815     VK_AMD_TEXTURE_GATHER_BIAS_LOD_EXTENSION_NAME,
816 #ifdef VK_USE_PLATFORM_ANDROID_KHR
817     VK_ANDROID_EXTERNAL_MEMORY_ANDROID_HARDWARE_BUFFER_EXTENSION_NAME,
818 #endif
819     VK_EXT_ASTC_DECODE_MODE_EXTENSION_NAME,
820     VK_EXT_BLEND_OPERATION_ADVANCED_EXTENSION_NAME,
821     VK_EXT_BUFFER_DEVICE_ADDRESS_EXTENSION_NAME,
822     VK_EXT_CALIBRATED_TIMESTAMPS_EXTENSION_NAME,
823     VK_EXT_CONDITIONAL_RENDERING_EXTENSION_NAME,
824     VK_EXT_CONSERVATIVE_RASTERIZATION_EXTENSION_NAME,
825     VK_EXT_DEBUG_MARKER_EXTENSION_NAME,
826     VK_EXT_DEPTH_CLIP_ENABLE_EXTENSION_NAME,
827     VK_EXT_DEPTH_RANGE_UNRESTRICTED_EXTENSION_NAME,
828     VK_EXT_DESCRIPTOR_INDEXING_EXTENSION_NAME,
829     VK_EXT_DISCARD_RECTANGLES_EXTENSION_NAME,
830     VK_EXT_DISPLAY_CONTROL_EXTENSION_NAME,
831     VK_EXT_EXTERNAL_MEMORY_DMA_BUF_EXTENSION_NAME,
832     VK_EXT_EXTERNAL_MEMORY_HOST_EXTENSION_NAME,
833     VK_EXT_FILTER_CUBIC_EXTENSION_NAME,
834     VK_EXT_FRAGMENT_DENSITY_MAP_EXTENSION_NAME,
835     VK_EXT_FRAGMENT_SHADER_INTERLOCK_EXTENSION_NAME,
836 #ifdef VK_USE_PLATFORM_WIN32_KHR
837     VK_EXT_FULL_SCREEN_EXCLUSIVE_EXTENSION_NAME,
838 #endif
839     VK_EXT_GLOBAL_PRIORITY_EXTENSION_NAME,
840     VK_EXT_HDR_METADATA_EXTENSION_NAME,
841     VK_EXT_HOST_QUERY_RESET_EXTENSION_NAME,
842     VK_EXT_IMAGE_DRM_FORMAT_MODIFIER_EXTENSION_NAME,
843     VK_EXT_INDEX_TYPE_UINT8_EXTENSION_NAME,
844     VK_EXT_INLINE_UNIFORM_BLOCK_EXTENSION_NAME,
845     VK_EXT_LINE_RASTERIZATION_EXTENSION_NAME,
846     VK_EXT_MEMORY_BUDGET_EXTENSION_NAME,
847     VK_EXT_MEMORY_PRIORITY_EXTENSION_NAME,
848     VK_EXT_PCI_BUS_INFO_EXTENSION_NAME,
849     VK_EXT_PIPELINE_CREATION_FEEDBACK_EXTENSION_NAME,
850     VK_EXT_POST_DEPTH_COVERAGE_EXTENSION_NAME,
851     VK_EXT_QUEUE_FAMILY_FOREIGN_EXTENSION_NAME,
852     VK_EXT_SAMPLE_LOCATIONS_EXTENSION_NAME,
853     VK_EXT_SAMPLER_FILTER_MINMAX_EXTENSION_NAME,
854     VK_EXT_SCALAR_BLOCK_LAYOUT_EXTENSION_NAME,
855     VK_EXT_SEPARATE_STENCIL_USAGE_EXTENSION_NAME,
856     VK_EXT_SHADER_DEMOTE_TO_HELPER_INVOCATION_EXTENSION_NAME,
857     VK_EXT_SHADER_STENCIL_EXPORT_EXTENSION_NAME,
858     VK_EXT_SHADER_SUBGROUP_BALLOT_EXTENSION_NAME,
859     VK_EXT_SHADER_SUBGROUP_VOTE_EXTENSION_NAME,
860     VK_EXT_SHADER_VIEWPORT_INDEX_LAYER_EXTENSION_NAME,
861     VK_EXT_SUBGROUP_SIZE_CONTROL_EXTENSION_NAME,
862     VK_EXT_TEXEL_BUFFER_ALIGNMENT_EXTENSION_NAME,
863     VK_EXT_TEXTURE_COMPRESSION_ASTC_HDR_EXTENSION_NAME,
864     VK_EXT_TRANSFORM_FEEDBACK_EXTENSION_NAME,
865     VK_EXT_VALIDATION_CACHE_EXTENSION_NAME,
866     VK_EXT_VERTEX_ATTRIBUTE_DIVISOR_EXTENSION_NAME,
867     VK_EXT_YCBCR_IMAGE_ARRAYS_EXTENSION_NAME,
868 #ifdef VK_USE_PLATFORM_GGP
869     VK_GGP_FRAME_TOKEN_EXTENSION_NAME,
870 #endif
871     VK_GOOGLE_DECORATE_STRING_EXTENSION_NAME,
872     VK_GOOGLE_DISPLAY_TIMING_EXTENSION_NAME,
873     VK_GOOGLE_HLSL_FUNCTIONALITY1_EXTENSION_NAME,
874     VK_IMG_FILTER_CUBIC_EXTENSION_NAME,
875     VK_IMG_FORMAT_PVRTC_EXTENSION_NAME,
876     VK_INTEL_PERFORMANCE_QUERY_EXTENSION_NAME,
877     VK_INTEL_SHADER_INTEGER_FUNCTIONS_2_EXTENSION_NAME,
878     VK_KHR_16BIT_STORAGE_EXTENSION_NAME,
879     VK_KHR_8BIT_STORAGE_EXTENSION_NAME,
880     VK_KHR_BIND_MEMORY_2_EXTENSION_NAME,
881     VK_KHR_CREATE_RENDERPASS_2_EXTENSION_NAME,
882     VK_KHR_DEDICATED_ALLOCATION_EXTENSION_NAME,
883     VK_KHR_DEPTH_STENCIL_RESOLVE_EXTENSION_NAME,
884     VK_KHR_DESCRIPTOR_UPDATE_TEMPLATE_EXTENSION_NAME,
885     VK_KHR_DEVICE_GROUP_EXTENSION_NAME,
886     VK_KHR_DISPLAY_SWAPCHAIN_EXTENSION_NAME,
887     VK_KHR_DRAW_INDIRECT_COUNT_EXTENSION_NAME,
888     VK_KHR_DRIVER_PROPERTIES_EXTENSION_NAME,
889     VK_KHR_EXTERNAL_FENCE_EXTENSION_NAME,
890     VK_KHR_EXTERNAL_FENCE_FD_EXTENSION_NAME,
891 #ifdef VK_USE_PLATFORM_WIN32_KHR
892     VK_KHR_EXTERNAL_FENCE_WIN32_EXTENSION_NAME,
893 #endif
894     VK_KHR_EXTERNAL_MEMORY_EXTENSION_NAME,
895     VK_KHR_EXTERNAL_MEMORY_FD_EXTENSION_NAME,
896 #ifdef VK_USE_PLATFORM_WIN32_KHR
897     VK_KHR_EXTERNAL_MEMORY_WIN32_EXTENSION_NAME,
898 #endif
899     VK_KHR_EXTERNAL_SEMAPHORE_EXTENSION_NAME,
900     VK_KHR_EXTERNAL_SEMAPHORE_FD_EXTENSION_NAME,
901 #ifdef VK_USE_PLATFORM_WIN32_KHR
902     VK_KHR_EXTERNAL_SEMAPHORE_WIN32_EXTENSION_NAME,
903 #endif
904     VK_KHR_GET_MEMORY_REQUIREMENTS_2_EXTENSION_NAME,
905     VK_KHR_IMAGE_FORMAT_LIST_EXTENSION_NAME,
906     VK_KHR_IMAGELESS_FRAMEBUFFER_EXTENSION_NAME,
907     VK_KHR_INCREMENTAL_PRESENT_EXTENSION_NAME,
908     VK_KHR_MAINTENANCE1_EXTENSION_NAME,
909     VK_KHR_MAINTENANCE2_EXTENSION_NAME,
910     VK_KHR_MAINTENANCE3_EXTENSION_NAME,
911     VK_KHR_MULTIVIEW_EXTENSION_NAME,
912     VK_KHR_PIPELINE_EXECUTABLE_PROPERTIES_EXTENSION_NAME,
913     VK_KHR_PUSH_DESCRIPTOR_EXTENSION_NAME,
914     VK_KHR_RELAXED_BLOCK_LAYOUT_EXTENSION_NAME,
915     VK_KHR_SAMPLER_MIRROR_CLAMP_TO_EDGE_EXTENSION_NAME,
916     VK_KHR_SAMPLER_YCBCR_CONVERSION_EXTENSION_NAME,
917     VK_KHR_SHADER_ATOMIC_INT64_EXTENSION_NAME,
918     VK_KHR_SHADER_DRAW_PARAMETERS_EXTENSION_NAME,
919     VK_KHR_SHADER_FLOAT16_INT8_EXTENSION_NAME,
920     VK_KHR_SHADER_FLOAT_CONTROLS_EXTENSION_NAME,
921     VK_KHR_SHARED_PRESENTABLE_IMAGE_EXTENSION_NAME,
922     VK_KHR_STORAGE_BUFFER_STORAGE_CLASS_EXTENSION_NAME,
923     VK_KHR_SWAPCHAIN_EXTENSION_NAME,
924     VK_KHR_SWAPCHAIN_MUTABLE_FORMAT_EXTENSION_NAME,
925     VK_KHR_UNIFORM_BUFFER_STANDARD_LAYOUT_EXTENSION_NAME,
926     VK_KHR_VARIABLE_POINTERS_EXTENSION_NAME,
927     VK_KHR_VULKAN_MEMORY_MODEL_EXTENSION_NAME,
928 #ifdef VK_USE_PLATFORM_WIN32_KHR
929     VK_KHR_WIN32_KEYED_MUTEX_EXTENSION_NAME,
930 #endif
931     VK_NVX_DEVICE_GENERATED_COMMANDS_EXTENSION_NAME,
932     VK_NVX_IMAGE_VIEW_HANDLE_EXTENSION_NAME,
933     VK_NVX_MULTIVIEW_PER_VIEW_ATTRIBUTES_EXTENSION_NAME,
934     VK_NV_CLIP_SPACE_W_SCALING_EXTENSION_NAME,
935     VK_NV_COMPUTE_SHADER_DERIVATIVES_EXTENSION_NAME,
936     VK_NV_COOPERATIVE_MATRIX_EXTENSION_NAME,
937     VK_NV_CORNER_SAMPLED_IMAGE_EXTENSION_NAME,
938     VK_NV_COVERAGE_REDUCTION_MODE_EXTENSION_NAME,
939     VK_NV_DEDICATED_ALLOCATION_EXTENSION_NAME,
940     VK_NV_DEDICATED_ALLOCATION_IMAGE_ALIASING_EXTENSION_NAME,
941     VK_NV_DEVICE_DIAGNOSTIC_CHECKPOINTS_EXTENSION_NAME,
942     VK_NV_EXTERNAL_MEMORY_EXTENSION_NAME,
943 #ifdef VK_USE_PLATFORM_WIN32_KHR
944     VK_NV_EXTERNAL_MEMORY_WIN32_EXTENSION_NAME,
945 #endif
946     VK_NV_FILL_RECTANGLE_EXTENSION_NAME,
947     VK_NV_FRAGMENT_COVERAGE_TO_COLOR_EXTENSION_NAME,
948     VK_NV_FRAGMENT_SHADER_BARYCENTRIC_EXTENSION_NAME,
949     VK_NV_FRAMEBUFFER_MIXED_SAMPLES_EXTENSION_NAME,
950     VK_NV_GEOMETRY_SHADER_PASSTHROUGH_EXTENSION_NAME,
951     VK_NV_GLSL_SHADER_EXTENSION_NAME,
952     VK_NV_MESH_SHADER_EXTENSION_NAME,
953     VK_NV_RAY_TRACING_EXTENSION_NAME,
954     VK_NV_REPRESENTATIVE_FRAGMENT_TEST_EXTENSION_NAME,
955     VK_NV_SAMPLE_MASK_OVERRIDE_COVERAGE_EXTENSION_NAME,
956     VK_NV_SCISSOR_EXCLUSIVE_EXTENSION_NAME,
957     VK_NV_SHADER_IMAGE_FOOTPRINT_EXTENSION_NAME,
958     VK_NV_SHADER_SM_BUILTINS_EXTENSION_NAME,
959     VK_NV_SHADER_SUBGROUP_PARTITIONED_EXTENSION_NAME,
960     VK_NV_SHADING_RATE_IMAGE_EXTENSION_NAME,
961     VK_NV_VIEWPORT_ARRAY2_EXTENSION_NAME,
962     VK_NV_VIEWPORT_SWIZZLE_EXTENSION_NAME,
963 #ifdef VK_USE_PLATFORM_WIN32_KHR
964     VK_NV_WIN32_KEYED_MUTEX_EXTENSION_NAME,
965 #endif
966 };
967 
968 
969 #endif // VK_EXTENSION_HELPER_H_
970