Skip to main content

vulkan_rust/generated/
instance_wrappers.rs

1#![allow(unused_imports)]
2#![allow(clippy::too_many_arguments)]
3use crate::error::{VkResult, check, enumerate_two_call, fill_two_call};
4use crate::vk::*;
5impl crate::Instance {
6    ///Wraps [`vkDestroyInstance`](https://registry.khronos.org/vulkan/specs/latest/man/html/vkDestroyInstance.html).
7    /**
8    Provided by **VK_BASE_VERSION_1_0**.*/
9    ///
10    ///# Safety
11    ///- `instance` (self) must be valid and not destroyed.
12    ///- `instance` must be externally synchronized.
13    ///
14    ///# Panics
15    ///Panics if `vkDestroyInstance` was not loaded. This can happen if the required extension or Vulkan version is not enabled on the instance or device.
16    ///
17    ///# Usage Notes
18    ///
19    ///Destroys a Vulkan instance and frees all instance-level resources.
20    ///All devices created from this instance must be destroyed first.
21    ///
22    ///Safe teardown order:
23    ///
24    ///1. Destroy all `Device` objects (which destroys all device-child
25    ///   objects).
26    ///2. Destroy any debug messengers or debug report callbacks.
27    ///3. Destroy any surfaces.
28    ///4. `destroy_instance`.
29    ///
30    ///After this call the instance handle and all physical device handles
31    ///obtained from it are invalid.
32    ///
33    ///# Guide
34    ///
35    ///See [The Vulkan Object Model](https://hiddentale.github.io/vulkan_rust/concepts/object-model.html) in the vulkan_rust guide.
36    pub unsafe fn destroy_instance(&self, allocator: Option<&AllocationCallbacks>) {
37        let fp = self
38            .commands()
39            .destroy_instance
40            .expect("vkDestroyInstance not loaded");
41        let alloc_ptr = allocator.map_or(core::ptr::null(), core::ptr::from_ref);
42        unsafe { fp(self.handle(), alloc_ptr) };
43    }
44    ///Wraps [`vkEnumeratePhysicalDevices`](https://registry.khronos.org/vulkan/specs/latest/man/html/vkEnumeratePhysicalDevices.html).
45    /**
46    Provided by **VK_BASE_VERSION_1_0**.*/
47    ///
48    ///# Errors
49    ///- `VK_ERROR_OUT_OF_HOST_MEMORY`
50    ///- `VK_ERROR_OUT_OF_DEVICE_MEMORY`
51    ///- `VK_ERROR_INITIALIZATION_FAILED`
52    ///- `VK_ERROR_UNKNOWN`
53    ///- `VK_ERROR_VALIDATION_FAILED`
54    ///
55    ///# Safety
56    ///- `instance` (self) must be valid and not destroyed.
57    ///
58    ///# Panics
59    ///Panics if `vkEnumeratePhysicalDevices` was not loaded. This can happen if the required extension or Vulkan version is not enabled on the instance or device.
60    ///
61    ///# Usage Notes
62    ///
63    ///Returns a list of all physical devices (GPUs) available to the
64    ///instance. This is typically the first call after instance creation,
65    ///you need a physical device to query capabilities and create a
66    ///logical device.
67    ///
68    ///The order of physical devices is driver-dependent and not guaranteed
69    ///to be stable across runs. To pick the right GPU:
70    ///
71    ///1. Enumerate all devices.
72    ///2. Query `get_physical_device_properties` for each.
73    ///3. Prefer `PHYSICAL_DEVICE_TYPE_DISCRETE_GPU` for performance, or
74    ///   `INTEGRATED_GPU` for power efficiency.
75    ///4. Check queue families, memory heaps, and required features.
76    ///
77    ///On systems with multiple GPUs (e.g. a discrete + integrated), this
78    ///returns all of them. Vulkan does not have a concept of a "default"
79    ///GPU, your application must choose.
80    ///
81    ///# Guide
82    ///
83    ///See [Hello Triangle, Part 1](https://hiddentale.github.io/vulkan_rust/getting-started/hello-triangle-1.html) in the vulkan_rust guide.
84    pub unsafe fn enumerate_physical_devices(&self) -> VkResult<Vec<PhysicalDevice>> {
85        let fp = self
86            .commands()
87            .enumerate_physical_devices
88            .expect("vkEnumeratePhysicalDevices not loaded");
89        enumerate_two_call(|count, data| unsafe { fp(self.handle(), count, data) })
90    }
91    ///Wraps [`vkGetInstanceProcAddr`](https://registry.khronos.org/vulkan/specs/latest/man/html/vkGetInstanceProcAddr.html).
92    /**
93    Provided by **VK_BASE_VERSION_1_0**.*/
94    ///
95    ///# Safety
96    ///- `instance` (self) must be valid and not destroyed.
97    ///
98    ///# Panics
99    ///Panics if `vkGetInstanceProcAddr` was not loaded. This can happen if the required extension or Vulkan version is not enabled on the instance or device.
100    ///
101    ///# Usage Notes
102    ///
103    ///Returns a function pointer for an instance-level or device-level
104    ///Vulkan command. This is the root of the Vulkan function pointer
105    ///loading chain.
106    ///
107    ///In normal usage you do not need to call this yourself, `Instance`
108    ///and `Device` load all function pointers automatically. This is
109    ///primarily useful for:
110    ///
111    ///- Loading commands that are not yet exposed as wrapper methods.
112    ///- Raw interop with other Vulkan libraries (e.g. OpenXR).
113    ///- Implementing custom loaders.
114    ///
115    ///When called with a null instance, returns pointers for global
116    ///commands (`vkEnumerateInstanceVersion`,
117    ///`vkEnumerateInstanceExtensionProperties`, etc.).
118    ///
119    ///The returned pointer may go through a loader trampoline. For
120    ///device-level commands, `get_device_proc_addr` returns a
121    ///driver-direct pointer that is slightly faster.
122    pub unsafe fn get_instance_proc_addr(&self, p_name: *const core::ffi::c_char) {
123        let fp = self
124            .commands()
125            .get_instance_proc_addr
126            .expect("vkGetInstanceProcAddr not loaded");
127        unsafe { fp(self.handle(), p_name) };
128    }
129    ///Wraps [`vkGetPhysicalDeviceProperties`](https://registry.khronos.org/vulkan/specs/latest/man/html/vkGetPhysicalDeviceProperties.html).
130    /**
131    Provided by **VK_BASE_VERSION_1_0**.*/
132    ///
133    ///# Safety
134    ///- `physicalDevice` (self) must be valid and not destroyed.
135    ///
136    ///# Panics
137    ///Panics if `vkGetPhysicalDeviceProperties` was not loaded. This can happen if the required extension or Vulkan version is not enabled on the instance or device.
138    ///
139    ///# Usage Notes
140    ///
141    ///Returns general properties of a physical device: device name, vendor
142    ///ID, driver version, API version, device type, and device limits.
143    ///
144    ///Key fields to check during device selection:
145    ///
146    ///- **`device_type`**: `DISCRETE_GPU`, `INTEGRATED_GPU`, `VIRTUAL_GPU`,
147    ///  `CPU`, or `OTHER`. Discrete GPUs typically offer the best
148    ///  performance.
149    ///- **`api_version`**: the highest Vulkan version the device supports.
150    ///- **`limits`**: contains hundreds of device limits like
151    ///  `max_image_dimension_2d`, `max_push_constants_size`,
152    ///  `timestamp_period`, `non_coherent_atom_size`, etc.
153    ///- **`pipeline_cache_uuid`**: used to validate pipeline cache data
154    ///  across sessions.
155    ///
156    ///For extended properties (Vulkan 1.1+), use
157    ///`get_physical_device_properties2` which supports chaining additional
158    ///property structs like `PhysicalDeviceVulkan12Properties`.
159    ///
160    ///# Guide
161    ///
162    ///See [Hello Triangle, Part 1](https://hiddentale.github.io/vulkan_rust/getting-started/hello-triangle-1.html) in the vulkan_rust guide.
163    pub unsafe fn get_physical_device_properties(
164        &self,
165        physical_device: PhysicalDevice,
166    ) -> PhysicalDeviceProperties {
167        let fp = self
168            .commands()
169            .get_physical_device_properties
170            .expect("vkGetPhysicalDeviceProperties not loaded");
171        let mut out = unsafe { core::mem::zeroed() };
172        unsafe { fp(physical_device, &mut out) };
173        out
174    }
175    ///Wraps [`vkGetPhysicalDeviceQueueFamilyProperties`](https://registry.khronos.org/vulkan/specs/latest/man/html/vkGetPhysicalDeviceQueueFamilyProperties.html).
176    /**
177    Provided by **VK_BASE_VERSION_1_0**.*/
178    ///
179    ///# Safety
180    ///- `physicalDevice` (self) must be valid and not destroyed.
181    ///
182    ///# Panics
183    ///Panics if `vkGetPhysicalDeviceQueueFamilyProperties` was not loaded. This can happen if the required extension or Vulkan version is not enabled on the instance or device.
184    ///
185    ///# Usage Notes
186    ///
187    ///Returns the list of queue families supported by a physical device.
188    ///Each queue family has a set of capabilities (graphics, compute,
189    ///transfer, sparse binding) and a count of available queues.
190    ///
191    ///You must query this before creating a device to determine which
192    ///queue family indices to request.
193    ///
194    ///**Common queue family selection**:
195    ///
196    ///- **Graphics + compute**: most desktop GPUs have a single family
197    ///  that supports both. Use it for all rendering and compute work.
198    ///- **Dedicated transfer**: some GPUs expose a transfer-only family
199    ///  backed by a DMA engine. Use it for async uploads to overlap with
200    ///  rendering.
201    ///- **Dedicated compute**: some GPUs expose a compute-only family
202    ///  for async compute.
203    ///
204    ///Check `queue_flags` for `QUEUE_GRAPHICS`, `QUEUE_COMPUTE`,
205    ///`QUEUE_TRANSFER`, and `QUEUE_SPARSE_BINDING`. Also check
206    ///`timestamp_valid_bits` if you need GPU timestamps on that queue.
207    ///
208    ///For extended properties (Vulkan 1.1+), use
209    ///`get_physical_device_queue_family_properties2`.
210    ///
211    ///# Guide
212    ///
213    ///See [Hello Triangle, Part 1](https://hiddentale.github.io/vulkan_rust/getting-started/hello-triangle-1.html) in the vulkan_rust guide.
214    pub unsafe fn get_physical_device_queue_family_properties(
215        &self,
216        physical_device: PhysicalDevice,
217    ) -> Vec<QueueFamilyProperties> {
218        let fp = self
219            .commands()
220            .get_physical_device_queue_family_properties
221            .expect("vkGetPhysicalDeviceQueueFamilyProperties not loaded");
222        fill_two_call(|count, data| unsafe { fp(physical_device, count, data) })
223    }
224    ///Wraps [`vkGetPhysicalDeviceMemoryProperties`](https://registry.khronos.org/vulkan/specs/latest/man/html/vkGetPhysicalDeviceMemoryProperties.html).
225    /**
226    Provided by **VK_BASE_VERSION_1_0**.*/
227    ///
228    ///# Safety
229    ///- `physicalDevice` (self) must be valid and not destroyed.
230    ///
231    ///# Panics
232    ///Panics if `vkGetPhysicalDeviceMemoryProperties` was not loaded. This can happen if the required extension or Vulkan version is not enabled on the instance or device.
233    ///
234    ///# Usage Notes
235    ///
236    ///Returns the memory heaps and memory types available on the physical
237    ///device. Essential for choosing the right memory type when allocating
238    ///device memory.
239    ///
240    ///**Memory heaps**: represent physical memory pools (e.g. VRAM, system
241    ///RAM). Each heap has a size and flags (`DEVICE_LOCAL` for GPU memory).
242    ///
243    ///**Memory types**: each type references a heap and has property flags:
244    ///
245    ///- `DEVICE_LOCAL`: fast GPU access. Preferred for images, vertex
246    ///  buffers, and anything the GPU reads frequently.
247    ///- `HOST_VISIBLE`: can be mapped for CPU access. Required for staging
248    ///  buffers and any CPU-written data.
249    ///- `HOST_COHERENT`: mapped writes are automatically visible to the
250    ///  GPU without explicit flushes.
251    ///- `HOST_CACHED`: CPU reads are fast (cached). Useful for readback
252    ///  buffers.
253    ///- `LAZILY_ALLOCATED`: memory may not be backed until used. For
254    ///  transient attachments on tile-based GPUs.
255    ///
256    ///**Choosing a memory type**: AND the `memory_type_bits` from
257    ///`get_buffer_memory_requirements` or `get_image_memory_requirements`
258    ///with your desired property flags. Pick the first matching type.
259    ///
260    ///For extended properties (Vulkan 1.1+), use
261    ///`get_physical_device_memory_properties2`.
262    pub unsafe fn get_physical_device_memory_properties(
263        &self,
264        physical_device: PhysicalDevice,
265    ) -> PhysicalDeviceMemoryProperties {
266        let fp = self
267            .commands()
268            .get_physical_device_memory_properties
269            .expect("vkGetPhysicalDeviceMemoryProperties not loaded");
270        let mut out = unsafe { core::mem::zeroed() };
271        unsafe { fp(physical_device, &mut out) };
272        out
273    }
274    ///Wraps [`vkGetPhysicalDeviceFeatures`](https://registry.khronos.org/vulkan/specs/latest/man/html/vkGetPhysicalDeviceFeatures.html).
275    /**
276    Provided by **VK_BASE_VERSION_1_0**.*/
277    ///
278    ///# Safety
279    ///- `physicalDevice` (self) must be valid and not destroyed.
280    ///
281    ///# Panics
282    ///Panics if `vkGetPhysicalDeviceFeatures` was not loaded. This can happen if the required extension or Vulkan version is not enabled on the instance or device.
283    ///
284    ///# Usage Notes
285    ///
286    ///Returns the optional features supported by a physical device. Each
287    ///field is a boolean indicating whether the feature is available.
288    ///
289    ///Query this before device creation to check whether features your
290    ///application needs are supported. Then enable only the features you
291    ///actually use in `DeviceCreateInfo::enabled_features`.
292    ///
293    ///Commonly checked features:
294    ///
295    ///- `sampler_anisotropy`: anisotropic texture filtering.
296    ///- `fill_mode_non_solid`: wireframe rendering.
297    ///- `wide_lines`: line widths other than 1.0.
298    ///- `geometry_shader`, `tessellation_shader`: optional shader stages.
299    ///- `multi_draw_indirect`: indirect draw with count > 1.
300    ///- `pipeline_statistics_query`: pipeline statistics queries.
301    ///
302    ///Enabling a feature that is not supported causes device creation to
303    ///fail. Never blindly enable all features, only request what you need.
304    ///
305    ///For extended features (Vulkan 1.1+), use
306    ///`get_physical_device_features2` with chained feature structs.
307    pub unsafe fn get_physical_device_features(
308        &self,
309        physical_device: PhysicalDevice,
310    ) -> PhysicalDeviceFeatures {
311        let fp = self
312            .commands()
313            .get_physical_device_features
314            .expect("vkGetPhysicalDeviceFeatures not loaded");
315        let mut out = unsafe { core::mem::zeroed() };
316        unsafe { fp(physical_device, &mut out) };
317        out
318    }
319    ///Wraps [`vkGetPhysicalDeviceFormatProperties`](https://registry.khronos.org/vulkan/specs/latest/man/html/vkGetPhysicalDeviceFormatProperties.html).
320    /**
321    Provided by **VK_BASE_VERSION_1_0**.*/
322    ///
323    ///# Safety
324    ///- `physicalDevice` (self) must be valid and not destroyed.
325    ///
326    ///# Panics
327    ///Panics if `vkGetPhysicalDeviceFormatProperties` was not loaded. This can happen if the required extension or Vulkan version is not enabled on the instance or device.
328    ///
329    ///# Usage Notes
330    ///
331    ///Queries which operations a format supports on this device for
332    ///linear tiling, optimal tiling, and buffer usage.
333    ///
334    ///The returned `FormatProperties` contains three `FormatFeatureFlags`
335    ///fields:
336    ///
337    ///- **`linear_tiling_features`**: capabilities when the image uses
338    ///  `IMAGE_TILING_LINEAR`.
339    ///- **`optimal_tiling_features`**: capabilities when the image uses
340    ///  `IMAGE_TILING_OPTIMAL` (the common case).
341    ///- **`buffer_features`**: capabilities when used in a buffer view
342    ///  (e.g. uniform texel buffer, storage texel buffer).
343    ///
344    ///Check the relevant feature bits before creating an image or buffer
345    ///view with a particular format. For example, verify
346    ///`FORMAT_FEATURE_COLOR_ATTACHMENT` before using a format as a render
347    ///target, or `FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR` before
348    ///enabling linear filtering.
349    ///
350    ///For extended format properties (Vulkan 1.1+), use
351    ///`get_physical_device_format_properties2`.
352    pub unsafe fn get_physical_device_format_properties(
353        &self,
354        physical_device: PhysicalDevice,
355        format: Format,
356    ) -> FormatProperties {
357        let fp = self
358            .commands()
359            .get_physical_device_format_properties
360            .expect("vkGetPhysicalDeviceFormatProperties not loaded");
361        let mut out = unsafe { core::mem::zeroed() };
362        unsafe { fp(physical_device, format, &mut out) };
363        out
364    }
365    ///Wraps [`vkGetPhysicalDeviceImageFormatProperties`](https://registry.khronos.org/vulkan/specs/latest/man/html/vkGetPhysicalDeviceImageFormatProperties.html).
366    /**
367    Provided by **VK_BASE_VERSION_1_0**.*/
368    ///
369    ///# Errors
370    ///- `VK_ERROR_OUT_OF_HOST_MEMORY`
371    ///- `VK_ERROR_OUT_OF_DEVICE_MEMORY`
372    ///- `VK_ERROR_FORMAT_NOT_SUPPORTED`
373    ///- `VK_ERROR_UNKNOWN`
374    ///- `VK_ERROR_VALIDATION_FAILED`
375    ///
376    ///# Safety
377    ///- `physicalDevice` (self) must be valid and not destroyed.
378    ///
379    ///# Panics
380    ///Panics if `vkGetPhysicalDeviceImageFormatProperties` was not loaded. This can happen if the required extension or Vulkan version is not enabled on the instance or device.
381    ///
382    ///# Usage Notes
383    ///
384    ///Queries whether a specific combination of image format, type, tiling,
385    ///usage, and flags is supported on this device, and if so, what limits
386    ///apply.
387    ///
388    ///Use this to validate image creation parameters before calling
389    ///`create_image`. For example, check whether a format supports the
390    ///`COLOR_ATTACHMENT` usage with optimal tiling at your desired
391    ///resolution.
392    ///
393    ///The returned `ImageFormatProperties` includes:
394    ///
395    ///- **`max_extent`**: maximum dimensions for this combination.
396    ///- **`max_mip_levels`**: maximum mipmap levels.
397    ///- **`max_array_layers`**: maximum array layers.
398    ///- **`sample_counts`**: supported multisample counts.
399    ///- **`max_resource_size`**: maximum total bytes.
400    ///
401    ///Returns `VK_ERROR_FORMAT_NOT_SUPPORTED` if the combination is not
402    ///supported at all, this is not a fatal error, just a "no".
403    ///
404    ///For extended queries (Vulkan 1.1+), use
405    ///`get_physical_device_image_format_properties2` which supports
406    ///chaining external memory and YCBCR properties.
407    pub unsafe fn get_physical_device_image_format_properties(
408        &self,
409        physical_device: PhysicalDevice,
410        format: Format,
411        r#type: ImageType,
412        tiling: ImageTiling,
413        usage: ImageUsageFlags,
414        flags: ImageCreateFlags,
415    ) -> VkResult<ImageFormatProperties> {
416        let fp = self
417            .commands()
418            .get_physical_device_image_format_properties
419            .expect("vkGetPhysicalDeviceImageFormatProperties not loaded");
420        let mut out = unsafe { core::mem::zeroed() };
421        check(unsafe {
422            fp(
423                physical_device,
424                format,
425                r#type,
426                tiling,
427                usage,
428                flags,
429                &mut out,
430            )
431        })?;
432        Ok(out)
433    }
434    ///Wraps [`vkEnumerateDeviceLayerProperties`](https://registry.khronos.org/vulkan/specs/latest/man/html/vkEnumerateDeviceLayerProperties.html).
435    /**
436    Provided by **VK_BASE_VERSION_1_0**.*/
437    ///
438    ///# Errors
439    ///- `VK_ERROR_OUT_OF_HOST_MEMORY`
440    ///- `VK_ERROR_OUT_OF_DEVICE_MEMORY`
441    ///- `VK_ERROR_UNKNOWN`
442    ///- `VK_ERROR_VALIDATION_FAILED`
443    ///
444    ///# Safety
445    ///- `physicalDevice` (self) must be valid and not destroyed.
446    ///
447    ///# Panics
448    ///Panics if `vkEnumerateDeviceLayerProperties` was not loaded. This can happen if the required extension or Vulkan version is not enabled on the instance or device.
449    ///
450    ///# Usage Notes
451    ///
452    ///Enumerates the available device-level validation layers. In modern
453    ///Vulkan (1.0.13+), device layers are deprecated in favour of
454    ///instance layers, this function exists for backwards compatibility
455    ///and typically returns the same list as instance layer enumeration.
456    ///
457    ///Most applications do not need to call this. Enable validation layers
458    ///at instance creation via `InstanceCreateInfo::enabled_layer_names`
459    ///instead.
460    pub unsafe fn enumerate_device_layer_properties(
461        &self,
462        physical_device: PhysicalDevice,
463    ) -> VkResult<Vec<LayerProperties>> {
464        let fp = self
465            .commands()
466            .enumerate_device_layer_properties
467            .expect("vkEnumerateDeviceLayerProperties not loaded");
468        enumerate_two_call(|count, data| unsafe { fp(physical_device, count, data) })
469    }
470    ///Wraps [`vkEnumerateDeviceExtensionProperties`](https://registry.khronos.org/vulkan/specs/latest/man/html/vkEnumerateDeviceExtensionProperties.html).
471    /**
472    Provided by **VK_BASE_VERSION_1_0**.*/
473    ///
474    ///# Errors
475    ///- `VK_ERROR_OUT_OF_HOST_MEMORY`
476    ///- `VK_ERROR_OUT_OF_DEVICE_MEMORY`
477    ///- `VK_ERROR_LAYER_NOT_PRESENT`
478    ///- `VK_ERROR_UNKNOWN`
479    ///- `VK_ERROR_VALIDATION_FAILED`
480    ///
481    ///# Safety
482    ///- `physicalDevice` (self) must be valid and not destroyed.
483    ///
484    ///# Panics
485    ///Panics if `vkEnumerateDeviceExtensionProperties` was not loaded. This can happen if the required extension or Vulkan version is not enabled on the instance or device.
486    ///
487    ///# Usage Notes
488    ///
489    ///Returns the list of extensions supported by a physical device. Call
490    ///this to verify that required extensions are available before
491    ///requesting them in `DeviceCreateInfo::enabled_extension_names`.
492    ///
493    ///Common extensions to check for:
494    ///
495    ///- `VK_KHR_swapchain`: presentation to a surface (required for
496    ///  rendering to a window).
497    ///- `VK_KHR_dynamic_rendering`: render pass-less rendering (core in
498    ///  1.3).
499    ///- `VK_KHR_ray_tracing_pipeline`: hardware ray tracing.
500    ///- `VK_EXT_descriptor_indexing`: bindless descriptors (core in 1.2).
501    ///
502    ///Pass `None` for `layer_name` to enumerate extensions provided by the
503    ///driver itself. Passing a layer name enumerates extensions provided by
504    ///that specific layer (rarely needed).
505    ///
506    ///Requesting an unsupported extension at device creation causes
507    ///`VK_ERROR_EXTENSION_NOT_PRESENT`.
508    pub unsafe fn enumerate_device_extension_properties(
509        &self,
510        physical_device: PhysicalDevice,
511        p_layer_name: Option<&core::ffi::CStr>,
512    ) -> VkResult<Vec<ExtensionProperties>> {
513        let fp = self
514            .commands()
515            .enumerate_device_extension_properties
516            .expect("vkEnumerateDeviceExtensionProperties not loaded");
517        let p_layer_name_ptr = p_layer_name.map_or(core::ptr::null(), core::ffi::CStr::as_ptr);
518        enumerate_two_call(|count, data| unsafe {
519            fp(physical_device, p_layer_name_ptr, count, data)
520        })
521    }
522    ///Wraps [`vkGetPhysicalDeviceSparseImageFormatProperties`](https://registry.khronos.org/vulkan/specs/latest/man/html/vkGetPhysicalDeviceSparseImageFormatProperties.html).
523    /**
524    Provided by **VK_BASE_VERSION_1_0**.*/
525    ///
526    ///# Safety
527    ///- `physicalDevice` (self) must be valid and not destroyed.
528    ///
529    ///# Panics
530    ///Panics if `vkGetPhysicalDeviceSparseImageFormatProperties` was not loaded. This can happen if the required extension or Vulkan version is not enabled on the instance or device.
531    ///
532    ///# Usage Notes
533    ///
534    ///Queries the sparse image format properties for a specific format,
535    ///image type, sample count, usage, and tiling combination. Returns
536    ///information about the sparse texel block dimensions and flags.
537    ///
538    ///Only relevant if you intend to use sparse images
539    ///(`IMAGE_CREATE_SPARSE_*`). For non-sparse images, this is not
540    ///needed.
541    ///
542    ///If the combination does not support sparse residency, an empty list
543    ///is returned. Check `physical_device_features.sparse_residency_*`
544    ///features before attempting sparse image creation.
545    ///
546    ///For extended queries (Vulkan 1.1+), use
547    ///`get_physical_device_sparse_image_format_properties2`.
548    pub unsafe fn get_physical_device_sparse_image_format_properties(
549        &self,
550        physical_device: PhysicalDevice,
551        format: Format,
552        r#type: ImageType,
553        samples: SampleCountFlagBits,
554        usage: ImageUsageFlags,
555        tiling: ImageTiling,
556    ) -> Vec<SparseImageFormatProperties> {
557        let fp = self
558            .commands()
559            .get_physical_device_sparse_image_format_properties
560            .expect("vkGetPhysicalDeviceSparseImageFormatProperties not loaded");
561        fill_two_call(|count, data| unsafe {
562            fp(
563                physical_device,
564                format,
565                r#type,
566                samples,
567                usage,
568                tiling,
569                count,
570                data,
571            )
572        })
573    }
574    ///Wraps [`vkCreateSurfaceOHOS`](https://registry.khronos.org/vulkan/specs/latest/man/html/vkCreateSurfaceOHOS.html).
575    /**
576    Provided by **VK_OHOS_surface**.*/
577    ///
578    ///# Errors
579    ///- `VK_ERROR_OUT_OF_HOST_MEMORY`
580    ///- `VK_ERROR_SURFACE_LOST_KHR`
581    ///- `VK_ERROR_UNKNOWN`
582    ///- `VK_ERROR_VALIDATION_FAILED`
583    ///
584    ///# Safety
585    ///- `instance` (self) must be valid and not destroyed.
586    ///
587    ///# Panics
588    ///Panics if `vkCreateSurfaceOHOS` was not loaded. This can happen if the required extension or Vulkan version is not enabled on the instance or device.
589    ///
590    ///# Usage Notes
591    ///
592    ///Creates a Vulkan surface for an OpenHarmony OS native window.
593    ///OHOS only. The create info references the `OHNativeWindow`
594    ///handle.
595    ///
596    ///Requires `VK_OHOS_surface`.
597    pub unsafe fn create_surface_ohos(
598        &self,
599        p_create_info: &SurfaceCreateInfoOHOS,
600        allocator: Option<&AllocationCallbacks>,
601    ) -> VkResult<SurfaceKHR> {
602        let fp = self
603            .commands()
604            .create_surface_ohos
605            .expect("vkCreateSurfaceOHOS not loaded");
606        let alloc_ptr = allocator.map_or(core::ptr::null(), core::ptr::from_ref);
607        let mut out = unsafe { core::mem::zeroed() };
608        check(unsafe { fp(self.handle(), p_create_info, alloc_ptr, &mut out) })?;
609        Ok(out)
610    }
611    ///Wraps [`vkGetPhysicalDeviceDisplayPropertiesKHR`](https://registry.khronos.org/vulkan/specs/latest/man/html/vkGetPhysicalDeviceDisplayPropertiesKHR.html).
612    /**
613    Provided by **VK_KHR_display**.*/
614    ///
615    ///# Errors
616    ///- `VK_ERROR_OUT_OF_HOST_MEMORY`
617    ///- `VK_ERROR_OUT_OF_DEVICE_MEMORY`
618    ///- `VK_ERROR_UNKNOWN`
619    ///- `VK_ERROR_VALIDATION_FAILED`
620    ///
621    ///# Safety
622    ///- `physicalDevice` (self) must be valid and not destroyed.
623    ///
624    ///# Panics
625    ///Panics if `vkGetPhysicalDeviceDisplayPropertiesKHR` was not loaded. This can happen if the required extension or Vulkan version is not enabled on the instance or device.
626    ///
627    ///# Usage Notes
628    ///
629    ///Enumerates displays attached to a physical device. Each returned
630    ///`DisplayPropertiesKHR` contains the display handle, name,
631    ///physical dimensions, resolution, supported transforms, and
632    ///whether the display supports per-plane reordering.
633    ///
634    ///This is the entry point for the `VK_KHR_display` extension,
635    ///which provides direct display output without a window system
636    ///(useful for embedded, VR, kiosk, and fullscreen applications).
637    ///
638    ///After enumerating displays, query their modes with
639    ///`get_display_mode_properties_khr` and planes with
640    ///`get_physical_device_display_plane_properties_khr`.
641    ///
642    ///Prefer `get_physical_device_display_properties2_khr` when
643    ///`VK_KHR_get_display_properties2` is available, it supports
644    ///extensible output via `pNext`.
645    pub unsafe fn get_physical_device_display_properties_khr(
646        &self,
647        physical_device: PhysicalDevice,
648    ) -> VkResult<Vec<DisplayPropertiesKHR>> {
649        let fp = self
650            .commands()
651            .get_physical_device_display_properties_khr
652            .expect("vkGetPhysicalDeviceDisplayPropertiesKHR not loaded");
653        enumerate_two_call(|count, data| unsafe { fp(physical_device, count, data) })
654    }
655    ///Wraps [`vkGetPhysicalDeviceDisplayPlanePropertiesKHR`](https://registry.khronos.org/vulkan/specs/latest/man/html/vkGetPhysicalDeviceDisplayPlanePropertiesKHR.html).
656    /**
657    Provided by **VK_KHR_display**.*/
658    ///
659    ///# Errors
660    ///- `VK_ERROR_OUT_OF_HOST_MEMORY`
661    ///- `VK_ERROR_OUT_OF_DEVICE_MEMORY`
662    ///- `VK_ERROR_UNKNOWN`
663    ///- `VK_ERROR_VALIDATION_FAILED`
664    ///
665    ///# Safety
666    ///- `physicalDevice` (self) must be valid and not destroyed.
667    ///
668    ///# Panics
669    ///Panics if `vkGetPhysicalDeviceDisplayPlanePropertiesKHR` was not loaded. This can happen if the required extension or Vulkan version is not enabled on the instance or device.
670    ///
671    ///# Usage Notes
672    ///
673    ///Enumerates display planes supported by a physical device. Each
674    ///plane is a compositing layer that can show a portion of a display
675    ///surface, multiple planes allow hardware overlay composition.
676    ///
677    ///Each returned `DisplayPlanePropertiesKHR` contains the display
678    ///currently connected to the plane and its current stack index.
679    ///
680    ///Use the plane index with `get_display_plane_supported_displays_khr`
681    ///to find which displays a given plane can target, and with
682    ///`get_display_plane_capabilities_khr` to query positioning and
683    ///scaling limits.
684    pub unsafe fn get_physical_device_display_plane_properties_khr(
685        &self,
686        physical_device: PhysicalDevice,
687    ) -> VkResult<Vec<DisplayPlanePropertiesKHR>> {
688        let fp = self
689            .commands()
690            .get_physical_device_display_plane_properties_khr
691            .expect("vkGetPhysicalDeviceDisplayPlanePropertiesKHR not loaded");
692        enumerate_two_call(|count, data| unsafe { fp(physical_device, count, data) })
693    }
694    ///Wraps [`vkGetDisplayPlaneSupportedDisplaysKHR`](https://registry.khronos.org/vulkan/specs/latest/man/html/vkGetDisplayPlaneSupportedDisplaysKHR.html).
695    /**
696    Provided by **VK_KHR_display**.*/
697    ///
698    ///# Errors
699    ///- `VK_ERROR_OUT_OF_HOST_MEMORY`
700    ///- `VK_ERROR_OUT_OF_DEVICE_MEMORY`
701    ///- `VK_ERROR_UNKNOWN`
702    ///- `VK_ERROR_VALIDATION_FAILED`
703    ///
704    ///# Safety
705    ///- `physicalDevice` (self) must be valid and not destroyed.
706    ///
707    ///# Panics
708    ///Panics if `vkGetDisplayPlaneSupportedDisplaysKHR` was not loaded. This can happen if the required extension or Vulkan version is not enabled on the instance or device.
709    ///
710    ///# Usage Notes
711    ///
712    ///Returns the list of displays that a given display plane can be
713    ///used with. Not all planes can target all displays, this query
714    ///lets you find valid plane-display pairings.
715    ///
716    ///`plane_index` is an index into the array returned by
717    ///`get_physical_device_display_plane_properties_khr`.
718    ///
719    ///After finding a compatible display, query its modes with
720    ///`get_display_mode_properties_khr` and configure the plane via
721    ///`DisplaySurfaceCreateInfoKHR`.
722    pub unsafe fn get_display_plane_supported_displays_khr(
723        &self,
724        physical_device: PhysicalDevice,
725        plane_index: u32,
726    ) -> VkResult<Vec<DisplayKHR>> {
727        let fp = self
728            .commands()
729            .get_display_plane_supported_displays_khr
730            .expect("vkGetDisplayPlaneSupportedDisplaysKHR not loaded");
731        enumerate_two_call(|count, data| unsafe { fp(physical_device, plane_index, count, data) })
732    }
733    ///Wraps [`vkGetDisplayModePropertiesKHR`](https://registry.khronos.org/vulkan/specs/latest/man/html/vkGetDisplayModePropertiesKHR.html).
734    /**
735    Provided by **VK_KHR_display**.*/
736    ///
737    ///# Errors
738    ///- `VK_ERROR_OUT_OF_HOST_MEMORY`
739    ///- `VK_ERROR_OUT_OF_DEVICE_MEMORY`
740    ///- `VK_ERROR_UNKNOWN`
741    ///- `VK_ERROR_VALIDATION_FAILED`
742    ///
743    ///# Safety
744    ///- `physicalDevice` (self) must be valid and not destroyed.
745    ///
746    ///# Panics
747    ///Panics if `vkGetDisplayModePropertiesKHR` was not loaded. This can happen if the required extension or Vulkan version is not enabled on the instance or device.
748    ///
749    ///# Usage Notes
750    ///
751    ///Enumerates the display modes supported by a display. Each
752    ///`DisplayModePropertiesKHR` contains a mode handle and its
753    ///parameters (visible region resolution and refresh rate).
754    ///
755    ///Use these to select an appropriate mode for
756    ///`DisplaySurfaceCreateInfoKHR`, or create a custom mode with
757    ///`create_display_mode_khr` if the desired parameters are not
758    ///listed.
759    ///
760    ///Prefer `get_display_mode_properties2_khr` when
761    ///`VK_KHR_get_display_properties2` is available.
762    pub unsafe fn get_display_mode_properties_khr(
763        &self,
764        physical_device: PhysicalDevice,
765        display: DisplayKHR,
766    ) -> VkResult<Vec<DisplayModePropertiesKHR>> {
767        let fp = self
768            .commands()
769            .get_display_mode_properties_khr
770            .expect("vkGetDisplayModePropertiesKHR not loaded");
771        enumerate_two_call(|count, data| unsafe { fp(physical_device, display, count, data) })
772    }
773    ///Wraps [`vkCreateDisplayModeKHR`](https://registry.khronos.org/vulkan/specs/latest/man/html/vkCreateDisplayModeKHR.html).
774    /**
775    Provided by **VK_KHR_display**.*/
776    ///
777    ///# Errors
778    ///- `VK_ERROR_OUT_OF_HOST_MEMORY`
779    ///- `VK_ERROR_OUT_OF_DEVICE_MEMORY`
780    ///- `VK_ERROR_INITIALIZATION_FAILED`
781    ///- `VK_ERROR_UNKNOWN`
782    ///- `VK_ERROR_VALIDATION_FAILED`
783    ///
784    ///# Safety
785    ///- `physicalDevice` (self) must be valid and not destroyed.
786    ///- `display` must be externally synchronized.
787    ///
788    ///# Panics
789    ///Panics if `vkCreateDisplayModeKHR` was not loaded. This can happen if the required extension or Vulkan version is not enabled on the instance or device.
790    ///
791    ///# Usage Notes
792    ///
793    ///Creates a custom display mode with a specific resolution and
794    ///refresh rate. Use this when the built-in modes from
795    ///`get_display_mode_properties_khr` don't match your requirements.
796    ///
797    ///The `DisplayModeCreateInfoKHR` specifies the visible region
798    ///(width/height in pixels) and refresh rate (in millihertz, e.g.,
799    ///60000 for 60 Hz).
800    ///
801    ///Not all parameter combinations are valid, the driver may reject
802    ///modes it cannot support. If creation fails, fall back to a
803    ///built-in mode.
804    pub unsafe fn create_display_mode_khr(
805        &self,
806        physical_device: PhysicalDevice,
807        display: DisplayKHR,
808        p_create_info: &DisplayModeCreateInfoKHR,
809        allocator: Option<&AllocationCallbacks>,
810    ) -> VkResult<DisplayModeKHR> {
811        let fp = self
812            .commands()
813            .create_display_mode_khr
814            .expect("vkCreateDisplayModeKHR not loaded");
815        let alloc_ptr = allocator.map_or(core::ptr::null(), core::ptr::from_ref);
816        let mut out = unsafe { core::mem::zeroed() };
817        check(unsafe { fp(physical_device, display, p_create_info, alloc_ptr, &mut out) })?;
818        Ok(out)
819    }
820    ///Wraps [`vkGetDisplayPlaneCapabilitiesKHR`](https://registry.khronos.org/vulkan/specs/latest/man/html/vkGetDisplayPlaneCapabilitiesKHR.html).
821    /**
822    Provided by **VK_KHR_display**.*/
823    ///
824    ///# Errors
825    ///- `VK_ERROR_OUT_OF_HOST_MEMORY`
826    ///- `VK_ERROR_OUT_OF_DEVICE_MEMORY`
827    ///- `VK_ERROR_UNKNOWN`
828    ///- `VK_ERROR_VALIDATION_FAILED`
829    ///
830    ///# Safety
831    ///- `physicalDevice` (self) must be valid and not destroyed.
832    ///- `mode` must be externally synchronized.
833    ///
834    ///# Panics
835    ///Panics if `vkGetDisplayPlaneCapabilitiesKHR` was not loaded. This can happen if the required extension or Vulkan version is not enabled on the instance or device.
836    ///
837    ///# Usage Notes
838    ///
839    ///Queries the capabilities of a display plane when used with a
840    ///specific display mode. The returned `DisplayPlaneCapabilitiesKHR`
841    ///describes:
842    ///
843    ///- Supported alpha modes (opaque, global, per-pixel).
844    ///- Min/max source and destination extents, the range of scaling
845    ///  the plane supports.
846    ///- Min/max source and destination positions, how the plane
847    ///  image can be positioned.
848    ///
849    ///Use these limits to configure `DisplaySurfaceCreateInfoKHR`
850    ///correctly. Exceeding the reported limits results in validation
851    ///errors.
852    pub unsafe fn get_display_plane_capabilities_khr(
853        &self,
854        physical_device: PhysicalDevice,
855        mode: DisplayModeKHR,
856        plane_index: u32,
857    ) -> VkResult<DisplayPlaneCapabilitiesKHR> {
858        let fp = self
859            .commands()
860            .get_display_plane_capabilities_khr
861            .expect("vkGetDisplayPlaneCapabilitiesKHR not loaded");
862        let mut out = unsafe { core::mem::zeroed() };
863        check(unsafe { fp(physical_device, mode, plane_index, &mut out) })?;
864        Ok(out)
865    }
866    ///Wraps [`vkCreateDisplayPlaneSurfaceKHR`](https://registry.khronos.org/vulkan/specs/latest/man/html/vkCreateDisplayPlaneSurfaceKHR.html).
867    /**
868    Provided by **VK_KHR_display**.*/
869    ///
870    ///# Errors
871    ///- `VK_ERROR_OUT_OF_HOST_MEMORY`
872    ///- `VK_ERROR_OUT_OF_DEVICE_MEMORY`
873    ///- `VK_ERROR_UNKNOWN`
874    ///- `VK_ERROR_VALIDATION_FAILED`
875    ///
876    ///# Safety
877    ///- `instance` (self) must be valid and not destroyed.
878    ///
879    ///# Panics
880    ///Panics if `vkCreateDisplayPlaneSurfaceKHR` was not loaded. This can happen if the required extension or Vulkan version is not enabled on the instance or device.
881    ///
882    ///# Usage Notes
883    ///
884    ///Creates a `SurfaceKHR` for direct display output, bypassing the
885    ///window system. The surface is presented directly on a display
886    ///plane.
887    ///
888    ///Configure via `DisplaySurfaceCreateInfoKHR`:
889    ///
890    ///- `display_mode`: a mode from `get_display_mode_properties_khr`
891    ///  or `create_display_mode_khr`.
892    ///- `plane_index`: which display plane to use.
893    ///- `plane_stack_index`: z-ordering among planes.
894    ///- `transform`: rotation/mirroring.
895    ///- `alpha_mode`: how alpha is handled (opaque, global, per-pixel).
896    ///- `image_extent`: the surface resolution.
897    ///
898    ///After creation, use the surface with `create_swapchain_khr` like
899    ///any other surface. Destroy with `destroy_surface_khr`.
900    pub unsafe fn create_display_plane_surface_khr(
901        &self,
902        p_create_info: &DisplaySurfaceCreateInfoKHR,
903        allocator: Option<&AllocationCallbacks>,
904    ) -> VkResult<SurfaceKHR> {
905        let fp = self
906            .commands()
907            .create_display_plane_surface_khr
908            .expect("vkCreateDisplayPlaneSurfaceKHR not loaded");
909        let alloc_ptr = allocator.map_or(core::ptr::null(), core::ptr::from_ref);
910        let mut out = unsafe { core::mem::zeroed() };
911        check(unsafe { fp(self.handle(), p_create_info, alloc_ptr, &mut out) })?;
912        Ok(out)
913    }
914    ///Wraps [`vkGetPhysicalDeviceSurfaceSupportKHR`](https://registry.khronos.org/vulkan/specs/latest/man/html/vkGetPhysicalDeviceSurfaceSupportKHR.html).
915    /**
916    Provided by **VK_KHR_surface**.*/
917    ///
918    ///# Errors
919    ///- `VK_ERROR_OUT_OF_HOST_MEMORY`
920    ///- `VK_ERROR_OUT_OF_DEVICE_MEMORY`
921    ///- `VK_ERROR_SURFACE_LOST_KHR`
922    ///- `VK_ERROR_UNKNOWN`
923    ///- `VK_ERROR_VALIDATION_FAILED`
924    ///
925    ///# Safety
926    ///- `physicalDevice` (self) must be valid and not destroyed.
927    ///
928    ///# Panics
929    ///Panics if `vkGetPhysicalDeviceSurfaceSupportKHR` was not loaded. This can happen if the required extension or Vulkan version is not enabled on the instance or device.
930    ///
931    ///# Usage Notes
932    ///
933    ///Checks whether a queue family on a physical device supports
934    ///presentation to a surface. Not all queue families can present,
935    ///a graphics queue that supports rendering may not support
936    ///presentation on all platforms.
937    ///
938    ///Call this for each queue family when selecting your present queue.
939    ///Often the graphics queue family also supports presentation, but
940    ///this is not guaranteed.
941    ///
942    ///Returns `VK_TRUE` if the queue family can present to the surface.
943    pub unsafe fn get_physical_device_surface_support_khr(
944        &self,
945        physical_device: PhysicalDevice,
946        queue_family_index: u32,
947        surface: SurfaceKHR,
948    ) -> VkResult<bool> {
949        let fp = self
950            .commands()
951            .get_physical_device_surface_support_khr
952            .expect("vkGetPhysicalDeviceSurfaceSupportKHR not loaded");
953        let mut out = unsafe { core::mem::zeroed() };
954        check(unsafe { fp(physical_device, queue_family_index, surface, &mut out) })?;
955        Ok(out != 0)
956    }
957    ///Wraps [`vkGetPhysicalDeviceSurfaceCapabilitiesKHR`](https://registry.khronos.org/vulkan/specs/latest/man/html/vkGetPhysicalDeviceSurfaceCapabilitiesKHR.html).
958    /**
959    Provided by **VK_KHR_surface**.*/
960    ///
961    ///# Errors
962    ///- `VK_ERROR_OUT_OF_HOST_MEMORY`
963    ///- `VK_ERROR_OUT_OF_DEVICE_MEMORY`
964    ///- `VK_ERROR_SURFACE_LOST_KHR`
965    ///- `VK_ERROR_UNKNOWN`
966    ///- `VK_ERROR_VALIDATION_FAILED`
967    ///
968    ///# Safety
969    ///- `physicalDevice` (self) must be valid and not destroyed.
970    ///
971    ///# Panics
972    ///Panics if `vkGetPhysicalDeviceSurfaceCapabilitiesKHR` was not loaded. This can happen if the required extension or Vulkan version is not enabled on the instance or device.
973    ///
974    ///# Usage Notes
975    ///
976    ///Queries the surface capabilities for a physical device: supported
977    ///image count range, current extent, supported transforms, composite
978    ///alpha modes, and supported image usage flags.
979    ///
980    ///**Key fields**:
981    ///
982    ///- **`current_extent`**: the current surface size. If `0xFFFFFFFF`,
983    ///  the surface size is determined by the swapchain extent.
984    ///- **`min/max_image_count`**: the supported range for swapchain
985    ///  image count.
986    ///- **`current_transform`**: pass this as `pre_transform` in
987    ///  swapchain creation to avoid extra composition overhead.
988    ///- **`supported_usage_flags`**: which image usage bits the swapchain
989    ///  images support (always includes `COLOR_ATTACHMENT`).
990    ///
991    ///Call this before creating a swapchain and again before recreating
992    ///after a resize, the capabilities may have changed.
993    pub unsafe fn get_physical_device_surface_capabilities_khr(
994        &self,
995        physical_device: PhysicalDevice,
996        surface: SurfaceKHR,
997    ) -> VkResult<SurfaceCapabilitiesKHR> {
998        let fp = self
999            .commands()
1000            .get_physical_device_surface_capabilities_khr
1001            .expect("vkGetPhysicalDeviceSurfaceCapabilitiesKHR not loaded");
1002        let mut out = unsafe { core::mem::zeroed() };
1003        check(unsafe { fp(physical_device, surface, &mut out) })?;
1004        Ok(out)
1005    }
1006    ///Wraps [`vkGetPhysicalDeviceSurfaceFormatsKHR`](https://registry.khronos.org/vulkan/specs/latest/man/html/vkGetPhysicalDeviceSurfaceFormatsKHR.html).
1007    /**
1008    Provided by **VK_KHR_surface**.*/
1009    ///
1010    ///# Errors
1011    ///- `VK_ERROR_OUT_OF_HOST_MEMORY`
1012    ///- `VK_ERROR_OUT_OF_DEVICE_MEMORY`
1013    ///- `VK_ERROR_SURFACE_LOST_KHR`
1014    ///- `VK_ERROR_UNKNOWN`
1015    ///- `VK_ERROR_VALIDATION_FAILED`
1016    ///
1017    ///# Safety
1018    ///- `physicalDevice` (self) must be valid and not destroyed.
1019    ///
1020    ///# Panics
1021    ///Panics if `vkGetPhysicalDeviceSurfaceFormatsKHR` was not loaded. This can happen if the required extension or Vulkan version is not enabled on the instance or device.
1022    ///
1023    ///# Usage Notes
1024    ///
1025    ///Returns the list of supported format + colour space pairs for a
1026    ///surface. Pick one of these pairs for swapchain creation.
1027    ///
1028    ///The most portable choice is `FORMAT_B8G8R8A8_SRGB` +
1029    ///`COLOR_SPACE_SRGB_NONLINEAR`. If your preferred format is not
1030    ///listed, fall back to the first available pair.
1031    ///
1032    ///If the list contains a single entry with `FORMAT_UNDEFINED`, the
1033    ///surface has no preferred format and any format is acceptable.
1034    ///
1035    ///For HDR output, look for `COLOR_SPACE_HDR10_ST2084_EXT` or similar
1036    ///extended colour spaces.
1037    pub unsafe fn get_physical_device_surface_formats_khr(
1038        &self,
1039        physical_device: PhysicalDevice,
1040        surface: SurfaceKHR,
1041    ) -> VkResult<Vec<SurfaceFormatKHR>> {
1042        let fp = self
1043            .commands()
1044            .get_physical_device_surface_formats_khr
1045            .expect("vkGetPhysicalDeviceSurfaceFormatsKHR not loaded");
1046        enumerate_two_call(|count, data| unsafe { fp(physical_device, surface, count, data) })
1047    }
1048    ///Wraps [`vkGetPhysicalDeviceSurfacePresentModesKHR`](https://registry.khronos.org/vulkan/specs/latest/man/html/vkGetPhysicalDeviceSurfacePresentModesKHR.html).
1049    /**
1050    Provided by **VK_KHR_surface**.*/
1051    ///
1052    ///# Errors
1053    ///- `VK_ERROR_OUT_OF_HOST_MEMORY`
1054    ///- `VK_ERROR_OUT_OF_DEVICE_MEMORY`
1055    ///- `VK_ERROR_SURFACE_LOST_KHR`
1056    ///- `VK_ERROR_UNKNOWN`
1057    ///- `VK_ERROR_VALIDATION_FAILED`
1058    ///
1059    ///# Safety
1060    ///- `physicalDevice` (self) must be valid and not destroyed.
1061    ///
1062    ///# Panics
1063    ///Panics if `vkGetPhysicalDeviceSurfacePresentModesKHR` was not loaded. This can happen if the required extension or Vulkan version is not enabled on the instance or device.
1064    ///
1065    ///# Usage Notes
1066    ///
1067    ///Returns the list of supported present modes for a surface.
1068    ///
1069    ///**Present modes**:
1070    ///
1071    ///- `FIFO`: vsync. Guaranteed to be supported on all implementations.
1072    ///  Frames are queued and presented at the display refresh rate.
1073    ///- `FIFO_RELAXED`: vsync with late frame allowance. If a frame
1074    ///  arrives late, it is presented immediately (may cause tearing).
1075    ///- `MAILBOX`: triple buffering. The driver keeps only the latest
1076    ///  frame in the queue, lower latency than FIFO with no tearing.
1077    ///- `IMMEDIATE`: no vsync. Frames are presented as soon as possible.
1078    ///  Lowest latency but may cause visible tearing.
1079    ///
1080    ///Common strategy: prefer `MAILBOX` for low-latency rendering, fall
1081    ///back to `FIFO` if unavailable.
1082    pub unsafe fn get_physical_device_surface_present_modes_khr(
1083        &self,
1084        physical_device: PhysicalDevice,
1085        surface: SurfaceKHR,
1086    ) -> VkResult<Vec<PresentModeKHR>> {
1087        let fp = self
1088            .commands()
1089            .get_physical_device_surface_present_modes_khr
1090            .expect("vkGetPhysicalDeviceSurfacePresentModesKHR not loaded");
1091        enumerate_two_call(|count, data| unsafe { fp(physical_device, surface, count, data) })
1092    }
1093    ///Wraps [`vkCreateViSurfaceNN`](https://registry.khronos.org/vulkan/specs/latest/man/html/vkCreateViSurfaceNN.html).
1094    /**
1095    Provided by **VK_NN_vi_surface**.*/
1096    ///
1097    ///# Errors
1098    ///- `VK_ERROR_OUT_OF_HOST_MEMORY`
1099    ///- `VK_ERROR_OUT_OF_DEVICE_MEMORY`
1100    ///- `VK_ERROR_NATIVE_WINDOW_IN_USE_KHR`
1101    ///- `VK_ERROR_UNKNOWN`
1102    ///- `VK_ERROR_VALIDATION_FAILED`
1103    ///
1104    ///# Safety
1105    ///- `instance` (self) must be valid and not destroyed.
1106    ///
1107    ///# Panics
1108    ///Panics if `vkCreateViSurfaceNN` was not loaded. This can happen if the required extension or Vulkan version is not enabled on the instance or device.
1109    ///
1110    ///# Usage Notes
1111    ///
1112    ///Creates a Vulkan surface for a Nintendo Vi layer. Nintendo
1113    ///Switch only.
1114    ///
1115    ///Requires `VK_NN_vi_surface`.
1116    pub unsafe fn create_vi_surface_nn(
1117        &self,
1118        p_create_info: &ViSurfaceCreateInfoNN,
1119        allocator: Option<&AllocationCallbacks>,
1120    ) -> VkResult<SurfaceKHR> {
1121        let fp = self
1122            .commands()
1123            .create_vi_surface_nn
1124            .expect("vkCreateViSurfaceNN not loaded");
1125        let alloc_ptr = allocator.map_or(core::ptr::null(), core::ptr::from_ref);
1126        let mut out = unsafe { core::mem::zeroed() };
1127        check(unsafe { fp(self.handle(), p_create_info, alloc_ptr, &mut out) })?;
1128        Ok(out)
1129    }
1130    ///Wraps [`vkGetPhysicalDeviceWaylandPresentationSupportKHR`](https://registry.khronos.org/vulkan/specs/latest/man/html/vkGetPhysicalDeviceWaylandPresentationSupportKHR.html).
1131    /**
1132    Provided by **VK_KHR_wayland_surface**.*/
1133    ///
1134    ///# Safety
1135    ///- `physicalDevice` (self) must be valid and not destroyed.
1136    ///
1137    ///# Panics
1138    ///Panics if `vkGetPhysicalDeviceWaylandPresentationSupportKHR` was not loaded. This can happen if the required extension or Vulkan version is not enabled on the instance or device.
1139    ///
1140    ///# Usage Notes
1141    ///
1142    ///Queries whether a queue family supports presentation to a
1143    ///Wayland compositor. Linux/Wayland only. Check this before
1144    ///creating a swapchain to ensure the queue can present.
1145    ///
1146    ///Requires `VK_KHR_wayland_surface`.
1147    pub unsafe fn get_physical_device_wayland_presentation_support_khr(
1148        &self,
1149        physical_device: PhysicalDevice,
1150        queue_family_index: u32,
1151    ) -> core::ffi::c_void {
1152        let fp = self
1153            .commands()
1154            .get_physical_device_wayland_presentation_support_khr
1155            .expect("vkGetPhysicalDeviceWaylandPresentationSupportKHR not loaded");
1156        let mut out = unsafe { core::mem::zeroed() };
1157        unsafe { fp(physical_device, queue_family_index, &mut out) };
1158        out
1159    }
1160    ///Wraps [`vkCreateUbmSurfaceSEC`](https://registry.khronos.org/vulkan/specs/latest/man/html/vkCreateUbmSurfaceSEC.html).
1161    /**
1162    Provided by **VK_SEC_ubm_surface**.*/
1163    ///
1164    ///# Errors
1165    ///- `VK_ERROR_OUT_OF_HOST_MEMORY`
1166    ///- `VK_ERROR_OUT_OF_DEVICE_MEMORY`
1167    ///- `VK_ERROR_UNKNOWN`
1168    ///- `VK_ERROR_VALIDATION_FAILED`
1169    ///
1170    ///# Safety
1171    ///- `instance` (self) must be valid and not destroyed.
1172    ///
1173    ///# Panics
1174    ///Panics if `vkCreateUbmSurfaceSEC` was not loaded. This can happen if the required extension or Vulkan version is not enabled on the instance or device.
1175    ///
1176    ///# Usage Notes
1177    ///
1178    ///Creates a Vulkan surface for a Samsung UBM (Unified Buffer
1179    ///Manager) window. Samsung platform only.
1180    ///
1181    ///Requires `VK_SEC_ubm_surface`.
1182    pub unsafe fn create_ubm_surface_sec(
1183        &self,
1184        p_create_info: &UbmSurfaceCreateInfoSEC,
1185        allocator: Option<&AllocationCallbacks>,
1186    ) -> VkResult<SurfaceKHR> {
1187        let fp = self
1188            .commands()
1189            .create_ubm_surface_sec
1190            .expect("vkCreateUbmSurfaceSEC not loaded");
1191        let alloc_ptr = allocator.map_or(core::ptr::null(), core::ptr::from_ref);
1192        let mut out = unsafe { core::mem::zeroed() };
1193        check(unsafe { fp(self.handle(), p_create_info, alloc_ptr, &mut out) })?;
1194        Ok(out)
1195    }
1196    ///Wraps [`vkGetPhysicalDeviceUbmPresentationSupportSEC`](https://registry.khronos.org/vulkan/specs/latest/man/html/vkGetPhysicalDeviceUbmPresentationSupportSEC.html).
1197    /**
1198    Provided by **VK_SEC_ubm_surface**.*/
1199    ///
1200    ///# Safety
1201    ///- `physicalDevice` (self) must be valid and not destroyed.
1202    ///
1203    ///# Panics
1204    ///Panics if `vkGetPhysicalDeviceUbmPresentationSupportSEC` was not loaded. This can happen if the required extension or Vulkan version is not enabled on the instance or device.
1205    ///
1206    ///# Usage Notes
1207    ///
1208    ///Queries whether a queue family supports presentation to a
1209    ///Samsung UBM surface. Samsung platform only.
1210    ///
1211    ///Requires `VK_SEC_ubm_surface`.
1212    pub unsafe fn get_physical_device_ubm_presentation_support_sec(
1213        &self,
1214        physical_device: PhysicalDevice,
1215        queue_family_index: u32,
1216    ) -> core::ffi::c_void {
1217        let fp = self
1218            .commands()
1219            .get_physical_device_ubm_presentation_support_sec
1220            .expect("vkGetPhysicalDeviceUbmPresentationSupportSEC not loaded");
1221        let mut out = unsafe { core::mem::zeroed() };
1222        unsafe { fp(physical_device, queue_family_index, &mut out) };
1223        out
1224    }
1225    ///Wraps [`vkGetPhysicalDeviceWin32PresentationSupportKHR`](https://registry.khronos.org/vulkan/specs/latest/man/html/vkGetPhysicalDeviceWin32PresentationSupportKHR.html).
1226    /**
1227    Provided by **VK_KHR_win32_surface**.*/
1228    ///
1229    ///# Safety
1230    ///- `physicalDevice` (self) must be valid and not destroyed.
1231    ///
1232    ///# Panics
1233    ///Panics if `vkGetPhysicalDeviceWin32PresentationSupportKHR` was not loaded. This can happen if the required extension or Vulkan version is not enabled on the instance or device.
1234    ///
1235    ///# Usage Notes
1236    ///
1237    ///Queries whether a queue family on the physical device supports
1238    ///presentation to the Win32 desktop compositor. Windows only.
1239    ///Check this before creating a swapchain to ensure the queue can
1240    ///present.
1241    ///
1242    ///Requires `VK_KHR_win32_surface`.
1243    pub unsafe fn get_physical_device_win32_presentation_support_khr(
1244        &self,
1245        physical_device: PhysicalDevice,
1246        queue_family_index: u32,
1247    ) {
1248        let fp = self
1249            .commands()
1250            .get_physical_device_win32_presentation_support_khr
1251            .expect("vkGetPhysicalDeviceWin32PresentationSupportKHR not loaded");
1252        unsafe { fp(physical_device, queue_family_index) };
1253    }
1254    ///Wraps [`vkGetPhysicalDeviceXlibPresentationSupportKHR`](https://registry.khronos.org/vulkan/specs/latest/man/html/vkGetPhysicalDeviceXlibPresentationSupportKHR.html).
1255    /**
1256    Provided by **VK_KHR_xlib_surface**.*/
1257    ///
1258    ///# Safety
1259    ///- `physicalDevice` (self) must be valid and not destroyed.
1260    ///
1261    ///# Panics
1262    ///Panics if `vkGetPhysicalDeviceXlibPresentationSupportKHR` was not loaded. This can happen if the required extension or Vulkan version is not enabled on the instance or device.
1263    ///
1264    ///# Usage Notes
1265    ///
1266    ///Queries whether a queue family supports presentation to an X11
1267    ///display via Xlib for the given visual ID. Linux/X11 only.
1268    ///
1269    ///Requires `VK_KHR_xlib_surface`.
1270    pub unsafe fn get_physical_device_xlib_presentation_support_khr(
1271        &self,
1272        physical_device: PhysicalDevice,
1273        queue_family_index: u32,
1274        visual_id: core::ffi::c_ulong,
1275    ) -> core::ffi::c_void {
1276        let fp = self
1277            .commands()
1278            .get_physical_device_xlib_presentation_support_khr
1279            .expect("vkGetPhysicalDeviceXlibPresentationSupportKHR not loaded");
1280        let mut out = unsafe { core::mem::zeroed() };
1281        unsafe { fp(physical_device, queue_family_index, &mut out, visual_id) };
1282        out
1283    }
1284    ///Wraps [`vkGetPhysicalDeviceXcbPresentationSupportKHR`](https://registry.khronos.org/vulkan/specs/latest/man/html/vkGetPhysicalDeviceXcbPresentationSupportKHR.html).
1285    /**
1286    Provided by **VK_KHR_xcb_surface**.*/
1287    ///
1288    ///# Safety
1289    ///- `physicalDevice` (self) must be valid and not destroyed.
1290    ///
1291    ///# Panics
1292    ///Panics if `vkGetPhysicalDeviceXcbPresentationSupportKHR` was not loaded. This can happen if the required extension or Vulkan version is not enabled on the instance or device.
1293    ///
1294    ///# Usage Notes
1295    ///
1296    ///Queries whether a queue family supports presentation to an X11
1297    ///display via XCB for the given visual ID. Linux/X11 only.
1298    ///
1299    ///Requires `VK_KHR_xcb_surface`.
1300    pub unsafe fn get_physical_device_xcb_presentation_support_khr(
1301        &self,
1302        physical_device: PhysicalDevice,
1303        queue_family_index: u32,
1304        visual_id: u32,
1305    ) -> core::ffi::c_void {
1306        let fp = self
1307            .commands()
1308            .get_physical_device_xcb_presentation_support_khr
1309            .expect("vkGetPhysicalDeviceXcbPresentationSupportKHR not loaded");
1310        let mut out = unsafe { core::mem::zeroed() };
1311        unsafe { fp(physical_device, queue_family_index, &mut out, visual_id) };
1312        out
1313    }
1314    ///Wraps [`vkCreateDirectFBSurfaceEXT`](https://registry.khronos.org/vulkan/specs/latest/man/html/vkCreateDirectFBSurfaceEXT.html).
1315    /**
1316    Provided by **VK_EXT_directfb_surface**.*/
1317    ///
1318    ///# Errors
1319    ///- `VK_ERROR_OUT_OF_HOST_MEMORY`
1320    ///- `VK_ERROR_OUT_OF_DEVICE_MEMORY`
1321    ///- `VK_ERROR_UNKNOWN`
1322    ///- `VK_ERROR_VALIDATION_FAILED`
1323    ///
1324    ///# Safety
1325    ///- `instance` (self) must be valid and not destroyed.
1326    ///
1327    ///# Panics
1328    ///Panics if `vkCreateDirectFBSurfaceEXT` was not loaded. This can happen if the required extension or Vulkan version is not enabled on the instance or device.
1329    ///
1330    ///# Usage Notes
1331    ///
1332    ///Creates a Vulkan surface for a DirectFB window. Linux/DirectFB
1333    ///only. The create info references the DirectFB instance and
1334    ///surface handles.
1335    ///
1336    ///Requires `VK_EXT_directfb_surface`.
1337    pub unsafe fn create_direct_fb_surface_ext(
1338        &self,
1339        p_create_info: &DirectFBSurfaceCreateInfoEXT,
1340        allocator: Option<&AllocationCallbacks>,
1341    ) -> VkResult<SurfaceKHR> {
1342        let fp = self
1343            .commands()
1344            .create_direct_fb_surface_ext
1345            .expect("vkCreateDirectFBSurfaceEXT not loaded");
1346        let alloc_ptr = allocator.map_or(core::ptr::null(), core::ptr::from_ref);
1347        let mut out = unsafe { core::mem::zeroed() };
1348        check(unsafe { fp(self.handle(), p_create_info, alloc_ptr, &mut out) })?;
1349        Ok(out)
1350    }
1351    ///Wraps [`vkGetPhysicalDeviceDirectFBPresentationSupportEXT`](https://registry.khronos.org/vulkan/specs/latest/man/html/vkGetPhysicalDeviceDirectFBPresentationSupportEXT.html).
1352    /**
1353    Provided by **VK_EXT_directfb_surface**.*/
1354    ///
1355    ///# Safety
1356    ///- `physicalDevice` (self) must be valid and not destroyed.
1357    ///
1358    ///# Panics
1359    ///Panics if `vkGetPhysicalDeviceDirectFBPresentationSupportEXT` was not loaded. This can happen if the required extension or Vulkan version is not enabled on the instance or device.
1360    ///
1361    ///# Usage Notes
1362    ///
1363    ///Queries whether a queue family supports presentation to a
1364    ///DirectFB surface. Linux/DirectFB only.
1365    ///
1366    ///Requires `VK_EXT_directfb_surface`.
1367    pub unsafe fn get_physical_device_direct_fb_presentation_support_ext(
1368        &self,
1369        physical_device: PhysicalDevice,
1370        queue_family_index: u32,
1371    ) -> core::ffi::c_void {
1372        let fp = self
1373            .commands()
1374            .get_physical_device_direct_fb_presentation_support_ext
1375            .expect("vkGetPhysicalDeviceDirectFBPresentationSupportEXT not loaded");
1376        let mut out = unsafe { core::mem::zeroed() };
1377        unsafe { fp(physical_device, queue_family_index, &mut out) };
1378        out
1379    }
1380    ///Wraps [`vkCreateImagePipeSurfaceFUCHSIA`](https://registry.khronos.org/vulkan/specs/latest/man/html/vkCreateImagePipeSurfaceFUCHSIA.html).
1381    /**
1382    Provided by **VK_FUCHSIA_imagepipe_surface**.*/
1383    ///
1384    ///# Errors
1385    ///- `VK_ERROR_OUT_OF_HOST_MEMORY`
1386    ///- `VK_ERROR_OUT_OF_DEVICE_MEMORY`
1387    ///- `VK_ERROR_UNKNOWN`
1388    ///- `VK_ERROR_VALIDATION_FAILED`
1389    ///
1390    ///# Safety
1391    ///- `instance` (self) must be valid and not destroyed.
1392    ///
1393    ///# Panics
1394    ///Panics if `vkCreateImagePipeSurfaceFUCHSIA` was not loaded. This can happen if the required extension or Vulkan version is not enabled on the instance or device.
1395    ///
1396    ///# Usage Notes
1397    ///
1398    ///Creates a Vulkan surface backed by a Fuchsia ImagePipe. Fuchsia
1399    ///OS only. The create info references the ImagePipe handle from
1400    ///the Fuchsia scenic compositor.
1401    ///
1402    ///Requires `VK_FUCHSIA_imagepipe_surface`.
1403    pub unsafe fn create_image_pipe_surface_fuchsia(
1404        &self,
1405        p_create_info: &ImagePipeSurfaceCreateInfoFUCHSIA,
1406        allocator: Option<&AllocationCallbacks>,
1407    ) -> VkResult<SurfaceKHR> {
1408        let fp = self
1409            .commands()
1410            .create_image_pipe_surface_fuchsia
1411            .expect("vkCreateImagePipeSurfaceFUCHSIA not loaded");
1412        let alloc_ptr = allocator.map_or(core::ptr::null(), core::ptr::from_ref);
1413        let mut out = unsafe { core::mem::zeroed() };
1414        check(unsafe { fp(self.handle(), p_create_info, alloc_ptr, &mut out) })?;
1415        Ok(out)
1416    }
1417    ///Wraps [`vkCreateStreamDescriptorSurfaceGGP`](https://registry.khronos.org/vulkan/specs/latest/man/html/vkCreateStreamDescriptorSurfaceGGP.html).
1418    /**
1419    Provided by **VK_GGP_stream_descriptor_surface**.*/
1420    ///
1421    ///# Errors
1422    ///- `VK_ERROR_OUT_OF_HOST_MEMORY`
1423    ///- `VK_ERROR_OUT_OF_DEVICE_MEMORY`
1424    ///- `VK_ERROR_NATIVE_WINDOW_IN_USE_KHR`
1425    ///- `VK_ERROR_UNKNOWN`
1426    ///- `VK_ERROR_VALIDATION_FAILED`
1427    ///
1428    ///# Safety
1429    ///- `instance` (self) must be valid and not destroyed.
1430    ///
1431    ///# Panics
1432    ///Panics if `vkCreateStreamDescriptorSurfaceGGP` was not loaded. This can happen if the required extension or Vulkan version is not enabled on the instance or device.
1433    ///
1434    ///# Usage Notes
1435    ///
1436    ///Creates a Vulkan surface from a Google Games Platform (Stadia)
1437    ///stream descriptor. GGP only. The platform has been discontinued.
1438    ///
1439    ///Requires `VK_GGP_stream_descriptor_surface`.
1440    pub unsafe fn create_stream_descriptor_surface_ggp(
1441        &self,
1442        p_create_info: &StreamDescriptorSurfaceCreateInfoGGP,
1443        allocator: Option<&AllocationCallbacks>,
1444    ) -> VkResult<SurfaceKHR> {
1445        let fp = self
1446            .commands()
1447            .create_stream_descriptor_surface_ggp
1448            .expect("vkCreateStreamDescriptorSurfaceGGP not loaded");
1449        let alloc_ptr = allocator.map_or(core::ptr::null(), core::ptr::from_ref);
1450        let mut out = unsafe { core::mem::zeroed() };
1451        check(unsafe { fp(self.handle(), p_create_info, alloc_ptr, &mut out) })?;
1452        Ok(out)
1453    }
1454    ///Wraps [`vkCreateScreenSurfaceQNX`](https://registry.khronos.org/vulkan/specs/latest/man/html/vkCreateScreenSurfaceQNX.html).
1455    /**
1456    Provided by **VK_QNX_screen_surface**.*/
1457    ///
1458    ///# Errors
1459    ///- `VK_ERROR_OUT_OF_HOST_MEMORY`
1460    ///- `VK_ERROR_OUT_OF_DEVICE_MEMORY`
1461    ///- `VK_ERROR_UNKNOWN`
1462    ///- `VK_ERROR_VALIDATION_FAILED`
1463    ///
1464    ///# Safety
1465    ///- `instance` (self) must be valid and not destroyed.
1466    ///
1467    ///# Panics
1468    ///Panics if `vkCreateScreenSurfaceQNX` was not loaded. This can happen if the required extension or Vulkan version is not enabled on the instance or device.
1469    ///
1470    ///# Usage Notes
1471    ///
1472    ///Creates a Vulkan surface for a QNX Screen window. QNX only.
1473    ///The create info references the QNX screen context and window.
1474    ///
1475    ///Requires `VK_QNX_screen_surface`.
1476    pub unsafe fn create_screen_surface_qnx(
1477        &self,
1478        p_create_info: &ScreenSurfaceCreateInfoQNX,
1479        allocator: Option<&AllocationCallbacks>,
1480    ) -> VkResult<SurfaceKHR> {
1481        let fp = self
1482            .commands()
1483            .create_screen_surface_qnx
1484            .expect("vkCreateScreenSurfaceQNX not loaded");
1485        let alloc_ptr = allocator.map_or(core::ptr::null(), core::ptr::from_ref);
1486        let mut out = unsafe { core::mem::zeroed() };
1487        check(unsafe { fp(self.handle(), p_create_info, alloc_ptr, &mut out) })?;
1488        Ok(out)
1489    }
1490    ///Wraps [`vkGetPhysicalDeviceScreenPresentationSupportQNX`](https://registry.khronos.org/vulkan/specs/latest/man/html/vkGetPhysicalDeviceScreenPresentationSupportQNX.html).
1491    /**
1492    Provided by **VK_QNX_screen_surface**.*/
1493    ///
1494    ///# Safety
1495    ///- `physicalDevice` (self) must be valid and not destroyed.
1496    ///
1497    ///# Panics
1498    ///Panics if `vkGetPhysicalDeviceScreenPresentationSupportQNX` was not loaded. This can happen if the required extension or Vulkan version is not enabled on the instance or device.
1499    ///
1500    ///# Usage Notes
1501    ///
1502    ///Queries whether a queue family supports presentation on QNX
1503    ///Screen. QNX only.
1504    ///
1505    ///Requires `VK_QNX_screen_surface`.
1506    pub unsafe fn get_physical_device_screen_presentation_support_qnx(
1507        &self,
1508        physical_device: PhysicalDevice,
1509        queue_family_index: u32,
1510    ) -> core::ffi::c_void {
1511        let fp = self
1512            .commands()
1513            .get_physical_device_screen_presentation_support_qnx
1514            .expect("vkGetPhysicalDeviceScreenPresentationSupportQNX not loaded");
1515        let mut out = unsafe { core::mem::zeroed() };
1516        unsafe { fp(physical_device, queue_family_index, &mut out) };
1517        out
1518    }
1519    ///Wraps [`vkCreateDebugReportCallbackEXT`](https://registry.khronos.org/vulkan/specs/latest/man/html/vkCreateDebugReportCallbackEXT.html).
1520    /**
1521    Provided by **VK_EXT_debug_report**.*/
1522    ///
1523    ///# Errors
1524    ///- `VK_ERROR_OUT_OF_HOST_MEMORY`
1525    ///- `VK_ERROR_UNKNOWN`
1526    ///- `VK_ERROR_VALIDATION_FAILED`
1527    ///
1528    ///# Safety
1529    ///- `instance` (self) must be valid and not destroyed.
1530    ///
1531    ///# Panics
1532    ///Panics if `vkCreateDebugReportCallbackEXT` was not loaded. This can happen if the required extension or Vulkan version is not enabled on the instance or device.
1533    ///
1534    ///# Usage Notes
1535    ///
1536    ///Creates a legacy debug report callback. Superseded by
1537    ///`create_debug_utils_messenger_ext` (`VK_EXT_debug_utils`),
1538    ///which provides richer message data and object labeling.
1539    ///
1540    ///The callback receives validation messages filtered by the
1541    ///`flags` bitmask (error, warning, performance, info, debug).
1542    ///
1543    ///Destroy with `destroy_debug_report_callback_ext`.
1544    ///
1545    ///Requires `VK_EXT_debug_report`. Prefer `VK_EXT_debug_utils`
1546    ///for new code.
1547    pub unsafe fn create_debug_report_callback_ext(
1548        &self,
1549        p_create_info: &DebugReportCallbackCreateInfoEXT,
1550        allocator: Option<&AllocationCallbacks>,
1551    ) -> VkResult<DebugReportCallbackEXT> {
1552        let fp = self
1553            .commands()
1554            .create_debug_report_callback_ext
1555            .expect("vkCreateDebugReportCallbackEXT not loaded");
1556        let alloc_ptr = allocator.map_or(core::ptr::null(), core::ptr::from_ref);
1557        let mut out = unsafe { core::mem::zeroed() };
1558        check(unsafe { fp(self.handle(), p_create_info, alloc_ptr, &mut out) })?;
1559        Ok(out)
1560    }
1561    ///Wraps [`vkDestroyDebugReportCallbackEXT`](https://registry.khronos.org/vulkan/specs/latest/man/html/vkDestroyDebugReportCallbackEXT.html).
1562    /**
1563    Provided by **VK_EXT_debug_report**.*/
1564    ///
1565    ///# Safety
1566    ///- `instance` (self) must be valid and not destroyed.
1567    ///- `callback` must be externally synchronized.
1568    ///
1569    ///# Panics
1570    ///Panics if `vkDestroyDebugReportCallbackEXT` was not loaded. This can happen if the required extension or Vulkan version is not enabled on the instance or device.
1571    ///
1572    ///# Usage Notes
1573    ///
1574    ///Destroys a legacy debug report callback created with
1575    ///`create_debug_report_callback_ext`.
1576    ///
1577    ///Destroy before the instance is destroyed.
1578    ///
1579    ///Requires `VK_EXT_debug_report`.
1580    pub unsafe fn destroy_debug_report_callback_ext(
1581        &self,
1582        callback: DebugReportCallbackEXT,
1583        allocator: Option<&AllocationCallbacks>,
1584    ) {
1585        let fp = self
1586            .commands()
1587            .destroy_debug_report_callback_ext
1588            .expect("vkDestroyDebugReportCallbackEXT not loaded");
1589        let alloc_ptr = allocator.map_or(core::ptr::null(), core::ptr::from_ref);
1590        unsafe { fp(self.handle(), callback, alloc_ptr) };
1591    }
1592    ///Wraps [`vkDebugReportMessageEXT`](https://registry.khronos.org/vulkan/specs/latest/man/html/vkDebugReportMessageEXT.html).
1593    /**
1594    Provided by **VK_EXT_debug_report**.*/
1595    ///
1596    ///# Safety
1597    ///- `instance` (self) must be valid and not destroyed.
1598    ///
1599    ///# Panics
1600    ///Panics if `vkDebugReportMessageEXT` was not loaded. This can happen if the required extension or Vulkan version is not enabled on the instance or device.
1601    ///
1602    ///# Usage Notes
1603    ///
1604    ///Manually injects a message into the legacy debug report callback
1605    ///chain. All registered callbacks matching the specified `flags`
1606    ///will receive the message.
1607    ///
1608    ///`p_layer_prefix` and `p_message` are C strings. `object` is the
1609    ///raw handle of the relevant Vulkan object (or 0 if none).
1610    ///
1611    ///Superseded by `submit_debug_utils_message_ext`.
1612    ///
1613    ///Requires `VK_EXT_debug_report`.
1614    pub unsafe fn debug_report_message_ext(
1615        &self,
1616        flags: DebugReportFlagsEXT,
1617        object_type: DebugReportObjectTypeEXT,
1618        object: u64,
1619        location: usize,
1620        message_code: i32,
1621        p_layer_prefix: *const core::ffi::c_char,
1622        p_message: *const core::ffi::c_char,
1623    ) {
1624        let fp = self
1625            .commands()
1626            .debug_report_message_ext
1627            .expect("vkDebugReportMessageEXT not loaded");
1628        unsafe {
1629            fp(
1630                self.handle(),
1631                flags,
1632                object_type,
1633                object,
1634                location,
1635                message_code,
1636                p_layer_prefix,
1637                p_message,
1638            )
1639        };
1640    }
1641    ///Wraps [`vkGetPhysicalDeviceExternalImageFormatPropertiesNV`](https://registry.khronos.org/vulkan/specs/latest/man/html/vkGetPhysicalDeviceExternalImageFormatPropertiesNV.html).
1642    /**
1643    Provided by **VK_NV_external_memory_capabilities**.*/
1644    ///
1645    ///# Errors
1646    ///- `VK_ERROR_OUT_OF_HOST_MEMORY`
1647    ///- `VK_ERROR_OUT_OF_DEVICE_MEMORY`
1648    ///- `VK_ERROR_FORMAT_NOT_SUPPORTED`
1649    ///- `VK_ERROR_UNKNOWN`
1650    ///- `VK_ERROR_VALIDATION_FAILED`
1651    ///
1652    ///# Safety
1653    ///- `physicalDevice` (self) must be valid and not destroyed.
1654    ///
1655    ///# Panics
1656    ///Panics if `vkGetPhysicalDeviceExternalImageFormatPropertiesNV` was not loaded. This can happen if the required extension or Vulkan version is not enabled on the instance or device.
1657    ///
1658    ///# Usage Notes
1659    ///
1660    ///Legacy NV path for querying external image format properties.
1661    ///Takes the full set of image creation parameters plus an external
1662    ///handle type and returns compatibility information. Prefer the
1663    ///core `get_physical_device_image_format_properties2` with
1664    ///`PhysicalDeviceExternalImageFormatInfo` in the pNext chain.
1665    ///
1666    ///Requires `VK_NV_external_memory_capabilities`.
1667    pub unsafe fn get_physical_device_external_image_format_properties_nv(
1668        &self,
1669        physical_device: PhysicalDevice,
1670        format: Format,
1671        r#type: ImageType,
1672        tiling: ImageTiling,
1673        usage: ImageUsageFlags,
1674        flags: ImageCreateFlags,
1675        external_handle_type: ExternalMemoryHandleTypeFlagsNV,
1676    ) -> VkResult<ExternalImageFormatPropertiesNV> {
1677        let fp = self
1678            .commands()
1679            .get_physical_device_external_image_format_properties_nv
1680            .expect("vkGetPhysicalDeviceExternalImageFormatPropertiesNV not loaded");
1681        let mut out = unsafe { core::mem::zeroed() };
1682        check(unsafe {
1683            fp(
1684                physical_device,
1685                format,
1686                r#type,
1687                tiling,
1688                usage,
1689                flags,
1690                external_handle_type,
1691                &mut out,
1692            )
1693        })?;
1694        Ok(out)
1695    }
1696    ///Wraps [`vkGetPhysicalDeviceFeatures2`](https://registry.khronos.org/vulkan/specs/latest/man/html/vkGetPhysicalDeviceFeatures2.html).
1697    /**
1698    Provided by **VK_BASE_VERSION_1_1**.*/
1699    ///
1700    ///# Safety
1701    ///- `physicalDevice` (self) must be valid and not destroyed.
1702    ///
1703    ///# Panics
1704    ///Panics if `vkGetPhysicalDeviceFeatures2` was not loaded. This can happen if the required extension or Vulkan version is not enabled on the instance or device.
1705    ///
1706    ///# Usage Notes
1707    ///
1708    ///Vulkan 1.1 version of `get_physical_device_features` that supports
1709    ///chaining additional feature structs via pNext.
1710    ///
1711    ///Chain version-specific and extension feature structs to query their
1712    ///availability:
1713    ///
1714    ///- `PhysicalDeviceVulkan11Features`
1715    ///- `PhysicalDeviceVulkan12Features`
1716    ///- `PhysicalDeviceVulkan13Features`
1717    ///- Extension-specific structs like
1718    ///  `PhysicalDeviceRayTracingPipelineFeaturesKHR`
1719    ///
1720    ///Then pass the same chain (with desired features enabled) to
1721    ///`DeviceCreateInfo` to enable them at device creation.
1722    ///
1723    ///Always query before enabling, requesting an unsupported feature
1724    ///fails device creation.
1725    pub unsafe fn get_physical_device_features2(
1726        &self,
1727        physical_device: PhysicalDevice,
1728        p_features: &mut PhysicalDeviceFeatures2,
1729    ) {
1730        let fp = self
1731            .commands()
1732            .get_physical_device_features2
1733            .expect("vkGetPhysicalDeviceFeatures2 not loaded");
1734        unsafe { fp(physical_device, p_features) };
1735    }
1736    ///Wraps [`vkGetPhysicalDeviceProperties2`](https://registry.khronos.org/vulkan/specs/latest/man/html/vkGetPhysicalDeviceProperties2.html).
1737    /**
1738    Provided by **VK_BASE_VERSION_1_1**.*/
1739    ///
1740    ///# Safety
1741    ///- `physicalDevice` (self) must be valid and not destroyed.
1742    ///
1743    ///# Panics
1744    ///Panics if `vkGetPhysicalDeviceProperties2` was not loaded. This can happen if the required extension or Vulkan version is not enabled on the instance or device.
1745    ///
1746    ///# Usage Notes
1747    ///
1748    ///Vulkan 1.1 version of `get_physical_device_properties` that supports
1749    ///chaining additional property structs via pNext.
1750    ///
1751    ///Chain version-specific and extension property structs to query
1752    ///extended limits and capabilities:
1753    ///
1754    ///- `PhysicalDeviceVulkan11Properties`: subgroup properties, point
1755    ///  clipping, protected memory.
1756    ///- `PhysicalDeviceVulkan12Properties`: driver conformance, denorm
1757    ///  behaviour, float controls, descriptor indexing limits, timeline
1758    ///  semaphore properties.
1759    ///- `PhysicalDeviceVulkan13Properties`: subgroup size control,
1760    ///  inline uniform block limits, dynamic rendering limits.
1761    ///- Extension structs like
1762    ///  `PhysicalDeviceRayTracingPipelinePropertiesKHR`.
1763    ///
1764    ///The base `PhysicalDeviceProperties` is identical to what
1765    ///`get_physical_device_properties` returns.
1766    pub unsafe fn get_physical_device_properties2(
1767        &self,
1768        physical_device: PhysicalDevice,
1769        p_properties: &mut PhysicalDeviceProperties2,
1770    ) {
1771        let fp = self
1772            .commands()
1773            .get_physical_device_properties2
1774            .expect("vkGetPhysicalDeviceProperties2 not loaded");
1775        unsafe { fp(physical_device, p_properties) };
1776    }
1777    ///Wraps [`vkGetPhysicalDeviceFormatProperties2`](https://registry.khronos.org/vulkan/specs/latest/man/html/vkGetPhysicalDeviceFormatProperties2.html).
1778    /**
1779    Provided by **VK_BASE_VERSION_1_1**.*/
1780    ///
1781    ///# Safety
1782    ///- `physicalDevice` (self) must be valid and not destroyed.
1783    ///
1784    ///# Panics
1785    ///Panics if `vkGetPhysicalDeviceFormatProperties2` was not loaded. This can happen if the required extension or Vulkan version is not enabled on the instance or device.
1786    ///
1787    ///# Usage Notes
1788    ///
1789    ///Vulkan 1.1 version of `get_physical_device_format_properties` that
1790    ///supports extensible output via pNext.
1791    ///
1792    ///Chain `DrmFormatModifierPropertiesListEXT` to query DRM format
1793    ///modifier support, or `FormatProperties3` (Vulkan 1.3) for extended
1794    ///format feature flags that do not fit in the original 32-bit fields.
1795    ///
1796    ///The base `FormatProperties` (linear, optimal, buffer features) is
1797    ///identical to what `get_physical_device_format_properties` returns.
1798    pub unsafe fn get_physical_device_format_properties2(
1799        &self,
1800        physical_device: PhysicalDevice,
1801        format: Format,
1802        p_format_properties: &mut FormatProperties2,
1803    ) {
1804        let fp = self
1805            .commands()
1806            .get_physical_device_format_properties2
1807            .expect("vkGetPhysicalDeviceFormatProperties2 not loaded");
1808        unsafe { fp(physical_device, format, p_format_properties) };
1809    }
1810    ///Wraps [`vkGetPhysicalDeviceImageFormatProperties2`](https://registry.khronos.org/vulkan/specs/latest/man/html/vkGetPhysicalDeviceImageFormatProperties2.html).
1811    /**
1812    Provided by **VK_BASE_VERSION_1_1**.*/
1813    ///
1814    ///# Errors
1815    ///- `VK_ERROR_OUT_OF_HOST_MEMORY`
1816    ///- `VK_ERROR_OUT_OF_DEVICE_MEMORY`
1817    ///- `VK_ERROR_FORMAT_NOT_SUPPORTED`
1818    ///- `VK_ERROR_IMAGE_USAGE_NOT_SUPPORTED_KHR`
1819    ///- `VK_ERROR_VIDEO_PROFILE_OPERATION_NOT_SUPPORTED_KHR`
1820    ///- `VK_ERROR_VIDEO_PROFILE_FORMAT_NOT_SUPPORTED_KHR`
1821    ///- `VK_ERROR_VIDEO_PICTURE_LAYOUT_NOT_SUPPORTED_KHR`
1822    ///- `VK_ERROR_VIDEO_PROFILE_CODEC_NOT_SUPPORTED_KHR`
1823    ///- `VK_ERROR_UNKNOWN`
1824    ///- `VK_ERROR_VALIDATION_FAILED`
1825    ///
1826    ///# Safety
1827    ///- `physicalDevice` (self) must be valid and not destroyed.
1828    ///
1829    ///# Panics
1830    ///Panics if `vkGetPhysicalDeviceImageFormatProperties2` was not loaded. This can happen if the required extension or Vulkan version is not enabled on the instance or device.
1831    ///
1832    ///# Usage Notes
1833    ///
1834    ///Vulkan 1.1 version of `get_physical_device_image_format_properties`
1835    ///that supports extensible input and output via pNext.
1836    ///
1837    ///Chain in the input:
1838    ///
1839    ///- `PhysicalDeviceExternalImageFormatInfo`: query external memory
1840    ///  compatibility for the image.
1841    ///- `PhysicalDeviceImageDrmFormatModifierInfoEXT`: query DRM modifier
1842    ///  support.
1843    ///
1844    ///Chain in the output:
1845    ///
1846    ///- `ExternalImageFormatProperties`: external memory capabilities.
1847    ///- `SamplerYcbcrConversionImageFormatProperties`: YCBCR support.
1848    ///
1849    ///Returns `VK_ERROR_FORMAT_NOT_SUPPORTED` if the combination is not
1850    ///supported.
1851    pub unsafe fn get_physical_device_image_format_properties2(
1852        &self,
1853        physical_device: PhysicalDevice,
1854        p_image_format_info: &PhysicalDeviceImageFormatInfo2,
1855        p_image_format_properties: &mut ImageFormatProperties2,
1856    ) -> VkResult<()> {
1857        let fp = self
1858            .commands()
1859            .get_physical_device_image_format_properties2
1860            .expect("vkGetPhysicalDeviceImageFormatProperties2 not loaded");
1861        check(unsafe {
1862            fp(
1863                physical_device,
1864                p_image_format_info,
1865                p_image_format_properties,
1866            )
1867        })
1868    }
1869    ///Wraps [`vkGetPhysicalDeviceQueueFamilyProperties2`](https://registry.khronos.org/vulkan/specs/latest/man/html/vkGetPhysicalDeviceQueueFamilyProperties2.html).
1870    /**
1871    Provided by **VK_BASE_VERSION_1_1**.*/
1872    ///
1873    ///# Safety
1874    ///- `physicalDevice` (self) must be valid and not destroyed.
1875    ///
1876    ///# Panics
1877    ///Panics if `vkGetPhysicalDeviceQueueFamilyProperties2` was not loaded. This can happen if the required extension or Vulkan version is not enabled on the instance or device.
1878    ///
1879    ///# Usage Notes
1880    ///
1881    ///Vulkan 1.1 version of `get_physical_device_queue_family_properties`
1882    ///that supports extensible output via pNext.
1883    ///
1884    ///Chain `QueueFamilyCheckpointPropertiesNV` for diagnostic checkpoint
1885    ///support, or `QueueFamilyGlobalPriorityPropertiesKHR` for
1886    ///global priority scheduling capabilities.
1887    ///
1888    ///The base `QueueFamilyProperties` is identical to what
1889    ///`get_physical_device_queue_family_properties` returns.
1890    pub unsafe fn get_physical_device_queue_family_properties2(
1891        &self,
1892        physical_device: PhysicalDevice,
1893    ) -> Vec<QueueFamilyProperties2> {
1894        let fp = self
1895            .commands()
1896            .get_physical_device_queue_family_properties2
1897            .expect("vkGetPhysicalDeviceQueueFamilyProperties2 not loaded");
1898        fill_two_call(|count, data| unsafe { fp(physical_device, count, data) })
1899    }
1900    ///Wraps [`vkGetPhysicalDeviceMemoryProperties2`](https://registry.khronos.org/vulkan/specs/latest/man/html/vkGetPhysicalDeviceMemoryProperties2.html).
1901    /**
1902    Provided by **VK_BASE_VERSION_1_1**.*/
1903    ///
1904    ///# Safety
1905    ///- `physicalDevice` (self) must be valid and not destroyed.
1906    ///
1907    ///# Panics
1908    ///Panics if `vkGetPhysicalDeviceMemoryProperties2` was not loaded. This can happen if the required extension or Vulkan version is not enabled on the instance or device.
1909    ///
1910    ///# Usage Notes
1911    ///
1912    ///Vulkan 1.1 version of `get_physical_device_memory_properties` that
1913    ///supports extensible output via pNext.
1914    ///
1915    ///Chain `PhysicalDeviceMemoryBudgetPropertiesEXT` (if the
1916    ///`VK_EXT_memory_budget` extension is available) to query per-heap
1917    ///budget and current usage. This is essential for managing memory
1918    ///pressure on systems with unified memory or limited VRAM.
1919    ///
1920    ///The base `PhysicalDeviceMemoryProperties` (heaps and types) is
1921    ///identical to what `get_physical_device_memory_properties` returns.
1922    pub unsafe fn get_physical_device_memory_properties2(
1923        &self,
1924        physical_device: PhysicalDevice,
1925        p_memory_properties: &mut PhysicalDeviceMemoryProperties2,
1926    ) {
1927        let fp = self
1928            .commands()
1929            .get_physical_device_memory_properties2
1930            .expect("vkGetPhysicalDeviceMemoryProperties2 not loaded");
1931        unsafe { fp(physical_device, p_memory_properties) };
1932    }
1933    ///Wraps [`vkGetPhysicalDeviceSparseImageFormatProperties2`](https://registry.khronos.org/vulkan/specs/latest/man/html/vkGetPhysicalDeviceSparseImageFormatProperties2.html).
1934    /**
1935    Provided by **VK_BASE_VERSION_1_1**.*/
1936    ///
1937    ///# Safety
1938    ///- `physicalDevice` (self) must be valid and not destroyed.
1939    ///
1940    ///# Panics
1941    ///Panics if `vkGetPhysicalDeviceSparseImageFormatProperties2` was not loaded. This can happen if the required extension or Vulkan version is not enabled on the instance or device.
1942    ///
1943    ///# Usage Notes
1944    ///
1945    ///Vulkan 1.1 version of
1946    ///`get_physical_device_sparse_image_format_properties` that supports
1947    ///extensible output via pNext.
1948    ///
1949    ///Only relevant for sparse images. Returns the same base sparse format
1950    ///properties as the 1.0 version.
1951    pub unsafe fn get_physical_device_sparse_image_format_properties2(
1952        &self,
1953        physical_device: PhysicalDevice,
1954        p_format_info: &PhysicalDeviceSparseImageFormatInfo2,
1955    ) -> Vec<SparseImageFormatProperties2> {
1956        let fp = self
1957            .commands()
1958            .get_physical_device_sparse_image_format_properties2
1959            .expect("vkGetPhysicalDeviceSparseImageFormatProperties2 not loaded");
1960        fill_two_call(|count, data| unsafe { fp(physical_device, p_format_info, count, data) })
1961    }
1962    ///Wraps [`vkGetPhysicalDeviceExternalBufferProperties`](https://registry.khronos.org/vulkan/specs/latest/man/html/vkGetPhysicalDeviceExternalBufferProperties.html).
1963    /**
1964    Provided by **VK_BASE_VERSION_1_1**.*/
1965    ///
1966    ///# Safety
1967    ///- `physicalDevice` (self) must be valid and not destroyed.
1968    ///
1969    ///# Panics
1970    ///Panics if `vkGetPhysicalDeviceExternalBufferProperties` was not loaded. This can happen if the required extension or Vulkan version is not enabled on the instance or device.
1971    ///
1972    ///# Usage Notes
1973    ///
1974    ///Queries whether a buffer with the given usage and flags can be
1975    ///exported to or imported from an external handle type (e.g. POSIX
1976    ///file descriptor, Win32 handle, or DMA-BUF).
1977    ///
1978    ///The returned `ExternalBufferProperties` indicates:
1979    ///
1980    ///- Whether the external handle type is compatible.
1981    ///- Whether dedicated allocation is required.
1982    ///- Which other handle types the memory can be exported to
1983    ///  simultaneously.
1984    ///
1985    ///Use this before creating a buffer intended for cross-process or
1986    ///cross-API sharing to verify the external memory capabilities.
1987    pub unsafe fn get_physical_device_external_buffer_properties(
1988        &self,
1989        physical_device: PhysicalDevice,
1990        p_external_buffer_info: &PhysicalDeviceExternalBufferInfo,
1991        p_external_buffer_properties: &mut ExternalBufferProperties,
1992    ) {
1993        let fp = self
1994            .commands()
1995            .get_physical_device_external_buffer_properties
1996            .expect("vkGetPhysicalDeviceExternalBufferProperties not loaded");
1997        unsafe {
1998            fp(
1999                physical_device,
2000                p_external_buffer_info,
2001                p_external_buffer_properties,
2002            )
2003        };
2004    }
2005    ///Wraps [`vkGetPhysicalDeviceExternalMemorySciBufPropertiesNV`](https://registry.khronos.org/vulkan/specs/latest/man/html/vkGetPhysicalDeviceExternalMemorySciBufPropertiesNV.html).
2006    ///
2007    ///# Errors
2008    ///- `VK_ERROR_INITIALIZATION_FAILED`
2009    ///- `VK_ERROR_INVALID_EXTERNAL_HANDLE`
2010    ///- `VK_ERROR_UNKNOWN`
2011    ///- `VK_ERROR_VALIDATION_FAILED`
2012    ///
2013    ///# Safety
2014    ///- `physicalDevice` (self) must be valid and not destroyed.
2015    ///
2016    ///# Panics
2017    ///Panics if `vkGetPhysicalDeviceExternalMemorySciBufPropertiesNV` was not loaded. This can happen if the required extension or Vulkan version is not enabled on the instance or device.
2018    ///
2019    ///# Usage Notes
2020    ///
2021    ///Queries compatibility of external NvSciBuf memory handles with
2022    ///Vulkan on NVIDIA platforms (primarily automotive / embedded). Returns
2023    ///the compatible memory types for a given NvSciBuf attribute list.
2024    ///
2025    ///This is a platform-specific extension for NVIDIA's Safety Critical
2026    ///ecosystem. Not available on desktop or mobile platforms.
2027    pub unsafe fn get_physical_device_external_memory_sci_buf_properties_nv(
2028        &self,
2029        physical_device: PhysicalDevice,
2030        handle_type: ExternalMemoryHandleTypeFlagBits,
2031        handle: *const core::ffi::c_void,
2032        p_memory_sci_buf_properties: &mut MemorySciBufPropertiesNV,
2033    ) -> VkResult<()> {
2034        let fp = self
2035            .commands()
2036            .get_physical_device_external_memory_sci_buf_properties_nv
2037            .expect("vkGetPhysicalDeviceExternalMemorySciBufPropertiesNV not loaded");
2038        check(unsafe {
2039            fp(
2040                physical_device,
2041                handle_type,
2042                handle,
2043                p_memory_sci_buf_properties,
2044            )
2045        })
2046    }
2047    ///Wraps [`vkGetPhysicalDeviceSciBufAttributesNV`](https://registry.khronos.org/vulkan/specs/latest/man/html/vkGetPhysicalDeviceSciBufAttributesNV.html).
2048    ///
2049    ///# Errors
2050    ///- `VK_ERROR_OUT_OF_HOST_MEMORY`
2051    ///- `VK_ERROR_INITIALIZATION_FAILED`
2052    ///- `VK_ERROR_UNKNOWN`
2053    ///- `VK_ERROR_VALIDATION_FAILED`
2054    ///
2055    ///# Safety
2056    ///- `physicalDevice` (self) must be valid and not destroyed.
2057    ///
2058    ///# Panics
2059    ///Panics if `vkGetPhysicalDeviceSciBufAttributesNV` was not loaded. This can happen if the required extension or Vulkan version is not enabled on the instance or device.
2060    ///
2061    ///# Usage Notes
2062    ///
2063    ///Fills an NvSciBuf attribute list with Vulkan's requirements for
2064    ///a given image or buffer creation info. Used to negotiate buffer
2065    ///attributes when sharing memory between Vulkan and other NvSciBuf
2066    ///consumers.
2067    ///
2068    ///This is a platform-specific extension for NVIDIA's Safety Critical
2069    ///ecosystem. Not available on desktop or mobile platforms.
2070    pub unsafe fn get_physical_device_sci_buf_attributes_nv(
2071        &self,
2072        physical_device: PhysicalDevice,
2073        p_attributes: *const core::ffi::c_void,
2074    ) -> VkResult<()> {
2075        let fp = self
2076            .commands()
2077            .get_physical_device_sci_buf_attributes_nv
2078            .expect("vkGetPhysicalDeviceSciBufAttributesNV not loaded");
2079        check(unsafe { fp(physical_device, p_attributes) })
2080    }
2081    ///Wraps [`vkGetPhysicalDeviceExternalSemaphoreProperties`](https://registry.khronos.org/vulkan/specs/latest/man/html/vkGetPhysicalDeviceExternalSemaphoreProperties.html).
2082    /**
2083    Provided by **VK_BASE_VERSION_1_1**.*/
2084    ///
2085    ///# Safety
2086    ///- `physicalDevice` (self) must be valid and not destroyed.
2087    ///
2088    ///# Panics
2089    ///Panics if `vkGetPhysicalDeviceExternalSemaphoreProperties` was not loaded. This can happen if the required extension or Vulkan version is not enabled on the instance or device.
2090    ///
2091    ///# Usage Notes
2092    ///
2093    ///Queries whether a semaphore can be exported to or imported from an
2094    ///external handle type (e.g. POSIX file descriptor, Win32 handle,
2095    ///sync file, or Zircon event).
2096    ///
2097    ///The returned properties indicate:
2098    ///
2099    ///- Whether the external handle type is compatible with semaphores.
2100    ///- Whether the handle is a copy or a reference.
2101    ///- Which other handle types the semaphore can be exported to.
2102    ///
2103    ///External semaphores are the primary cross-process and cross-API
2104    ///synchronisation mechanism, for example, synchronising Vulkan
2105    ///rendering with an OpenGL or DirectX consumer.
2106    pub unsafe fn get_physical_device_external_semaphore_properties(
2107        &self,
2108        physical_device: PhysicalDevice,
2109        p_external_semaphore_info: &PhysicalDeviceExternalSemaphoreInfo,
2110        p_external_semaphore_properties: &mut ExternalSemaphoreProperties,
2111    ) {
2112        let fp = self
2113            .commands()
2114            .get_physical_device_external_semaphore_properties
2115            .expect("vkGetPhysicalDeviceExternalSemaphoreProperties not loaded");
2116        unsafe {
2117            fp(
2118                physical_device,
2119                p_external_semaphore_info,
2120                p_external_semaphore_properties,
2121            )
2122        };
2123    }
2124    ///Wraps [`vkGetPhysicalDeviceExternalFenceProperties`](https://registry.khronos.org/vulkan/specs/latest/man/html/vkGetPhysicalDeviceExternalFenceProperties.html).
2125    /**
2126    Provided by **VK_BASE_VERSION_1_1**.*/
2127    ///
2128    ///# Safety
2129    ///- `physicalDevice` (self) must be valid and not destroyed.
2130    ///
2131    ///# Panics
2132    ///Panics if `vkGetPhysicalDeviceExternalFenceProperties` was not loaded. This can happen if the required extension or Vulkan version is not enabled on the instance or device.
2133    ///
2134    ///# Usage Notes
2135    ///
2136    ///Queries whether a fence can be exported to or imported from an
2137    ///external handle type (e.g. POSIX file descriptor, Win32 handle,
2138    ///or sync file).
2139    ///
2140    ///The returned properties indicate:
2141    ///
2142    ///- Whether the external handle type is compatible with fences.
2143    ///- Whether the handle is a copy or a reference to the fence state.
2144    ///- Which other handle types the fence can be exported to.
2145    ///
2146    ///Use this before creating a fence intended for cross-process
2147    ///synchronisation.
2148    pub unsafe fn get_physical_device_external_fence_properties(
2149        &self,
2150        physical_device: PhysicalDevice,
2151        p_external_fence_info: &PhysicalDeviceExternalFenceInfo,
2152        p_external_fence_properties: &mut ExternalFenceProperties,
2153    ) {
2154        let fp = self
2155            .commands()
2156            .get_physical_device_external_fence_properties
2157            .expect("vkGetPhysicalDeviceExternalFenceProperties not loaded");
2158        unsafe {
2159            fp(
2160                physical_device,
2161                p_external_fence_info,
2162                p_external_fence_properties,
2163            )
2164        };
2165    }
2166    ///Wraps [`vkGetPhysicalDeviceSciSyncAttributesNV`](https://registry.khronos.org/vulkan/specs/latest/man/html/vkGetPhysicalDeviceSciSyncAttributesNV.html).
2167    ///
2168    ///# Errors
2169    ///- `VK_ERROR_INITIALIZATION_FAILED`
2170    ///- `VK_ERROR_UNKNOWN`
2171    ///- `VK_ERROR_VALIDATION_FAILED`
2172    ///
2173    ///# Safety
2174    ///- `physicalDevice` (self) must be valid and not destroyed.
2175    ///
2176    ///# Panics
2177    ///Panics if `vkGetPhysicalDeviceSciSyncAttributesNV` was not loaded. This can happen if the required extension or Vulkan version is not enabled on the instance or device.
2178    ///
2179    ///# Usage Notes
2180    ///
2181    ///Fills an NvSciSync attribute list with Vulkan's requirements for
2182    ///synchronisation. Used to negotiate sync object attributes when
2183    ///sharing synchronisation primitives between Vulkan and other NvSciSync
2184    ///consumers (e.g. camera, display, or compute pipelines).
2185    ///
2186    ///This is a platform-specific extension for NVIDIA's Safety Critical
2187    ///ecosystem. Not available on desktop or mobile platforms.
2188    pub unsafe fn get_physical_device_sci_sync_attributes_nv(
2189        &self,
2190        physical_device: PhysicalDevice,
2191        p_sci_sync_attributes_info: &SciSyncAttributesInfoNV,
2192        p_attributes: *const core::ffi::c_void,
2193    ) -> VkResult<()> {
2194        let fp = self
2195            .commands()
2196            .get_physical_device_sci_sync_attributes_nv
2197            .expect("vkGetPhysicalDeviceSciSyncAttributesNV not loaded");
2198        check(unsafe { fp(physical_device, p_sci_sync_attributes_info, p_attributes) })
2199    }
2200    ///Wraps [`vkReleaseDisplayEXT`](https://registry.khronos.org/vulkan/specs/latest/man/html/vkReleaseDisplayEXT.html).
2201    /**
2202    Provided by **VK_EXT_direct_mode_display**.*/
2203    ///
2204    ///# Errors
2205    ///- `VK_ERROR_UNKNOWN`
2206    ///- `VK_ERROR_VALIDATION_FAILED`
2207    ///
2208    ///# Safety
2209    ///- `physicalDevice` (self) must be valid and not destroyed.
2210    ///
2211    ///# Panics
2212    ///Panics if `vkReleaseDisplayEXT` was not loaded. This can happen if the required extension or Vulkan version is not enabled on the instance or device.
2213    ///
2214    ///# Usage Notes
2215    ///
2216    ///Releases a previously acquired display, returning control to the
2217    ///platform's display manager. Call this when done with direct
2218    ///display rendering.
2219    ///
2220    ///Requires `VK_EXT_direct_mode_display`.
2221    pub unsafe fn release_display_ext(
2222        &self,
2223        physical_device: PhysicalDevice,
2224        display: DisplayKHR,
2225    ) -> VkResult<()> {
2226        let fp = self
2227            .commands()
2228            .release_display_ext
2229            .expect("vkReleaseDisplayEXT not loaded");
2230        check(unsafe { fp(physical_device, display) })
2231    }
2232    ///Wraps [`vkAcquireXlibDisplayEXT`](https://registry.khronos.org/vulkan/specs/latest/man/html/vkAcquireXlibDisplayEXT.html).
2233    /**
2234    Provided by **VK_EXT_acquire_xlib_display**.*/
2235    ///
2236    ///# Errors
2237    ///- `VK_ERROR_OUT_OF_HOST_MEMORY`
2238    ///- `VK_ERROR_INITIALIZATION_FAILED`
2239    ///- `VK_ERROR_UNKNOWN`
2240    ///- `VK_ERROR_VALIDATION_FAILED`
2241    ///
2242    ///# Safety
2243    ///- `physicalDevice` (self) must be valid and not destroyed.
2244    ///
2245    ///# Panics
2246    ///Panics if `vkAcquireXlibDisplayEXT` was not loaded. This can happen if the required extension or Vulkan version is not enabled on the instance or device.
2247    ///
2248    ///# Usage Notes
2249    ///
2250    ///Acquires exclusive control of an X11 display for direct rendering,
2251    ///bypassing the X server's compositor. The display must be released
2252    ///with `release_display_ext` when finished.
2253    ///
2254    ///Requires `VK_EXT_acquire_xlib_display`. Linux/X11 only.
2255    pub unsafe fn acquire_xlib_display_ext(
2256        &self,
2257        physical_device: PhysicalDevice,
2258        display: DisplayKHR,
2259    ) -> VkResult<core::ffi::c_void> {
2260        let fp = self
2261            .commands()
2262            .acquire_xlib_display_ext
2263            .expect("vkAcquireXlibDisplayEXT not loaded");
2264        let mut out = unsafe { core::mem::zeroed() };
2265        check(unsafe { fp(physical_device, &mut out, display) })?;
2266        Ok(out)
2267    }
2268    ///Wraps [`vkGetRandROutputDisplayEXT`](https://registry.khronos.org/vulkan/specs/latest/man/html/vkGetRandROutputDisplayEXT.html).
2269    /**
2270    Provided by **VK_EXT_acquire_xlib_display**.*/
2271    ///
2272    ///# Errors
2273    ///- `VK_ERROR_OUT_OF_HOST_MEMORY`
2274    ///- `VK_ERROR_UNKNOWN`
2275    ///- `VK_ERROR_VALIDATION_FAILED`
2276    ///
2277    ///# Safety
2278    ///- `physicalDevice` (self) must be valid and not destroyed.
2279    ///
2280    ///# Panics
2281    ///Panics if `vkGetRandROutputDisplayEXT` was not loaded. This can happen if the required extension or Vulkan version is not enabled on the instance or device.
2282    ///
2283    ///# Usage Notes
2284    ///
2285    ///Maps an X11 RandR output to a Vulkan `DisplayKHR` handle. Use
2286    ///this to identify which Vulkan display corresponds to a specific
2287    ///RandR output when doing direct display rendering.
2288    ///
2289    ///Requires `VK_EXT_acquire_xlib_display`. Linux/X11 only.
2290    pub unsafe fn get_rand_r_output_display_ext(
2291        &self,
2292        physical_device: PhysicalDevice,
2293        dpy: *mut core::ffi::c_void,
2294        rr_output: core::ffi::c_ulong,
2295    ) -> VkResult<DisplayKHR> {
2296        let fp = self
2297            .commands()
2298            .get_rand_r_output_display_ext
2299            .expect("vkGetRandROutputDisplayEXT not loaded");
2300        let mut out = unsafe { core::mem::zeroed() };
2301        check(unsafe { fp(physical_device, dpy, rr_output, &mut out) })?;
2302        Ok(out)
2303    }
2304    ///Wraps [`vkAcquireWinrtDisplayNV`](https://registry.khronos.org/vulkan/specs/latest/man/html/vkAcquireWinrtDisplayNV.html).
2305    /**
2306    Provided by **VK_NV_acquire_winrt_display**.*/
2307    ///
2308    ///# Errors
2309    ///- `VK_ERROR_OUT_OF_HOST_MEMORY`
2310    ///- `VK_ERROR_DEVICE_LOST`
2311    ///- `VK_ERROR_INITIALIZATION_FAILED`
2312    ///- `VK_ERROR_UNKNOWN`
2313    ///- `VK_ERROR_VALIDATION_FAILED`
2314    ///
2315    ///# Safety
2316    ///- `physicalDevice` (self) must be valid and not destroyed.
2317    ///
2318    ///# Panics
2319    ///Panics if `vkAcquireWinrtDisplayNV` was not loaded. This can happen if the required extension or Vulkan version is not enabled on the instance or device.
2320    ///
2321    ///# Usage Notes
2322    ///
2323    ///Acquires exclusive ownership of a display using the Windows
2324    ///Runtime (WinRT) display interface. Windows only. The display
2325    ///must be released before another application can use it.
2326    ///
2327    ///Requires `VK_NV_acquire_winrt_display`.
2328    pub unsafe fn acquire_winrt_display_nv(
2329        &self,
2330        physical_device: PhysicalDevice,
2331        display: DisplayKHR,
2332    ) -> VkResult<()> {
2333        let fp = self
2334            .commands()
2335            .acquire_winrt_display_nv
2336            .expect("vkAcquireWinrtDisplayNV not loaded");
2337        check(unsafe { fp(physical_device, display) })
2338    }
2339    ///Wraps [`vkGetWinrtDisplayNV`](https://registry.khronos.org/vulkan/specs/latest/man/html/vkGetWinrtDisplayNV.html).
2340    /**
2341    Provided by **VK_NV_acquire_winrt_display**.*/
2342    ///
2343    ///# Errors
2344    ///- `VK_ERROR_OUT_OF_HOST_MEMORY`
2345    ///- `VK_ERROR_DEVICE_LOST`
2346    ///- `VK_ERROR_INITIALIZATION_FAILED`
2347    ///- `VK_ERROR_UNKNOWN`
2348    ///- `VK_ERROR_VALIDATION_FAILED`
2349    ///
2350    ///# Safety
2351    ///- `physicalDevice` (self) must be valid and not destroyed.
2352    ///
2353    ///# Panics
2354    ///Panics if `vkGetWinrtDisplayNV` was not loaded. This can happen if the required extension or Vulkan version is not enabled on the instance or device.
2355    ///
2356    ///# Usage Notes
2357    ///
2358    ///Gets a `DisplayKHR` handle for a WinRT display identified by
2359    ///its device-relative ID. Windows only. Use with
2360    ///`acquire_winrt_display_nv` for direct display access.
2361    ///
2362    ///Requires `VK_NV_acquire_winrt_display`.
2363    pub unsafe fn get_winrt_display_nv(
2364        &self,
2365        physical_device: PhysicalDevice,
2366        device_relative_id: u32,
2367    ) -> VkResult<DisplayKHR> {
2368        let fp = self
2369            .commands()
2370            .get_winrt_display_nv
2371            .expect("vkGetWinrtDisplayNV not loaded");
2372        let mut out = unsafe { core::mem::zeroed() };
2373        check(unsafe { fp(physical_device, device_relative_id, &mut out) })?;
2374        Ok(out)
2375    }
2376    ///Wraps [`vkGetPhysicalDeviceSurfaceCapabilities2EXT`](https://registry.khronos.org/vulkan/specs/latest/man/html/vkGetPhysicalDeviceSurfaceCapabilities2EXT.html).
2377    /**
2378    Provided by **VK_EXT_display_surface_counter**.*/
2379    ///
2380    ///# Errors
2381    ///- `VK_ERROR_OUT_OF_HOST_MEMORY`
2382    ///- `VK_ERROR_OUT_OF_DEVICE_MEMORY`
2383    ///- `VK_ERROR_SURFACE_LOST_KHR`
2384    ///- `VK_ERROR_UNKNOWN`
2385    ///- `VK_ERROR_VALIDATION_FAILED`
2386    ///
2387    ///# Safety
2388    ///- `physicalDevice` (self) must be valid and not destroyed.
2389    ///
2390    ///# Panics
2391    ///Panics if `vkGetPhysicalDeviceSurfaceCapabilities2EXT` was not loaded. This can happen if the required extension or Vulkan version is not enabled on the instance or device.
2392    ///
2393    ///# Usage Notes
2394    ///
2395    ///Queries surface capabilities with additional output fields
2396    ///compared to `get_physical_device_surface_capabilities_khr`.
2397    ///Returns a `SurfaceCapabilities2EXT` that includes shared
2398    ///present mode support flags.
2399    ///
2400    ///Prefer `get_physical_device_surface_capabilities2_khr` (KHR)
2401    ///for general use; this EXT variant is primarily for
2402    ///`VK_EXT_display_surface_counter` integration.
2403    ///
2404    ///Requires `VK_EXT_display_surface_counter`.
2405    pub unsafe fn get_physical_device_surface_capabilities2_ext(
2406        &self,
2407        physical_device: PhysicalDevice,
2408        surface: SurfaceKHR,
2409        p_surface_capabilities: &mut SurfaceCapabilities2EXT,
2410    ) -> VkResult<()> {
2411        let fp = self
2412            .commands()
2413            .get_physical_device_surface_capabilities2_ext
2414            .expect("vkGetPhysicalDeviceSurfaceCapabilities2EXT not loaded");
2415        check(unsafe { fp(physical_device, surface, p_surface_capabilities) })
2416    }
2417    ///Wraps [`vkEnumeratePhysicalDeviceGroups`](https://registry.khronos.org/vulkan/specs/latest/man/html/vkEnumeratePhysicalDeviceGroups.html).
2418    /**
2419    Provided by **VK_BASE_VERSION_1_1**.*/
2420    ///
2421    ///# Errors
2422    ///- `VK_ERROR_OUT_OF_HOST_MEMORY`
2423    ///- `VK_ERROR_OUT_OF_DEVICE_MEMORY`
2424    ///- `VK_ERROR_INITIALIZATION_FAILED`
2425    ///- `VK_ERROR_UNKNOWN`
2426    ///- `VK_ERROR_VALIDATION_FAILED`
2427    ///
2428    ///# Safety
2429    ///- `instance` (self) must be valid and not destroyed.
2430    ///
2431    ///# Panics
2432    ///Panics if `vkEnumeratePhysicalDeviceGroups` was not loaded. This can happen if the required extension or Vulkan version is not enabled on the instance or device.
2433    ///
2434    ///# Usage Notes
2435    ///
2436    ///Enumerates the available device groups, sets of physical devices
2437    ///that can be used together as a single logical device for multi-GPU
2438    ///rendering (e.g. SLI/CrossFire).
2439    ///
2440    ///Each `PhysicalDeviceGroupProperties` lists the physical devices in
2441    ///the group and whether the group supports memory allocation that
2442    ///spans all devices (`subset_allocation`).
2443    ///
2444    ///On single-GPU systems, this returns one group containing one device.
2445    ///
2446    ///To use a device group, pass `DeviceGroupDeviceCreateInfo` in the
2447    ///pNext chain of `DeviceCreateInfo` with the desired physical devices.
2448    ///This is an advanced multi-GPU feature; most applications use a
2449    ///single physical device.
2450    pub unsafe fn enumerate_physical_device_groups(
2451        &self,
2452    ) -> VkResult<Vec<PhysicalDeviceGroupProperties>> {
2453        let fp = self
2454            .commands()
2455            .enumerate_physical_device_groups
2456            .expect("vkEnumeratePhysicalDeviceGroups not loaded");
2457        enumerate_two_call(|count, data| unsafe { fp(self.handle(), count, data) })
2458    }
2459    ///Wraps [`vkGetPhysicalDevicePresentRectanglesKHR`](https://registry.khronos.org/vulkan/specs/latest/man/html/vkGetPhysicalDevicePresentRectanglesKHR.html).
2460    /**
2461    Provided by **VK_KHR_swapchain**.*/
2462    ///
2463    ///# Errors
2464    ///- `VK_ERROR_OUT_OF_HOST_MEMORY`
2465    ///- `VK_ERROR_OUT_OF_DEVICE_MEMORY`
2466    ///- `VK_ERROR_UNKNOWN`
2467    ///- `VK_ERROR_VALIDATION_FAILED`
2468    ///
2469    ///# Safety
2470    ///- `physicalDevice` (self) must be valid and not destroyed.
2471    ///- `surface` must be externally synchronized.
2472    ///
2473    ///# Panics
2474    ///Panics if `vkGetPhysicalDevicePresentRectanglesKHR` was not loaded. This can happen if the required extension or Vulkan version is not enabled on the instance or device.
2475    ///
2476    ///# Usage Notes
2477    ///
2478    ///Returns the set of rectangular regions that cover the presentable
2479    ///area of a surface for a device group. Each rectangle represents a
2480    ///region that one physical device in the group is responsible for
2481    ///presenting.
2482    ///
2483    ///Only relevant for multi-GPU device groups with
2484    ///`DEVICE_GROUP_PRESENT_MODE_LOCAL_MULTI_DEVICE`. On single-GPU
2485    ///systems, this returns a single rectangle covering the entire
2486    ///surface.
2487    pub unsafe fn get_physical_device_present_rectangles_khr(
2488        &self,
2489        physical_device: PhysicalDevice,
2490        surface: SurfaceKHR,
2491    ) -> VkResult<Vec<Rect2D>> {
2492        let fp = self
2493            .commands()
2494            .get_physical_device_present_rectangles_khr
2495            .expect("vkGetPhysicalDevicePresentRectanglesKHR not loaded");
2496        enumerate_two_call(|count, data| unsafe { fp(physical_device, surface, count, data) })
2497    }
2498    ///Wraps [`vkCreateIOSSurfaceMVK`](https://registry.khronos.org/vulkan/specs/latest/man/html/vkCreateIOSSurfaceMVK.html).
2499    /**
2500    Provided by **VK_MVK_ios_surface**.*/
2501    ///
2502    ///# Errors
2503    ///- `VK_ERROR_OUT_OF_HOST_MEMORY`
2504    ///- `VK_ERROR_OUT_OF_DEVICE_MEMORY`
2505    ///- `VK_ERROR_NATIVE_WINDOW_IN_USE_KHR`
2506    ///- `VK_ERROR_UNKNOWN`
2507    ///- `VK_ERROR_VALIDATION_FAILED`
2508    ///
2509    ///# Safety
2510    ///- `instance` (self) must be valid and not destroyed.
2511    ///
2512    ///# Panics
2513    ///Panics if `vkCreateIOSSurfaceMVK` was not loaded. This can happen if the required extension or Vulkan version is not enabled on the instance or device.
2514    ///
2515    ///# Usage Notes
2516    ///
2517    ///Creates a Vulkan surface for an iOS `UIView`. iOS only. Legacy
2518    ///MoltenVK path, prefer `VK_EXT_metal_surface` with
2519    ///`create_metal_surface_ext` on modern MoltenVK.
2520    ///
2521    ///Requires `VK_MVK_ios_surface`.
2522    pub unsafe fn create_ios_surface_mvk(
2523        &self,
2524        p_create_info: &IOSSurfaceCreateInfoMVK,
2525        allocator: Option<&AllocationCallbacks>,
2526    ) -> VkResult<SurfaceKHR> {
2527        let fp = self
2528            .commands()
2529            .create_ios_surface_mvk
2530            .expect("vkCreateIOSSurfaceMVK not loaded");
2531        let alloc_ptr = allocator.map_or(core::ptr::null(), core::ptr::from_ref);
2532        let mut out = unsafe { core::mem::zeroed() };
2533        check(unsafe { fp(self.handle(), p_create_info, alloc_ptr, &mut out) })?;
2534        Ok(out)
2535    }
2536    ///Wraps [`vkCreateMacOSSurfaceMVK`](https://registry.khronos.org/vulkan/specs/latest/man/html/vkCreateMacOSSurfaceMVK.html).
2537    /**
2538    Provided by **VK_MVK_macos_surface**.*/
2539    ///
2540    ///# Errors
2541    ///- `VK_ERROR_OUT_OF_HOST_MEMORY`
2542    ///- `VK_ERROR_OUT_OF_DEVICE_MEMORY`
2543    ///- `VK_ERROR_NATIVE_WINDOW_IN_USE_KHR`
2544    ///- `VK_ERROR_UNKNOWN`
2545    ///- `VK_ERROR_VALIDATION_FAILED`
2546    ///
2547    ///# Safety
2548    ///- `instance` (self) must be valid and not destroyed.
2549    ///
2550    ///# Panics
2551    ///Panics if `vkCreateMacOSSurfaceMVK` was not loaded. This can happen if the required extension or Vulkan version is not enabled on the instance or device.
2552    ///
2553    ///# Usage Notes
2554    ///
2555    ///Creates a Vulkan surface for a macOS `NSView`. macOS only.
2556    ///Legacy MoltenVK path, prefer `VK_EXT_metal_surface` with
2557    ///`create_metal_surface_ext` on modern MoltenVK.
2558    ///
2559    ///Requires `VK_MVK_macos_surface`.
2560    pub unsafe fn create_mac_os_surface_mvk(
2561        &self,
2562        p_create_info: &MacOSSurfaceCreateInfoMVK,
2563        allocator: Option<&AllocationCallbacks>,
2564    ) -> VkResult<SurfaceKHR> {
2565        let fp = self
2566            .commands()
2567            .create_mac_os_surface_mvk
2568            .expect("vkCreateMacOSSurfaceMVK not loaded");
2569        let alloc_ptr = allocator.map_or(core::ptr::null(), core::ptr::from_ref);
2570        let mut out = unsafe { core::mem::zeroed() };
2571        check(unsafe { fp(self.handle(), p_create_info, alloc_ptr, &mut out) })?;
2572        Ok(out)
2573    }
2574    ///Wraps [`vkGetPhysicalDeviceMultisamplePropertiesEXT`](https://registry.khronos.org/vulkan/specs/latest/man/html/vkGetPhysicalDeviceMultisamplePropertiesEXT.html).
2575    /**
2576    Provided by **VK_EXT_sample_locations**.*/
2577    ///
2578    ///# Safety
2579    ///- `physicalDevice` (self) must be valid and not destroyed.
2580    ///
2581    ///# Panics
2582    ///Panics if `vkGetPhysicalDeviceMultisamplePropertiesEXT` was not loaded. This can happen if the required extension or Vulkan version is not enabled on the instance or device.
2583    ///
2584    ///# Usage Notes
2585    ///
2586    ///Queries the multisample properties for a specific sample count
2587    ///on the physical device. Returns the maximum sample location grid
2588    ///size in `MultisamplePropertiesEXT`.
2589    ///
2590    ///Use this to determine valid grid sizes for
2591    ///`cmd_set_sample_locations_ext`.
2592    ///
2593    ///Requires `VK_EXT_sample_locations`.
2594    pub unsafe fn get_physical_device_multisample_properties_ext(
2595        &self,
2596        physical_device: PhysicalDevice,
2597        samples: SampleCountFlagBits,
2598        p_multisample_properties: &mut MultisamplePropertiesEXT,
2599    ) {
2600        let fp = self
2601            .commands()
2602            .get_physical_device_multisample_properties_ext
2603            .expect("vkGetPhysicalDeviceMultisamplePropertiesEXT not loaded");
2604        unsafe { fp(physical_device, samples, p_multisample_properties) };
2605    }
2606    ///Wraps [`vkGetPhysicalDeviceSurfaceCapabilities2KHR`](https://registry.khronos.org/vulkan/specs/latest/man/html/vkGetPhysicalDeviceSurfaceCapabilities2KHR.html).
2607    /**
2608    Provided by **VK_KHR_get_surface_capabilities2**.*/
2609    ///
2610    ///# Errors
2611    ///- `VK_ERROR_OUT_OF_HOST_MEMORY`
2612    ///- `VK_ERROR_OUT_OF_DEVICE_MEMORY`
2613    ///- `VK_ERROR_SURFACE_LOST_KHR`
2614    ///- `VK_ERROR_UNKNOWN`
2615    ///- `VK_ERROR_VALIDATION_FAILED`
2616    ///
2617    ///# Safety
2618    ///- `physicalDevice` (self) must be valid and not destroyed.
2619    ///
2620    ///# Panics
2621    ///Panics if `vkGetPhysicalDeviceSurfaceCapabilities2KHR` was not loaded. This can happen if the required extension or Vulkan version is not enabled on the instance or device.
2622    ///
2623    ///# Usage Notes
2624    ///
2625    ///Extensible version of
2626    ///`get_physical_device_surface_capabilities_khr`. Takes a
2627    ///`PhysicalDeviceSurfaceInfo2KHR` input and writes to
2628    ///`SurfaceCapabilities2KHR`, both supporting `pNext` chains.
2629    ///
2630    ///Chain `SurfaceProtectedCapabilitiesKHR` or other extension
2631    ///structs into the output `pNext` to query additional capabilities
2632    ///not available through the v1 query.
2633    ///
2634    ///Provided by `VK_KHR_get_surface_capabilities2`. Prefer this over
2635    ///the v1 query when available.
2636    pub unsafe fn get_physical_device_surface_capabilities2_khr(
2637        &self,
2638        physical_device: PhysicalDevice,
2639        p_surface_info: &PhysicalDeviceSurfaceInfo2KHR,
2640        p_surface_capabilities: &mut SurfaceCapabilities2KHR,
2641    ) -> VkResult<()> {
2642        let fp = self
2643            .commands()
2644            .get_physical_device_surface_capabilities2_khr
2645            .expect("vkGetPhysicalDeviceSurfaceCapabilities2KHR not loaded");
2646        check(unsafe { fp(physical_device, p_surface_info, p_surface_capabilities) })
2647    }
2648    ///Wraps [`vkGetPhysicalDeviceSurfaceFormats2KHR`](https://registry.khronos.org/vulkan/specs/latest/man/html/vkGetPhysicalDeviceSurfaceFormats2KHR.html).
2649    /**
2650    Provided by **VK_KHR_get_surface_capabilities2**.*/
2651    ///
2652    ///# Errors
2653    ///- `VK_ERROR_OUT_OF_HOST_MEMORY`
2654    ///- `VK_ERROR_OUT_OF_DEVICE_MEMORY`
2655    ///- `VK_ERROR_SURFACE_LOST_KHR`
2656    ///- `VK_ERROR_UNKNOWN`
2657    ///- `VK_ERROR_VALIDATION_FAILED`
2658    ///
2659    ///# Safety
2660    ///- `physicalDevice` (self) must be valid and not destroyed.
2661    ///
2662    ///# Panics
2663    ///Panics if `vkGetPhysicalDeviceSurfaceFormats2KHR` was not loaded. This can happen if the required extension or Vulkan version is not enabled on the instance or device.
2664    ///
2665    ///# Usage Notes
2666    ///
2667    ///Extensible version of
2668    ///`get_physical_device_surface_formats_khr`. Returns
2669    ///`SurfaceFormat2KHR` with `pNext` support, allowing extensions
2670    ///to attach additional per-format information.
2671    ///
2672    ///Takes `PhysicalDeviceSurfaceInfo2KHR` as input so you can query
2673    ///formats for a specific surface configuration (e.g., with
2674    ///full-screen exclusive info chained in).
2675    ///
2676    ///Provided by `VK_KHR_get_surface_capabilities2`. Prefer this over
2677    ///the v1 query when available.
2678    pub unsafe fn get_physical_device_surface_formats2_khr(
2679        &self,
2680        physical_device: PhysicalDevice,
2681        p_surface_info: &PhysicalDeviceSurfaceInfo2KHR,
2682    ) -> VkResult<Vec<SurfaceFormat2KHR>> {
2683        let fp = self
2684            .commands()
2685            .get_physical_device_surface_formats2_khr
2686            .expect("vkGetPhysicalDeviceSurfaceFormats2KHR not loaded");
2687        enumerate_two_call(|count, data| unsafe {
2688            fp(physical_device, p_surface_info, count, data)
2689        })
2690    }
2691    ///Wraps [`vkGetPhysicalDeviceDisplayProperties2KHR`](https://registry.khronos.org/vulkan/specs/latest/man/html/vkGetPhysicalDeviceDisplayProperties2KHR.html).
2692    /**
2693    Provided by **VK_KHR_get_display_properties2**.*/
2694    ///
2695    ///# Errors
2696    ///- `VK_ERROR_OUT_OF_HOST_MEMORY`
2697    ///- `VK_ERROR_OUT_OF_DEVICE_MEMORY`
2698    ///- `VK_ERROR_UNKNOWN`
2699    ///- `VK_ERROR_VALIDATION_FAILED`
2700    ///
2701    ///# Safety
2702    ///- `physicalDevice` (self) must be valid and not destroyed.
2703    ///
2704    ///# Panics
2705    ///Panics if `vkGetPhysicalDeviceDisplayProperties2KHR` was not loaded. This can happen if the required extension or Vulkan version is not enabled on the instance or device.
2706    ///
2707    ///# Usage Notes
2708    ///
2709    ///Extensible version of `get_physical_device_display_properties_khr`.
2710    ///Returns `DisplayProperties2KHR` which wraps the original
2711    ///properties and supports `pNext` extensions.
2712    ///
2713    ///Provided by `VK_KHR_get_display_properties2`. Prefer this over
2714    ///the v1 query when available.
2715    pub unsafe fn get_physical_device_display_properties2_khr(
2716        &self,
2717        physical_device: PhysicalDevice,
2718    ) -> VkResult<Vec<DisplayProperties2KHR>> {
2719        let fp = self
2720            .commands()
2721            .get_physical_device_display_properties2_khr
2722            .expect("vkGetPhysicalDeviceDisplayProperties2KHR not loaded");
2723        enumerate_two_call(|count, data| unsafe { fp(physical_device, count, data) })
2724    }
2725    ///Wraps [`vkGetPhysicalDeviceDisplayPlaneProperties2KHR`](https://registry.khronos.org/vulkan/specs/latest/man/html/vkGetPhysicalDeviceDisplayPlaneProperties2KHR.html).
2726    /**
2727    Provided by **VK_KHR_get_display_properties2**.*/
2728    ///
2729    ///# Errors
2730    ///- `VK_ERROR_OUT_OF_HOST_MEMORY`
2731    ///- `VK_ERROR_OUT_OF_DEVICE_MEMORY`
2732    ///- `VK_ERROR_UNKNOWN`
2733    ///- `VK_ERROR_VALIDATION_FAILED`
2734    ///
2735    ///# Safety
2736    ///- `physicalDevice` (self) must be valid and not destroyed.
2737    ///
2738    ///# Panics
2739    ///Panics if `vkGetPhysicalDeviceDisplayPlaneProperties2KHR` was not loaded. This can happen if the required extension or Vulkan version is not enabled on the instance or device.
2740    ///
2741    ///# Usage Notes
2742    ///
2743    ///Extensible version of
2744    ///`get_physical_device_display_plane_properties_khr`. Returns
2745    ///`DisplayPlaneProperties2KHR` with `pNext` support.
2746    ///
2747    ///Provided by `VK_KHR_get_display_properties2`. Prefer this over
2748    ///the v1 query when available.
2749    pub unsafe fn get_physical_device_display_plane_properties2_khr(
2750        &self,
2751        physical_device: PhysicalDevice,
2752    ) -> VkResult<Vec<DisplayPlaneProperties2KHR>> {
2753        let fp = self
2754            .commands()
2755            .get_physical_device_display_plane_properties2_khr
2756            .expect("vkGetPhysicalDeviceDisplayPlaneProperties2KHR not loaded");
2757        enumerate_two_call(|count, data| unsafe { fp(physical_device, count, data) })
2758    }
2759    ///Wraps [`vkGetDisplayModeProperties2KHR`](https://registry.khronos.org/vulkan/specs/latest/man/html/vkGetDisplayModeProperties2KHR.html).
2760    /**
2761    Provided by **VK_KHR_get_display_properties2**.*/
2762    ///
2763    ///# Errors
2764    ///- `VK_ERROR_OUT_OF_HOST_MEMORY`
2765    ///- `VK_ERROR_OUT_OF_DEVICE_MEMORY`
2766    ///- `VK_ERROR_UNKNOWN`
2767    ///- `VK_ERROR_VALIDATION_FAILED`
2768    ///
2769    ///# Safety
2770    ///- `physicalDevice` (self) must be valid and not destroyed.
2771    ///
2772    ///# Panics
2773    ///Panics if `vkGetDisplayModeProperties2KHR` was not loaded. This can happen if the required extension or Vulkan version is not enabled on the instance or device.
2774    ///
2775    ///# Usage Notes
2776    ///
2777    ///Extensible version of `get_display_mode_properties_khr`. Returns
2778    ///`DisplayModeProperties2KHR` with `pNext` support.
2779    ///
2780    ///Provided by `VK_KHR_get_display_properties2`. Prefer this over
2781    ///the v1 query when available.
2782    pub unsafe fn get_display_mode_properties2_khr(
2783        &self,
2784        physical_device: PhysicalDevice,
2785        display: DisplayKHR,
2786    ) -> VkResult<Vec<DisplayModeProperties2KHR>> {
2787        let fp = self
2788            .commands()
2789            .get_display_mode_properties2_khr
2790            .expect("vkGetDisplayModeProperties2KHR not loaded");
2791        enumerate_two_call(|count, data| unsafe { fp(physical_device, display, count, data) })
2792    }
2793    ///Wraps [`vkGetDisplayPlaneCapabilities2KHR`](https://registry.khronos.org/vulkan/specs/latest/man/html/vkGetDisplayPlaneCapabilities2KHR.html).
2794    /**
2795    Provided by **VK_KHR_get_display_properties2**.*/
2796    ///
2797    ///# Errors
2798    ///- `VK_ERROR_OUT_OF_HOST_MEMORY`
2799    ///- `VK_ERROR_OUT_OF_DEVICE_MEMORY`
2800    ///- `VK_ERROR_UNKNOWN`
2801    ///- `VK_ERROR_VALIDATION_FAILED`
2802    ///
2803    ///# Safety
2804    ///- `physicalDevice` (self) must be valid and not destroyed.
2805    ///
2806    ///# Panics
2807    ///Panics if `vkGetDisplayPlaneCapabilities2KHR` was not loaded. This can happen if the required extension or Vulkan version is not enabled on the instance or device.
2808    ///
2809    ///# Usage Notes
2810    ///
2811    ///Extensible version of `get_display_plane_capabilities_khr`.
2812    ///Takes `DisplayPlaneInfo2KHR` (with `pNext` for input extensions)
2813    ///and writes to `DisplayPlaneCapabilities2KHR` (with `pNext` for
2814    ///output extensions).
2815    ///
2816    ///Provided by `VK_KHR_get_display_properties2`. Prefer this over
2817    ///the v1 query when available.
2818    pub unsafe fn get_display_plane_capabilities2_khr(
2819        &self,
2820        physical_device: PhysicalDevice,
2821        p_display_plane_info: &DisplayPlaneInfo2KHR,
2822        p_capabilities: &mut DisplayPlaneCapabilities2KHR,
2823    ) -> VkResult<()> {
2824        let fp = self
2825            .commands()
2826            .get_display_plane_capabilities2_khr
2827            .expect("vkGetDisplayPlaneCapabilities2KHR not loaded");
2828        check(unsafe { fp(physical_device, p_display_plane_info, p_capabilities) })
2829    }
2830    ///Wraps [`vkGetPhysicalDeviceCalibrateableTimeDomainsKHR`](https://registry.khronos.org/vulkan/specs/latest/man/html/vkGetPhysicalDeviceCalibrateableTimeDomainsKHR.html).
2831    /**
2832    Provided by **VK_KHR_calibrated_timestamps**.*/
2833    ///
2834    ///# Errors
2835    ///- `VK_ERROR_OUT_OF_HOST_MEMORY`
2836    ///- `VK_ERROR_OUT_OF_DEVICE_MEMORY`
2837    ///- `VK_ERROR_UNKNOWN`
2838    ///- `VK_ERROR_VALIDATION_FAILED`
2839    ///
2840    ///# Safety
2841    ///- `physicalDevice` (self) must be valid and not destroyed.
2842    ///
2843    ///# Panics
2844    ///Panics if `vkGetPhysicalDeviceCalibrateableTimeDomainsKHR` was not loaded. This can happen if the required extension or Vulkan version is not enabled on the instance or device.
2845    ///
2846    ///# Usage Notes
2847    ///
2848    ///Enumerates the time domains that can be used with
2849    ///`get_calibrated_timestamps_khr` on this physical device.
2850    ///
2851    ///Common time domains include:
2852    ///
2853    ///- `DEVICE`: GPU timestamp counter (same as `cmd_write_timestamp2`).
2854    ///- `CLOCK_MONOTONIC` / `CLOCK_MONOTONIC_RAW`: Linux monotonic
2855    ///  clocks.
2856    ///- `QUERY_PERFORMANCE_COUNTER`: Windows high-resolution timer.
2857    ///
2858    ///The device time domain is always available. Host time domains
2859    ///depend on the platform.
2860    pub unsafe fn get_physical_device_calibrateable_time_domains_khr(
2861        &self,
2862        physical_device: PhysicalDevice,
2863    ) -> VkResult<Vec<TimeDomainKHR>> {
2864        let fp = self
2865            .commands()
2866            .get_physical_device_calibrateable_time_domains_khr
2867            .expect("vkGetPhysicalDeviceCalibrateableTimeDomainsKHR not loaded");
2868        enumerate_two_call(|count, data| unsafe { fp(physical_device, count, data) })
2869    }
2870    ///Wraps [`vkCreateDebugUtilsMessengerEXT`](https://registry.khronos.org/vulkan/specs/latest/man/html/vkCreateDebugUtilsMessengerEXT.html).
2871    /**
2872    Provided by **VK_EXT_debug_utils**.*/
2873    ///
2874    ///# Errors
2875    ///- `VK_ERROR_OUT_OF_HOST_MEMORY`
2876    ///- `VK_ERROR_UNKNOWN`
2877    ///- `VK_ERROR_VALIDATION_FAILED`
2878    ///
2879    ///# Safety
2880    ///- `instance` (self) must be valid and not destroyed.
2881    ///
2882    ///# Panics
2883    ///Panics if `vkCreateDebugUtilsMessengerEXT` was not loaded. This can happen if the required extension or Vulkan version is not enabled on the instance or device.
2884    ///
2885    ///# Usage Notes
2886    ///
2887    ///Creates a debug messenger that receives validation layer messages,
2888    ///performance warnings, and general debug info via a user-provided
2889    ///callback.
2890    ///
2891    ///`DebugUtilsMessengerCreateInfoEXT` configures:
2892    ///- `message_severity`: which severities to receive (verbose, info,
2893    ///  warning, error).
2894    ///- `message_type`: which categories (general, validation,
2895    ///  performance).
2896    ///- `pfn_user_callback`: your callback function.
2897    ///
2898    ///Create the messenger immediately after the instance for maximum
2899    ///coverage. Destroy with `destroy_debug_utils_messenger_ext`.
2900    ///
2901    ///Requires `VK_EXT_debug_utils`. Supersedes `VK_EXT_debug_report`.
2902    pub unsafe fn create_debug_utils_messenger_ext(
2903        &self,
2904        p_create_info: &DebugUtilsMessengerCreateInfoEXT,
2905        allocator: Option<&AllocationCallbacks>,
2906    ) -> VkResult<DebugUtilsMessengerEXT> {
2907        let fp = self
2908            .commands()
2909            .create_debug_utils_messenger_ext
2910            .expect("vkCreateDebugUtilsMessengerEXT not loaded");
2911        let alloc_ptr = allocator.map_or(core::ptr::null(), core::ptr::from_ref);
2912        let mut out = unsafe { core::mem::zeroed() };
2913        check(unsafe { fp(self.handle(), p_create_info, alloc_ptr, &mut out) })?;
2914        Ok(out)
2915    }
2916    ///Wraps [`vkDestroyDebugUtilsMessengerEXT`](https://registry.khronos.org/vulkan/specs/latest/man/html/vkDestroyDebugUtilsMessengerEXT.html).
2917    /**
2918    Provided by **VK_EXT_debug_utils**.*/
2919    ///
2920    ///# Safety
2921    ///- `instance` (self) must be valid and not destroyed.
2922    ///- `messenger` must be externally synchronized.
2923    ///
2924    ///# Panics
2925    ///Panics if `vkDestroyDebugUtilsMessengerEXT` was not loaded. This can happen if the required extension or Vulkan version is not enabled on the instance or device.
2926    ///
2927    ///# Usage Notes
2928    ///
2929    ///Destroys a debug messenger created with
2930    ///`create_debug_utils_messenger_ext`. After this call, the
2931    ///messenger's callback will no longer be invoked.
2932    ///
2933    ///Destroy before the instance is destroyed.
2934    ///
2935    ///Requires `VK_EXT_debug_utils`.
2936    pub unsafe fn destroy_debug_utils_messenger_ext(
2937        &self,
2938        messenger: DebugUtilsMessengerEXT,
2939        allocator: Option<&AllocationCallbacks>,
2940    ) {
2941        let fp = self
2942            .commands()
2943            .destroy_debug_utils_messenger_ext
2944            .expect("vkDestroyDebugUtilsMessengerEXT not loaded");
2945        let alloc_ptr = allocator.map_or(core::ptr::null(), core::ptr::from_ref);
2946        unsafe { fp(self.handle(), messenger, alloc_ptr) };
2947    }
2948    ///Wraps [`vkSubmitDebugUtilsMessageEXT`](https://registry.khronos.org/vulkan/specs/latest/man/html/vkSubmitDebugUtilsMessageEXT.html).
2949    /**
2950    Provided by **VK_EXT_debug_utils**.*/
2951    ///
2952    ///# Safety
2953    ///- `instance` (self) must be valid and not destroyed.
2954    ///
2955    ///# Panics
2956    ///Panics if `vkSubmitDebugUtilsMessageEXT` was not loaded. This can happen if the required extension or Vulkan version is not enabled on the instance or device.
2957    ///
2958    ///# Usage Notes
2959    ///
2960    ///Manually injects a debug message into the debug utils callback
2961    ///chain. The message is delivered to all active debug messengers
2962    ///that match the specified severity and type flags.
2963    ///
2964    ///Useful for application-level diagnostics, e.g., logging a
2965    ///warning when a resource limit is approached.
2966    ///
2967    ///The `DebugUtilsMessengerCallbackDataEXT` carries the message
2968    ///string, message ID, and optional object labels/queue labels for
2969    ///context.
2970    ///
2971    ///Requires `VK_EXT_debug_utils`.
2972    pub unsafe fn submit_debug_utils_message_ext(
2973        &self,
2974        message_severity: DebugUtilsMessageSeverityFlagBitsEXT,
2975        message_types: DebugUtilsMessageTypeFlagsEXT,
2976        p_callback_data: &DebugUtilsMessengerCallbackDataEXT,
2977    ) {
2978        let fp = self
2979            .commands()
2980            .submit_debug_utils_message_ext
2981            .expect("vkSubmitDebugUtilsMessageEXT not loaded");
2982        unsafe {
2983            fp(
2984                self.handle(),
2985                message_severity,
2986                message_types,
2987                p_callback_data,
2988            )
2989        };
2990    }
2991    ///Wraps [`vkGetPhysicalDeviceCooperativeMatrixPropertiesNV`](https://registry.khronos.org/vulkan/specs/latest/man/html/vkGetPhysicalDeviceCooperativeMatrixPropertiesNV.html).
2992    /**
2993    Provided by **VK_NV_cooperative_matrix**.*/
2994    ///
2995    ///# Errors
2996    ///- `VK_ERROR_OUT_OF_HOST_MEMORY`
2997    ///- `VK_ERROR_OUT_OF_DEVICE_MEMORY`
2998    ///- `VK_ERROR_UNKNOWN`
2999    ///- `VK_ERROR_VALIDATION_FAILED`
3000    ///
3001    ///# Safety
3002    ///- `physicalDevice` (self) must be valid and not destroyed.
3003    ///
3004    ///# Panics
3005    ///Panics if `vkGetPhysicalDeviceCooperativeMatrixPropertiesNV` was not loaded. This can happen if the required extension or Vulkan version is not enabled on the instance or device.
3006    ///
3007    ///# Usage Notes
3008    ///
3009    ///Enumerates the cooperative matrix types and sizes supported by
3010    ///the physical device. Uses the two-call idiom. Legacy NV path,
3011    ///prefer `get_physical_device_cooperative_matrix_properties_khr`.
3012    ///
3013    ///Requires `VK_NV_cooperative_matrix`.
3014    pub unsafe fn get_physical_device_cooperative_matrix_properties_nv(
3015        &self,
3016        physical_device: PhysicalDevice,
3017    ) -> VkResult<Vec<CooperativeMatrixPropertiesNV>> {
3018        let fp = self
3019            .commands()
3020            .get_physical_device_cooperative_matrix_properties_nv
3021            .expect("vkGetPhysicalDeviceCooperativeMatrixPropertiesNV not loaded");
3022        enumerate_two_call(|count, data| unsafe { fp(physical_device, count, data) })
3023    }
3024    ///Wraps [`vkGetPhysicalDeviceSurfacePresentModes2EXT`](https://registry.khronos.org/vulkan/specs/latest/man/html/vkGetPhysicalDeviceSurfacePresentModes2EXT.html).
3025    /**
3026    Provided by **VK_EXT_full_screen_exclusive**.*/
3027    ///
3028    ///# Errors
3029    ///- `VK_ERROR_OUT_OF_HOST_MEMORY`
3030    ///- `VK_ERROR_OUT_OF_DEVICE_MEMORY`
3031    ///- `VK_ERROR_SURFACE_LOST_KHR`
3032    ///- `VK_ERROR_UNKNOWN`
3033    ///- `VK_ERROR_VALIDATION_FAILED`
3034    ///
3035    ///# Safety
3036    ///- `physicalDevice` (self) must be valid and not destroyed.
3037    ///
3038    ///# Panics
3039    ///Panics if `vkGetPhysicalDeviceSurfacePresentModes2EXT` was not loaded. This can happen if the required extension or Vulkan version is not enabled on the instance or device.
3040    ///
3041    ///# Usage Notes
3042    ///
3043    ///Queries the supported present modes for a physical device and
3044    ///surface, using the extended surface info structure. This is the
3045    ///`VK_EXT_full_screen_exclusive` variant of
3046    ///`get_physical_device_surface_present_modes_khr`, allowing
3047    ///full-screen exclusive configuration to influence the result.
3048    ///
3049    ///Requires `VK_EXT_full_screen_exclusive`. Windows only.
3050    pub unsafe fn get_physical_device_surface_present_modes2_ext(
3051        &self,
3052        physical_device: PhysicalDevice,
3053        p_surface_info: &PhysicalDeviceSurfaceInfo2KHR,
3054    ) -> VkResult<Vec<PresentModeKHR>> {
3055        let fp = self
3056            .commands()
3057            .get_physical_device_surface_present_modes2_ext
3058            .expect("vkGetPhysicalDeviceSurfacePresentModes2EXT not loaded");
3059        enumerate_two_call(|count, data| unsafe {
3060            fp(physical_device, p_surface_info, count, data)
3061        })
3062    }
3063    ///Wraps [`vkEnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR`](https://registry.khronos.org/vulkan/specs/latest/man/html/vkEnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR.html).
3064    /**
3065    Provided by **VK_KHR_performance_query**.*/
3066    ///
3067    ///# Errors
3068    ///- `VK_ERROR_OUT_OF_HOST_MEMORY`
3069    ///- `VK_ERROR_OUT_OF_DEVICE_MEMORY`
3070    ///- `VK_ERROR_INITIALIZATION_FAILED`
3071    ///- `VK_ERROR_UNKNOWN`
3072    ///- `VK_ERROR_VALIDATION_FAILED`
3073    ///
3074    ///# Safety
3075    ///- `physicalDevice` (self) must be valid and not destroyed.
3076    ///
3077    ///# Panics
3078    ///Panics if `vkEnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR` was not loaded. This can happen if the required extension or Vulkan version is not enabled on the instance or device.
3079    ///
3080    ///# Usage Notes
3081    ///
3082    ///Enumerates the performance counters available for a specific queue
3083    ///family on a physical device. Returns `PerformanceCounterKHR`
3084    ///structs (counter unit, storage type, UUID) and optionally fills
3085    ///`PerformanceCounterDescriptionKHR` with human-readable names and
3086    ///descriptions.
3087    ///
3088    ///Use the counter indices when creating a performance query pool
3089    ///with `QueryPoolPerformanceCreateInfoKHR`.
3090    ///
3091    ///Requires `VK_KHR_performance_query`.
3092    pub unsafe fn enumerate_physical_device_queue_family_performance_query_counters_khr(
3093        &self,
3094        physical_device: PhysicalDevice,
3095        queue_family_index: u32,
3096        p_counter_descriptions: *mut PerformanceCounterDescriptionKHR,
3097    ) -> VkResult<Vec<PerformanceCounterKHR>> {
3098        let fp = self
3099            .commands()
3100            .enumerate_physical_device_queue_family_performance_query_counters_khr
3101            .expect("vkEnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR not loaded");
3102        enumerate_two_call(|count, data| unsafe {
3103            fp(
3104                physical_device,
3105                queue_family_index,
3106                count,
3107                data,
3108                p_counter_descriptions,
3109            )
3110        })
3111    }
3112    ///Wraps [`vkGetPhysicalDeviceQueueFamilyPerformanceQueryPassesKHR`](https://registry.khronos.org/vulkan/specs/latest/man/html/vkGetPhysicalDeviceQueueFamilyPerformanceQueryPassesKHR.html).
3113    /**
3114    Provided by **VK_KHR_performance_query**.*/
3115    ///
3116    ///# Safety
3117    ///- `physicalDevice` (self) must be valid and not destroyed.
3118    ///
3119    ///# Panics
3120    ///Panics if `vkGetPhysicalDeviceQueueFamilyPerformanceQueryPassesKHR` was not loaded. This can happen if the required extension or Vulkan version is not enabled on the instance or device.
3121    ///
3122    ///# Usage Notes
3123    ///
3124    ///Returns the number of passes required to collect all the
3125    ///performance counters specified in
3126    ///`QueryPoolPerformanceCreateInfoKHR`.
3127    ///
3128    ///Hardware can typically sample only a limited number of counters
3129    ///per pass. If this returns N, you must submit the same command
3130    ///buffer N times (each with a different pass index set via
3131    ///`PerformanceQuerySubmitInfoKHR` in the pNext of
3132    ///`SubmitInfo`/`SubmitInfo2`) to collect all results.
3133    ///
3134    ///Requires `VK_KHR_performance_query`.
3135    pub unsafe fn get_physical_device_queue_family_performance_query_passes_khr(
3136        &self,
3137        physical_device: PhysicalDevice,
3138        p_performance_query_create_info: &QueryPoolPerformanceCreateInfoKHR,
3139    ) -> u32 {
3140        let fp = self
3141            .commands()
3142            .get_physical_device_queue_family_performance_query_passes_khr
3143            .expect("vkGetPhysicalDeviceQueueFamilyPerformanceQueryPassesKHR not loaded");
3144        let mut out = unsafe { core::mem::zeroed() };
3145        unsafe { fp(physical_device, p_performance_query_create_info, &mut out) };
3146        out
3147    }
3148    ///Wraps [`vkCreateHeadlessSurfaceEXT`](https://registry.khronos.org/vulkan/specs/latest/man/html/vkCreateHeadlessSurfaceEXT.html).
3149    /**
3150    Provided by **VK_EXT_headless_surface**.*/
3151    ///
3152    ///# Errors
3153    ///- `VK_ERROR_OUT_OF_HOST_MEMORY`
3154    ///- `VK_ERROR_OUT_OF_DEVICE_MEMORY`
3155    ///- `VK_ERROR_UNKNOWN`
3156    ///- `VK_ERROR_VALIDATION_FAILED`
3157    ///
3158    ///# Safety
3159    ///- `instance` (self) must be valid and not destroyed.
3160    ///
3161    ///# Panics
3162    ///Panics if `vkCreateHeadlessSurfaceEXT` was not loaded. This can happen if the required extension or Vulkan version is not enabled on the instance or device.
3163    ///
3164    ///# Usage Notes
3165    ///
3166    ///Creates a headless surface that is not associated with any window
3167    ///system. Useful for off-screen rendering, compute-only workloads,
3168    ///and automated testing where no display is available.
3169    ///
3170    ///Destroy with `destroy_surface_khr`.
3171    ///
3172    ///Requires `VK_EXT_headless_surface`.
3173    pub unsafe fn create_headless_surface_ext(
3174        &self,
3175        p_create_info: &HeadlessSurfaceCreateInfoEXT,
3176        allocator: Option<&AllocationCallbacks>,
3177    ) -> VkResult<SurfaceKHR> {
3178        let fp = self
3179            .commands()
3180            .create_headless_surface_ext
3181            .expect("vkCreateHeadlessSurfaceEXT not loaded");
3182        let alloc_ptr = allocator.map_or(core::ptr::null(), core::ptr::from_ref);
3183        let mut out = unsafe { core::mem::zeroed() };
3184        check(unsafe { fp(self.handle(), p_create_info, alloc_ptr, &mut out) })?;
3185        Ok(out)
3186    }
3187    ///Wraps [`vkGetPhysicalDeviceSupportedFramebufferMixedSamplesCombinationsNV`](https://registry.khronos.org/vulkan/specs/latest/man/html/vkGetPhysicalDeviceSupportedFramebufferMixedSamplesCombinationsNV.html).
3188    /**
3189    Provided by **VK_NV_coverage_reduction_mode**.*/
3190    ///
3191    ///# Errors
3192    ///- `VK_ERROR_OUT_OF_HOST_MEMORY`
3193    ///- `VK_ERROR_OUT_OF_DEVICE_MEMORY`
3194    ///- `VK_ERROR_UNKNOWN`
3195    ///- `VK_ERROR_VALIDATION_FAILED`
3196    ///
3197    ///# Safety
3198    ///- `physicalDevice` (self) must be valid and not destroyed.
3199    ///
3200    ///# Panics
3201    ///Panics if `vkGetPhysicalDeviceSupportedFramebufferMixedSamplesCombinationsNV` was not loaded. This can happen if the required extension or Vulkan version is not enabled on the instance or device.
3202    ///
3203    ///# Usage Notes
3204    ///
3205    ///Enumerates the supported combinations of coverage reduction
3206    ///mode, rasterisation samples, and colour/depth sample counts for
3207    ///mixed-sample rendering. Uses the two-call idiom.
3208    ///
3209    ///Requires `VK_NV_coverage_reduction_mode`.
3210    pub unsafe fn get_physical_device_supported_framebuffer_mixed_samples_combinations_nv(
3211        &self,
3212        physical_device: PhysicalDevice,
3213    ) -> VkResult<Vec<FramebufferMixedSamplesCombinationNV>> {
3214        let fp = self
3215            .commands()
3216            .get_physical_device_supported_framebuffer_mixed_samples_combinations_nv
3217            .expect("vkGetPhysicalDeviceSupportedFramebufferMixedSamplesCombinationsNV not loaded");
3218        enumerate_two_call(|count, data| unsafe { fp(physical_device, count, data) })
3219    }
3220    ///Wraps [`vkGetPhysicalDeviceToolProperties`](https://registry.khronos.org/vulkan/specs/latest/man/html/vkGetPhysicalDeviceToolProperties.html).
3221    /**
3222    Provided by **VK_BASE_VERSION_1_3**.*/
3223    ///
3224    ///# Errors
3225    ///- `VK_ERROR_OUT_OF_HOST_MEMORY`
3226    ///- `VK_ERROR_UNKNOWN`
3227    ///- `VK_ERROR_VALIDATION_FAILED`
3228    ///
3229    ///# Safety
3230    ///- `physicalDevice` (self) must be valid and not destroyed.
3231    ///
3232    ///# Panics
3233    ///Panics if `vkGetPhysicalDeviceToolProperties` was not loaded. This can happen if the required extension or Vulkan version is not enabled on the instance or device.
3234    ///
3235    ///# Usage Notes
3236    ///
3237    ///Returns a list of active tools (validation layers, profilers,
3238    ///debuggers, crash dump utilities) that are currently intercepting
3239    ///Vulkan calls for this physical device.
3240    ///
3241    ///Each `PhysicalDeviceToolProperties` includes the tool's name,
3242    ///version, purposes (validation, profiling, tracing, etc.), and a
3243    ///description.
3244    ///
3245    ///Useful for diagnostics, log the active tools at startup to help
3246    ///debug performance issues or unexpected validation messages. If no
3247    ///tools are active, the list is empty.
3248    pub unsafe fn get_physical_device_tool_properties(
3249        &self,
3250        physical_device: PhysicalDevice,
3251    ) -> VkResult<Vec<PhysicalDeviceToolProperties>> {
3252        let fp = self
3253            .commands()
3254            .get_physical_device_tool_properties
3255            .expect("vkGetPhysicalDeviceToolProperties not loaded");
3256        enumerate_two_call(|count, data| unsafe { fp(physical_device, count, data) })
3257    }
3258    ///Wraps [`vkGetPhysicalDeviceRefreshableObjectTypesKHR`](https://registry.khronos.org/vulkan/specs/latest/man/html/vkGetPhysicalDeviceRefreshableObjectTypesKHR.html).
3259    ///
3260    ///# Errors
3261    ///- `VK_ERROR_UNKNOWN`
3262    ///- `VK_ERROR_VALIDATION_FAILED`
3263    ///
3264    ///# Safety
3265    ///- `physicalDevice` (self) must be valid and not destroyed.
3266    ///
3267    ///# Panics
3268    ///Panics if `vkGetPhysicalDeviceRefreshableObjectTypesKHR` was not loaded. This can happen if the required extension or Vulkan version is not enabled on the instance or device.
3269    ///
3270    ///# Usage Notes
3271    ///
3272    ///Enumerates the Vulkan object types that can be refreshed on the
3273    ///physical device. Part of Vulkan SC (Safety Critical) and the
3274    ///object refresh mechanism for long-running safety applications.
3275    ///Uses the two-call idiom.
3276    ///
3277    ///Requires `VK_KHR_object_refresh`.
3278    pub unsafe fn get_physical_device_refreshable_object_types_khr(
3279        &self,
3280        physical_device: PhysicalDevice,
3281    ) -> VkResult<Vec<ObjectType>> {
3282        let fp = self
3283            .commands()
3284            .get_physical_device_refreshable_object_types_khr
3285            .expect("vkGetPhysicalDeviceRefreshableObjectTypesKHR not loaded");
3286        enumerate_two_call(|count, data| unsafe { fp(physical_device, count, data) })
3287    }
3288    ///Wraps [`vkGetPhysicalDeviceFragmentShadingRatesKHR`](https://registry.khronos.org/vulkan/specs/latest/man/html/vkGetPhysicalDeviceFragmentShadingRatesKHR.html).
3289    /**
3290    Provided by **VK_KHR_fragment_shading_rate**.*/
3291    ///
3292    ///# Errors
3293    ///- `VK_ERROR_OUT_OF_HOST_MEMORY`
3294    ///- `VK_ERROR_UNKNOWN`
3295    ///- `VK_ERROR_VALIDATION_FAILED`
3296    ///
3297    ///# Safety
3298    ///- `physicalDevice` (self) must be valid and not destroyed.
3299    ///
3300    ///# Panics
3301    ///Panics if `vkGetPhysicalDeviceFragmentShadingRatesKHR` was not loaded. This can happen if the required extension or Vulkan version is not enabled on the instance or device.
3302    ///
3303    ///# Usage Notes
3304    ///
3305    ///Enumerates the fragment shading rates supported by the physical
3306    ///device. Each entry reports a fragment size (e.g., 2x2, 4x4) and
3307    ///which sample counts are compatible with it.
3308    ///
3309    ///The results are sorted from largest to smallest fragment size.
3310    ///1x1 (full-rate shading) is always supported.
3311    ///
3312    ///Use these results to validate fragment sizes passed to
3313    ///`cmd_set_fragment_shading_rate_khr` or configured in a shading
3314    ///rate attachment.
3315    pub unsafe fn get_physical_device_fragment_shading_rates_khr(
3316        &self,
3317        physical_device: PhysicalDevice,
3318    ) -> VkResult<Vec<PhysicalDeviceFragmentShadingRateKHR>> {
3319        let fp = self
3320            .commands()
3321            .get_physical_device_fragment_shading_rates_khr
3322            .expect("vkGetPhysicalDeviceFragmentShadingRatesKHR not loaded");
3323        enumerate_two_call(|count, data| unsafe { fp(physical_device, count, data) })
3324    }
3325    ///Wraps [`vkGetPhysicalDeviceVideoCapabilitiesKHR`](https://registry.khronos.org/vulkan/specs/latest/man/html/vkGetPhysicalDeviceVideoCapabilitiesKHR.html).
3326    /**
3327    Provided by **VK_KHR_video_queue**.*/
3328    ///
3329    ///# Errors
3330    ///- `VK_ERROR_OUT_OF_HOST_MEMORY`
3331    ///- `VK_ERROR_OUT_OF_DEVICE_MEMORY`
3332    ///- `VK_ERROR_VIDEO_PROFILE_OPERATION_NOT_SUPPORTED_KHR`
3333    ///- `VK_ERROR_VIDEO_PROFILE_FORMAT_NOT_SUPPORTED_KHR`
3334    ///- `VK_ERROR_VIDEO_PICTURE_LAYOUT_NOT_SUPPORTED_KHR`
3335    ///- `VK_ERROR_VIDEO_PROFILE_CODEC_NOT_SUPPORTED_KHR`
3336    ///- `VK_ERROR_UNKNOWN`
3337    ///- `VK_ERROR_VALIDATION_FAILED`
3338    ///
3339    ///# Safety
3340    ///- `physicalDevice` (self) must be valid and not destroyed.
3341    ///
3342    ///# Panics
3343    ///Panics if `vkGetPhysicalDeviceVideoCapabilitiesKHR` was not loaded. This can happen if the required extension or Vulkan version is not enabled on the instance or device.
3344    ///
3345    ///# Usage Notes
3346    ///
3347    ///Queries video codec capabilities for a given video profile on a
3348    ///physical device. Returns `VideoCapabilitiesKHR` describing:
3349    ///
3350    ///- Supported coded extent range (min/max resolution).
3351    ///- Maximum DPB slot and active reference picture counts.
3352    ///- Bitstream buffer offset and size alignment requirements.
3353    ///- Supported standard header version.
3354    ///
3355    ///Chain codec-specific capability structs (e.g.,
3356    ///`VideoDecodeH264CapabilitiesKHR`) into the `pNext` of
3357    ///`p_capabilities` to receive additional codec details.
3358    ///
3359    ///This is the first query in the video workflow, use it to
3360    ///determine whether a codec profile is supported and what limits
3361    ///apply before creating a video session.
3362    pub unsafe fn get_physical_device_video_capabilities_khr(
3363        &self,
3364        physical_device: PhysicalDevice,
3365        p_video_profile: &VideoProfileInfoKHR,
3366        p_capabilities: &mut VideoCapabilitiesKHR,
3367    ) -> VkResult<()> {
3368        let fp = self
3369            .commands()
3370            .get_physical_device_video_capabilities_khr
3371            .expect("vkGetPhysicalDeviceVideoCapabilitiesKHR not loaded");
3372        check(unsafe { fp(physical_device, p_video_profile, p_capabilities) })
3373    }
3374    ///Wraps [`vkGetPhysicalDeviceVideoFormatPropertiesKHR`](https://registry.khronos.org/vulkan/specs/latest/man/html/vkGetPhysicalDeviceVideoFormatPropertiesKHR.html).
3375    /**
3376    Provided by **VK_KHR_video_queue**.*/
3377    ///
3378    ///# Errors
3379    ///- `VK_ERROR_OUT_OF_HOST_MEMORY`
3380    ///- `VK_ERROR_OUT_OF_DEVICE_MEMORY`
3381    ///- `VK_ERROR_IMAGE_USAGE_NOT_SUPPORTED_KHR`
3382    ///- `VK_ERROR_VIDEO_PROFILE_OPERATION_NOT_SUPPORTED_KHR`
3383    ///- `VK_ERROR_VIDEO_PROFILE_FORMAT_NOT_SUPPORTED_KHR`
3384    ///- `VK_ERROR_VIDEO_PICTURE_LAYOUT_NOT_SUPPORTED_KHR`
3385    ///- `VK_ERROR_VIDEO_PROFILE_CODEC_NOT_SUPPORTED_KHR`
3386    ///- `VK_ERROR_UNKNOWN`
3387    ///- `VK_ERROR_VALIDATION_FAILED`
3388    ///
3389    ///# Safety
3390    ///- `physicalDevice` (self) must be valid and not destroyed.
3391    ///
3392    ///# Panics
3393    ///Panics if `vkGetPhysicalDeviceVideoFormatPropertiesKHR` was not loaded. This can happen if the required extension or Vulkan version is not enabled on the instance or device.
3394    ///
3395    ///# Usage Notes
3396    ///
3397    ///Queries the image formats compatible with a video profile for
3398    ///decoded output, DPB reference, or encode input images.
3399    ///
3400    ///Specify the intended usage in `PhysicalDeviceVideoFormatInfoKHR`
3401    ///(image usage flags indicating decode output, DPB, or encode
3402    ///input). The returned `VideoFormatPropertiesKHR` list the
3403    ///compatible formats, image types, tiling modes, and usage flags.
3404    ///
3405    ///Use these results to create images that are compatible with the
3406    ///video session. Using an unsupported format results in validation
3407    ///errors.
3408    pub unsafe fn get_physical_device_video_format_properties_khr(
3409        &self,
3410        physical_device: PhysicalDevice,
3411        p_video_format_info: &PhysicalDeviceVideoFormatInfoKHR,
3412    ) -> VkResult<Vec<VideoFormatPropertiesKHR>> {
3413        let fp = self
3414            .commands()
3415            .get_physical_device_video_format_properties_khr
3416            .expect("vkGetPhysicalDeviceVideoFormatPropertiesKHR not loaded");
3417        enumerate_two_call(|count, data| unsafe {
3418            fp(physical_device, p_video_format_info, count, data)
3419        })
3420    }
3421    ///Wraps [`vkGetPhysicalDeviceVideoEncodeQualityLevelPropertiesKHR`](https://registry.khronos.org/vulkan/specs/latest/man/html/vkGetPhysicalDeviceVideoEncodeQualityLevelPropertiesKHR.html).
3422    /**
3423    Provided by **VK_KHR_video_encode_queue**.*/
3424    ///
3425    ///# Errors
3426    ///- `VK_ERROR_OUT_OF_HOST_MEMORY`
3427    ///- `VK_ERROR_OUT_OF_DEVICE_MEMORY`
3428    ///- `VK_ERROR_VIDEO_PROFILE_OPERATION_NOT_SUPPORTED_KHR`
3429    ///- `VK_ERROR_VIDEO_PROFILE_FORMAT_NOT_SUPPORTED_KHR`
3430    ///- `VK_ERROR_VIDEO_PICTURE_LAYOUT_NOT_SUPPORTED_KHR`
3431    ///- `VK_ERROR_VIDEO_PROFILE_CODEC_NOT_SUPPORTED_KHR`
3432    ///- `VK_ERROR_UNKNOWN`
3433    ///- `VK_ERROR_VALIDATION_FAILED`
3434    ///
3435    ///# Safety
3436    ///- `physicalDevice` (self) must be valid and not destroyed.
3437    ///
3438    ///# Panics
3439    ///Panics if `vkGetPhysicalDeviceVideoEncodeQualityLevelPropertiesKHR` was not loaded. This can happen if the required extension or Vulkan version is not enabled on the instance or device.
3440    ///
3441    ///# Usage Notes
3442    ///
3443    ///Queries the properties of a specific video encode quality level.
3444    ///Quality levels range from 0 (lowest quality, fastest) to
3445    ///`maxQualityLevels - 1` (highest quality, slowest), as reported
3446    ///by `VideoEncodeCapabilitiesKHR`.
3447    ///
3448    ///The output `VideoEncodeQualityLevelPropertiesKHR` provides
3449    ///recommended encode settings for the requested quality level.
3450    ///Chain codec-specific quality level info (e.g.,
3451    ///`VideoEncodeH264QualityLevelPropertiesKHR`) into `pNext` to get
3452    ///codec-specific recommended parameters.
3453    ///
3454    ///Use these recommended settings as a starting point for
3455    ///`VideoEncodeInfoKHR` and rate control configuration.
3456    pub unsafe fn get_physical_device_video_encode_quality_level_properties_khr(
3457        &self,
3458        physical_device: PhysicalDevice,
3459        p_quality_level_info: &PhysicalDeviceVideoEncodeQualityLevelInfoKHR,
3460        p_quality_level_properties: &mut VideoEncodeQualityLevelPropertiesKHR,
3461    ) -> VkResult<()> {
3462        let fp = self
3463            .commands()
3464            .get_physical_device_video_encode_quality_level_properties_khr
3465            .expect("vkGetPhysicalDeviceVideoEncodeQualityLevelPropertiesKHR not loaded");
3466        check(unsafe {
3467            fp(
3468                physical_device,
3469                p_quality_level_info,
3470                p_quality_level_properties,
3471            )
3472        })
3473    }
3474    ///Wraps [`vkAcquireDrmDisplayEXT`](https://registry.khronos.org/vulkan/specs/latest/man/html/vkAcquireDrmDisplayEXT.html).
3475    /**
3476    Provided by **VK_EXT_acquire_drm_display**.*/
3477    ///
3478    ///# Errors
3479    ///- `VK_ERROR_INITIALIZATION_FAILED`
3480    ///- `VK_ERROR_UNKNOWN`
3481    ///- `VK_ERROR_VALIDATION_FAILED`
3482    ///
3483    ///# Safety
3484    ///- `physicalDevice` (self) must be valid and not destroyed.
3485    ///
3486    ///# Panics
3487    ///Panics if `vkAcquireDrmDisplayEXT` was not loaded. This can happen if the required extension or Vulkan version is not enabled on the instance or device.
3488    ///
3489    ///# Usage Notes
3490    ///
3491    ///Acquires exclusive control of a DRM display for direct rendering.
3492    ///Takes a DRM file descriptor and a display handle. Release with
3493    ///`release_display_ext` when finished.
3494    ///
3495    ///Requires `VK_EXT_acquire_drm_display`. Linux only.
3496    pub unsafe fn acquire_drm_display_ext(
3497        &self,
3498        physical_device: PhysicalDevice,
3499        drm_fd: i32,
3500        display: DisplayKHR,
3501    ) -> VkResult<()> {
3502        let fp = self
3503            .commands()
3504            .acquire_drm_display_ext
3505            .expect("vkAcquireDrmDisplayEXT not loaded");
3506        check(unsafe { fp(physical_device, drm_fd, display) })
3507    }
3508    ///Wraps [`vkGetDrmDisplayEXT`](https://registry.khronos.org/vulkan/specs/latest/man/html/vkGetDrmDisplayEXT.html).
3509    /**
3510    Provided by **VK_EXT_acquire_drm_display**.*/
3511    ///
3512    ///# Errors
3513    ///- `VK_ERROR_INITIALIZATION_FAILED`
3514    ///- `VK_ERROR_OUT_OF_HOST_MEMORY`
3515    ///- `VK_ERROR_UNKNOWN`
3516    ///- `VK_ERROR_VALIDATION_FAILED`
3517    ///
3518    ///# Safety
3519    ///- `physicalDevice` (self) must be valid and not destroyed.
3520    ///
3521    ///# Panics
3522    ///Panics if `vkGetDrmDisplayEXT` was not loaded. This can happen if the required extension or Vulkan version is not enabled on the instance or device.
3523    ///
3524    ///# Usage Notes
3525    ///
3526    ///Maps a DRM connector to a Vulkan `DisplayKHR` handle. Takes a
3527    ///DRM file descriptor and connector ID, and returns the
3528    ///corresponding display. Use this to identify which Vulkan display
3529    ///corresponds to a specific DRM output.
3530    ///
3531    ///Requires `VK_EXT_acquire_drm_display`. Linux only.
3532    pub unsafe fn get_drm_display_ext(
3533        &self,
3534        physical_device: PhysicalDevice,
3535        drm_fd: i32,
3536        connector_id: u32,
3537    ) -> VkResult<DisplayKHR> {
3538        let fp = self
3539            .commands()
3540            .get_drm_display_ext
3541            .expect("vkGetDrmDisplayEXT not loaded");
3542        let mut out = unsafe { core::mem::zeroed() };
3543        check(unsafe { fp(physical_device, drm_fd, connector_id, &mut out) })?;
3544        Ok(out)
3545    }
3546    ///Wraps [`vkGetPhysicalDeviceOpticalFlowImageFormatsNV`](https://registry.khronos.org/vulkan/specs/latest/man/html/vkGetPhysicalDeviceOpticalFlowImageFormatsNV.html).
3547    /**
3548    Provided by **VK_NV_optical_flow**.*/
3549    ///
3550    ///# Errors
3551    ///- `VK_ERROR_EXTENSION_NOT_PRESENT`
3552    ///- `VK_ERROR_INITIALIZATION_FAILED`
3553    ///- `VK_ERROR_FORMAT_NOT_SUPPORTED`
3554    ///- `VK_ERROR_UNKNOWN`
3555    ///- `VK_ERROR_VALIDATION_FAILED`
3556    ///
3557    ///# Safety
3558    ///- `physicalDevice` (self) must be valid and not destroyed.
3559    ///
3560    ///# Panics
3561    ///Panics if `vkGetPhysicalDeviceOpticalFlowImageFormatsNV` was not loaded. This can happen if the required extension or Vulkan version is not enabled on the instance or device.
3562    ///
3563    ///# Usage Notes
3564    ///
3565    ///Queries which image formats are supported for optical flow at a
3566    ///given resolution and usage. Use this to select compatible formats
3567    ///before creating images for the optical flow session.
3568    ///
3569    ///Requires `VK_NV_optical_flow`.
3570    pub unsafe fn get_physical_device_optical_flow_image_formats_nv(
3571        &self,
3572        physical_device: PhysicalDevice,
3573        p_optical_flow_image_format_info: &OpticalFlowImageFormatInfoNV,
3574    ) -> VkResult<Vec<OpticalFlowImageFormatPropertiesNV>> {
3575        let fp = self
3576            .commands()
3577            .get_physical_device_optical_flow_image_formats_nv
3578            .expect("vkGetPhysicalDeviceOpticalFlowImageFormatsNV not loaded");
3579        enumerate_two_call(|count, data| unsafe {
3580            fp(
3581                physical_device,
3582                p_optical_flow_image_format_info,
3583                count,
3584                data,
3585            )
3586        })
3587    }
3588    ///Wraps [`vkGetPhysicalDeviceCooperativeMatrixPropertiesKHR`](https://registry.khronos.org/vulkan/specs/latest/man/html/vkGetPhysicalDeviceCooperativeMatrixPropertiesKHR.html).
3589    /**
3590    Provided by **VK_KHR_cooperative_matrix**.*/
3591    ///
3592    ///# Errors
3593    ///- `VK_ERROR_OUT_OF_HOST_MEMORY`
3594    ///- `VK_ERROR_OUT_OF_DEVICE_MEMORY`
3595    ///- `VK_ERROR_UNKNOWN`
3596    ///- `VK_ERROR_VALIDATION_FAILED`
3597    ///
3598    ///# Safety
3599    ///- `physicalDevice` (self) must be valid and not destroyed.
3600    ///
3601    ///# Panics
3602    ///Panics if `vkGetPhysicalDeviceCooperativeMatrixPropertiesKHR` was not loaded. This can happen if the required extension or Vulkan version is not enabled on the instance or device.
3603    ///
3604    ///# Usage Notes
3605    ///
3606    ///Enumerates the cooperative matrix types and configurations
3607    ///supported by the physical device. Each returned
3608    ///`CooperativeMatrixPropertiesKHR` describes a supported combination
3609    ///of matrix dimensions (M, N, K), component types (A, B, C, Result),
3610    ///and scope (subgroup or workgroup).
3611    ///
3612    ///Use these results to select valid cooperative matrix parameters
3613    ///for SPIR-V `OpCooperativeMatrixMulAddKHR` operations.
3614    ///
3615    ///Requires `VK_KHR_cooperative_matrix`.
3616    pub unsafe fn get_physical_device_cooperative_matrix_properties_khr(
3617        &self,
3618        physical_device: PhysicalDevice,
3619    ) -> VkResult<Vec<CooperativeMatrixPropertiesKHR>> {
3620        let fp = self
3621            .commands()
3622            .get_physical_device_cooperative_matrix_properties_khr
3623            .expect("vkGetPhysicalDeviceCooperativeMatrixPropertiesKHR not loaded");
3624        enumerate_two_call(|count, data| unsafe { fp(physical_device, count, data) })
3625    }
3626    ///Wraps [`vkGetPhysicalDeviceCooperativeMatrixFlexibleDimensionsPropertiesNV`](https://registry.khronos.org/vulkan/specs/latest/man/html/vkGetPhysicalDeviceCooperativeMatrixFlexibleDimensionsPropertiesNV.html).
3627    /**
3628    Provided by **VK_NV_cooperative_matrix2**.*/
3629    ///
3630    ///# Errors
3631    ///- `VK_ERROR_OUT_OF_HOST_MEMORY`
3632    ///- `VK_ERROR_OUT_OF_DEVICE_MEMORY`
3633    ///- `VK_ERROR_UNKNOWN`
3634    ///- `VK_ERROR_VALIDATION_FAILED`
3635    ///
3636    ///# Safety
3637    ///- `physicalDevice` (self) must be valid and not destroyed.
3638    ///
3639    ///# Panics
3640    ///Panics if `vkGetPhysicalDeviceCooperativeMatrixFlexibleDimensionsPropertiesNV` was not loaded. This can happen if the required extension or Vulkan version is not enabled on the instance or device.
3641    ///
3642    ///# Usage Notes
3643    ///
3644    ///Enumerates the supported flexible-dimension cooperative matrix
3645    ///configurations on the physical device. Uses the two-call idiom.
3646    ///Flexible dimensions allow non-power-of-two matrix sizes for
3647    ///better utilisation of hardware matrix units.
3648    ///
3649    ///Requires `VK_NV_cooperative_matrix2`.
3650    pub unsafe fn get_physical_device_cooperative_matrix_flexible_dimensions_properties_nv(
3651        &self,
3652        physical_device: PhysicalDevice,
3653    ) -> VkResult<Vec<CooperativeMatrixFlexibleDimensionsPropertiesNV>> {
3654        let fp = self
3655            .commands()
3656            .get_physical_device_cooperative_matrix_flexible_dimensions_properties_nv
3657            .expect(
3658                "vkGetPhysicalDeviceCooperativeMatrixFlexibleDimensionsPropertiesNV not loaded",
3659            );
3660        enumerate_two_call(|count, data| unsafe { fp(physical_device, count, data) })
3661    }
3662    ///Wraps [`vkGetPhysicalDeviceCooperativeVectorPropertiesNV`](https://registry.khronos.org/vulkan/specs/latest/man/html/vkGetPhysicalDeviceCooperativeVectorPropertiesNV.html).
3663    /**
3664    Provided by **VK_NV_cooperative_vector**.*/
3665    ///
3666    ///# Errors
3667    ///- `VK_ERROR_OUT_OF_HOST_MEMORY`
3668    ///- `VK_ERROR_OUT_OF_DEVICE_MEMORY`
3669    ///- `VK_ERROR_UNKNOWN`
3670    ///- `VK_ERROR_VALIDATION_FAILED`
3671    ///
3672    ///# Safety
3673    ///- `physicalDevice` (self) must be valid and not destroyed.
3674    ///
3675    ///# Panics
3676    ///Panics if `vkGetPhysicalDeviceCooperativeVectorPropertiesNV` was not loaded. This can happen if the required extension or Vulkan version is not enabled on the instance or device.
3677    ///
3678    ///# Usage Notes
3679    ///
3680    ///Queries the supported cooperative vector properties (data types,
3681    ///matrix dimensions, operations) for a physical device. Use this
3682    ///to determine what cooperative vector configurations are available
3683    ///before creating pipelines that use them.
3684    ///
3685    ///Requires `VK_NV_cooperative_vector`.
3686    pub unsafe fn get_physical_device_cooperative_vector_properties_nv(
3687        &self,
3688        physical_device: PhysicalDevice,
3689    ) -> VkResult<Vec<CooperativeVectorPropertiesNV>> {
3690        let fp = self
3691            .commands()
3692            .get_physical_device_cooperative_vector_properties_nv
3693            .expect("vkGetPhysicalDeviceCooperativeVectorPropertiesNV not loaded");
3694        enumerate_two_call(|count, data| unsafe { fp(physical_device, count, data) })
3695    }
3696    ///Wraps [`vkEnumeratePhysicalDeviceShaderInstrumentationMetricsARM`](https://registry.khronos.org/vulkan/specs/latest/man/html/vkEnumeratePhysicalDeviceShaderInstrumentationMetricsARM.html).
3697    /**
3698    Provided by **VK_ARM_shader_instrumentation**.*/
3699    ///
3700    ///# Errors
3701    ///- `VK_ERROR_OUT_OF_HOST_MEMORY`
3702    ///- `VK_ERROR_OUT_OF_DEVICE_MEMORY`
3703    ///- `VK_ERROR_INITIALIZATION_FAILED`
3704    ///- `VK_ERROR_UNKNOWN`
3705    ///- `VK_ERROR_VALIDATION_FAILED`
3706    ///
3707    ///# Safety
3708    ///- `physicalDevice` (self) must be valid and not destroyed.
3709    ///
3710    ///# Panics
3711    ///Panics if `vkEnumeratePhysicalDeviceShaderInstrumentationMetricsARM` was not loaded. This can happen if the required extension or Vulkan version is not enabled on the instance or device.
3712    ///
3713    ///# Usage Notes
3714    ///
3715    ///Enumerates the shader instrumentation metrics supported by a
3716    ///physical device. Uses the two-call idiom. Returns metric
3717    ///descriptions that can be selected when creating a shader
3718    ///instrumentation object.
3719    ///
3720    ///Requires `VK_ARM_shader_instrumentation`.
3721    pub unsafe fn enumerate_physical_device_shader_instrumentation_metrics_arm(
3722        &self,
3723        physical_device: PhysicalDevice,
3724    ) -> VkResult<Vec<ShaderInstrumentationMetricDescriptionARM>> {
3725        let fp = self
3726            .commands()
3727            .enumerate_physical_device_shader_instrumentation_metrics_arm
3728            .expect("vkEnumeratePhysicalDeviceShaderInstrumentationMetricsARM not loaded");
3729        enumerate_two_call(|count, data| unsafe { fp(physical_device, count, data) })
3730    }
3731    ///Wraps [`vkGetPhysicalDeviceExternalTensorPropertiesARM`](https://registry.khronos.org/vulkan/specs/latest/man/html/vkGetPhysicalDeviceExternalTensorPropertiesARM.html).
3732    /**
3733    Provided by **VK_ARM_tensors**.*/
3734    ///
3735    ///# Safety
3736    ///- `physicalDevice` (self) must be valid and not destroyed.
3737    ///
3738    ///# Panics
3739    ///Panics if `vkGetPhysicalDeviceExternalTensorPropertiesARM` was not loaded. This can happen if the required extension or Vulkan version is not enabled on the instance or device.
3740    ///
3741    ///# Usage Notes
3742    ///
3743    ///Queries whether a tensor with the given parameters can be
3744    ///exported to or imported from an external handle type. Returns
3745    ///compatibility and feature flags for external tensor sharing.
3746    ///
3747    ///Requires `VK_ARM_tensors`.
3748    pub unsafe fn get_physical_device_external_tensor_properties_arm(
3749        &self,
3750        physical_device: PhysicalDevice,
3751        p_external_tensor_info: &PhysicalDeviceExternalTensorInfoARM,
3752        p_external_tensor_properties: &mut ExternalTensorPropertiesARM,
3753    ) {
3754        let fp = self
3755            .commands()
3756            .get_physical_device_external_tensor_properties_arm
3757            .expect("vkGetPhysicalDeviceExternalTensorPropertiesARM not loaded");
3758        unsafe {
3759            fp(
3760                physical_device,
3761                p_external_tensor_info,
3762                p_external_tensor_properties,
3763            )
3764        };
3765    }
3766    ///Wraps [`vkGetPhysicalDeviceQueueFamilyDataGraphPropertiesARM`](https://registry.khronos.org/vulkan/specs/latest/man/html/vkGetPhysicalDeviceQueueFamilyDataGraphPropertiesARM.html).
3767    /**
3768    Provided by **VK_ARM_data_graph**.*/
3769    ///
3770    ///# Errors
3771    ///- `VK_ERROR_OUT_OF_HOST_MEMORY`
3772    ///- `VK_ERROR_OUT_OF_DEVICE_MEMORY`
3773    ///- `VK_ERROR_UNKNOWN`
3774    ///- `VK_ERROR_VALIDATION_FAILED`
3775    ///
3776    ///# Safety
3777    ///- `physicalDevice` (self) must be valid and not destroyed.
3778    ///
3779    ///# Panics
3780    ///Panics if `vkGetPhysicalDeviceQueueFamilyDataGraphPropertiesARM` was not loaded. This can happen if the required extension or Vulkan version is not enabled on the instance or device.
3781    ///
3782    ///# Usage Notes
3783    ///
3784    ///Enumerates the data graph pipeline properties supported by a
3785    ///specific queue family. Uses the two-call idiom. Use to determine
3786    ///which queue families can execute data graph pipelines.
3787    ///
3788    ///Requires `VK_ARM_data_graph`.
3789    pub unsafe fn get_physical_device_queue_family_data_graph_properties_arm(
3790        &self,
3791        physical_device: PhysicalDevice,
3792        queue_family_index: u32,
3793    ) -> VkResult<Vec<QueueFamilyDataGraphPropertiesARM>> {
3794        let fp = self
3795            .commands()
3796            .get_physical_device_queue_family_data_graph_properties_arm
3797            .expect("vkGetPhysicalDeviceQueueFamilyDataGraphPropertiesARM not loaded");
3798        enumerate_two_call(|count, data| unsafe {
3799            fp(physical_device, queue_family_index, count, data)
3800        })
3801    }
3802    ///Wraps [`vkGetPhysicalDeviceQueueFamilyDataGraphProcessingEnginePropertiesARM`](https://registry.khronos.org/vulkan/specs/latest/man/html/vkGetPhysicalDeviceQueueFamilyDataGraphProcessingEnginePropertiesARM.html).
3803    /**
3804    Provided by **VK_ARM_data_graph**.*/
3805    ///
3806    ///# Safety
3807    ///- `physicalDevice` (self) must be valid and not destroyed.
3808    ///
3809    ///# Panics
3810    ///Panics if `vkGetPhysicalDeviceQueueFamilyDataGraphProcessingEnginePropertiesARM` was not loaded. This can happen if the required extension or Vulkan version is not enabled on the instance or device.
3811    ///
3812    ///# Usage Notes
3813    ///
3814    ///Queries the data graph processing engine properties for a
3815    ///specific queue family. Returns hardware-specific engine
3816    ///capabilities such as supported data types and operations.
3817    ///
3818    ///Requires `VK_ARM_data_graph`.
3819    pub unsafe fn get_physical_device_queue_family_data_graph_processing_engine_properties_arm(
3820        &self,
3821        physical_device: PhysicalDevice,
3822        p_queue_family_data_graph_processing_engine_info: &PhysicalDeviceQueueFamilyDataGraphProcessingEngineInfoARM,
3823        p_queue_family_data_graph_processing_engine_properties: &mut QueueFamilyDataGraphProcessingEnginePropertiesARM,
3824    ) {
3825        let fp = self
3826            .commands()
3827            .get_physical_device_queue_family_data_graph_processing_engine_properties_arm
3828            .expect(
3829                "vkGetPhysicalDeviceQueueFamilyDataGraphProcessingEnginePropertiesARM not loaded",
3830            );
3831        unsafe {
3832            fp(
3833                physical_device,
3834                p_queue_family_data_graph_processing_engine_info,
3835                p_queue_family_data_graph_processing_engine_properties,
3836            )
3837        };
3838    }
3839    ///Wraps [`vkEnumeratePhysicalDeviceQueueFamilyPerformanceCountersByRegionARM`](https://registry.khronos.org/vulkan/specs/latest/man/html/vkEnumeratePhysicalDeviceQueueFamilyPerformanceCountersByRegionARM.html).
3840    /**
3841    Provided by **VK_ARM_performance_counters_by_region**.*/
3842    ///
3843    ///# Errors
3844    ///- `VK_ERROR_OUT_OF_HOST_MEMORY`
3845    ///- `VK_ERROR_OUT_OF_DEVICE_MEMORY`
3846    ///- `VK_ERROR_INITIALIZATION_FAILED`
3847    ///- `VK_ERROR_UNKNOWN`
3848    ///- `VK_ERROR_VALIDATION_FAILED`
3849    ///
3850    ///# Safety
3851    ///- `physicalDevice` (self) must be valid and not destroyed.
3852    ///
3853    ///# Panics
3854    ///Panics if `vkEnumeratePhysicalDeviceQueueFamilyPerformanceCountersByRegionARM` was not loaded. This can happen if the required extension or Vulkan version is not enabled on the instance or device.
3855    ///
3856    ///# Usage Notes
3857    ///
3858    ///Enumerates performance counters for a specific queue family on
3859    ///ARM GPUs, grouped by hardware region. Uses the two-call idiom
3860    ///for the counter array and also writes corresponding descriptions.
3861    ///
3862    ///Requires `VK_ARM_shader_instrumentation`.
3863    pub unsafe fn enumerate_physical_device_queue_family_performance_counters_by_region_arm(
3864        &self,
3865        physical_device: PhysicalDevice,
3866        queue_family_index: u32,
3867        p_counter_descriptions: *mut PerformanceCounterDescriptionARM,
3868    ) -> VkResult<Vec<PerformanceCounterARM>> {
3869        let fp = self
3870            .commands()
3871            .enumerate_physical_device_queue_family_performance_counters_by_region_arm
3872            .expect(
3873                "vkEnumeratePhysicalDeviceQueueFamilyPerformanceCountersByRegionARM not loaded",
3874            );
3875        enumerate_two_call(|count, data| unsafe {
3876            fp(
3877                physical_device,
3878                queue_family_index,
3879                count,
3880                data,
3881                p_counter_descriptions,
3882            )
3883        })
3884    }
3885    ///Wraps [`vkGetPhysicalDeviceDescriptorSizeEXT`](https://registry.khronos.org/vulkan/specs/latest/man/html/vkGetPhysicalDeviceDescriptorSizeEXT.html).
3886    /**
3887    Provided by **VK_EXT_descriptor_heap**.*/
3888    ///
3889    ///# Safety
3890    ///- `physicalDevice` (self) must be valid and not destroyed.
3891    ///
3892    ///# Panics
3893    ///Panics if `vkGetPhysicalDeviceDescriptorSizeEXT` was not loaded. This can happen if the required extension or Vulkan version is not enabled on the instance or device.
3894    ///
3895    ///# Usage Notes
3896    ///
3897    ///Returns the byte size of a single descriptor of the specified
3898    ///type on this physical device.
3899    ///
3900    ///Use this to compute buffer sizes and offsets when working with
3901    ///the descriptor heap model.
3902    ///
3903    ///Provided by `VK_EXT_descriptor_heap`.
3904    pub unsafe fn get_physical_device_descriptor_size_ext(
3905        &self,
3906        physical_device: PhysicalDevice,
3907        descriptor_type: DescriptorType,
3908    ) {
3909        let fp = self
3910            .commands()
3911            .get_physical_device_descriptor_size_ext
3912            .expect("vkGetPhysicalDeviceDescriptorSizeEXT not loaded");
3913        unsafe { fp(physical_device, descriptor_type) };
3914    }
3915}