Skip to main content

vulkanalia/vk/
versions.rs

1// SPDX-License-Identifier: Apache-2.0
2
3// DO NOT EDIT.
4//
5// This file has been generated by the Kotlin project in the `generator`
6// directory from a Vulkan API registry.
7
8#![allow(
9    non_camel_case_types,
10    non_snake_case,
11    clippy::bad_bit_mask,
12    clippy::let_unit_value,
13    clippy::missing_safety_doc,
14    clippy::missing_transmute_annotations,
15    clippy::needless_lifetimes,
16    clippy::too_many_arguments,
17    clippy::type_complexity,
18    clippy::unnecessary_cast,
19    clippy::upper_case_acronyms,
20    clippy::useless_transmute
21)]
22
23use alloc::vec::Vec;
24use core::borrow::Borrow;
25use core::ffi::{c_void, CStr};
26use core::mem::MaybeUninit;
27use core::ptr;
28
29use super::*;
30
31/// Vulkan 1.0 entry command wrappers.
32pub trait EntryV1_0 {
33    fn commands(&self) -> &EntryCommands;
34
35    /// <https://www.khronos.org/registry/vulkan/specs/latest/man/html/vkCreateInstance.html>
36    #[inline]
37    unsafe fn create_instance(
38        &self,
39        create_info: &InstanceCreateInfo,
40        allocator: Option<&AllocationCallbacks>,
41    ) -> crate::VkResult<Instance> {
42        let mut instance = MaybeUninit::<Instance>::uninit();
43
44        let __result = (self.commands().create_instance)(
45            create_info,
46            allocator.map_or(ptr::null(), |v| v),
47            instance.as_mut_ptr(),
48        );
49
50        if __result == Result::SUCCESS {
51            Ok(instance.assume_init())
52        } else {
53            Err(__result.into())
54        }
55    }
56
57    /// <https://www.khronos.org/registry/vulkan/specs/latest/man/html/vkEnumerateInstanceExtensionProperties.html>
58    #[inline]
59    unsafe fn enumerate_instance_extension_properties(
60        &self,
61        layer_name: Option<&CStr>,
62    ) -> crate::VkResult<Vec<ExtensionProperties>> {
63        let mut property_count = 0;
64
65        (self.commands().enumerate_instance_extension_properties)(
66            layer_name.map_or(ptr::null(), |v| v.as_ptr().cast()),
67            &mut property_count,
68            ptr::null_mut(),
69        );
70
71        let mut properties = Vec::with_capacity(property_count as usize);
72
73        let __result = (self.commands().enumerate_instance_extension_properties)(
74            layer_name.map_or(ptr::null(), |v| v.as_ptr().cast()),
75            &mut property_count,
76            properties.as_mut_ptr(),
77        );
78
79        debug_assert!(properties.capacity() >= property_count as usize);
80        properties.set_len(property_count as usize);
81
82        if __result == Result::SUCCESS {
83            Ok(properties)
84        } else {
85            Err(__result.into())
86        }
87    }
88
89    /// <https://www.khronos.org/registry/vulkan/specs/latest/man/html/vkEnumerateInstanceLayerProperties.html>
90    #[inline]
91    unsafe fn enumerate_instance_layer_properties(&self) -> crate::VkResult<Vec<LayerProperties>> {
92        let mut property_count = 0;
93
94        (self.commands().enumerate_instance_layer_properties)(&mut property_count, ptr::null_mut());
95
96        let mut properties = Vec::with_capacity(property_count as usize);
97
98        let __result = (self.commands().enumerate_instance_layer_properties)(
99            &mut property_count,
100            properties.as_mut_ptr(),
101        );
102
103        debug_assert!(properties.capacity() >= property_count as usize);
104        properties.set_len(property_count as usize);
105
106        if __result == Result::SUCCESS {
107            Ok(properties)
108        } else {
109            Err(__result.into())
110        }
111    }
112}
113
114impl EntryV1_0 for crate::Entry {
115    #[inline]
116    fn commands(&self) -> &EntryCommands {
117        &self.commands
118    }
119}
120
121impl<C: Borrow<EntryCommands>> EntryV1_0 for C {
122    #[inline]
123    fn commands(&self) -> &EntryCommands {
124        self.borrow()
125    }
126}
127
128/// Vulkan 1.0 instance command wrappers.
129pub trait InstanceV1_0 {
130    fn commands(&self) -> &InstanceCommands;
131
132    fn handle(&self) -> Instance;
133
134    /// <https://www.khronos.org/registry/vulkan/specs/latest/man/html/vkCreateDevice.html>
135    #[inline]
136    unsafe fn create_device(
137        &self,
138        physical_device: PhysicalDevice,
139        create_info: &DeviceCreateInfo,
140        allocator: Option<&AllocationCallbacks>,
141    ) -> crate::VkResult<Device> {
142        let mut device = MaybeUninit::<Device>::uninit();
143
144        let __result = (self.commands().create_device)(
145            physical_device,
146            create_info,
147            allocator.map_or(ptr::null(), |v| v),
148            device.as_mut_ptr(),
149        );
150
151        if __result == Result::SUCCESS {
152            Ok(device.assume_init())
153        } else {
154            Err(__result.into())
155        }
156    }
157
158    /// <https://www.khronos.org/registry/vulkan/specs/latest/man/html/vkDestroyInstance.html>
159    #[inline]
160    unsafe fn destroy_instance(&self, allocator: Option<&AllocationCallbacks>) {
161        let __result =
162            (self.commands().destroy_instance)(self.handle(), allocator.map_or(ptr::null(), |v| v));
163    }
164
165    /// <https://www.khronos.org/registry/vulkan/specs/latest/man/html/vkEnumerateDeviceExtensionProperties.html>
166    #[inline]
167    unsafe fn enumerate_device_extension_properties(
168        &self,
169        physical_device: PhysicalDevice,
170        layer_name: Option<&CStr>,
171    ) -> crate::VkResult<Vec<ExtensionProperties>> {
172        let mut property_count = 0;
173
174        (self.commands().enumerate_device_extension_properties)(
175            physical_device,
176            layer_name.map_or(ptr::null(), |v| v.as_ptr().cast()),
177            &mut property_count,
178            ptr::null_mut(),
179        );
180
181        let mut properties = Vec::with_capacity(property_count as usize);
182
183        let __result = (self.commands().enumerate_device_extension_properties)(
184            physical_device,
185            layer_name.map_or(ptr::null(), |v| v.as_ptr().cast()),
186            &mut property_count,
187            properties.as_mut_ptr(),
188        );
189
190        debug_assert!(properties.capacity() >= property_count as usize);
191        properties.set_len(property_count as usize);
192
193        if __result == Result::SUCCESS {
194            Ok(properties)
195        } else {
196            Err(__result.into())
197        }
198    }
199
200    /// <https://www.khronos.org/registry/vulkan/specs/latest/man/html/vkEnumerateDeviceLayerProperties.html>
201    #[inline]
202    unsafe fn enumerate_device_layer_properties(
203        &self,
204        physical_device: PhysicalDevice,
205    ) -> crate::VkResult<Vec<LayerProperties>> {
206        let mut property_count = 0;
207
208        (self.commands().enumerate_device_layer_properties)(
209            physical_device,
210            &mut property_count,
211            ptr::null_mut(),
212        );
213
214        let mut properties = Vec::with_capacity(property_count as usize);
215
216        let __result = (self.commands().enumerate_device_layer_properties)(
217            physical_device,
218            &mut property_count,
219            properties.as_mut_ptr(),
220        );
221
222        debug_assert!(properties.capacity() >= property_count as usize);
223        properties.set_len(property_count as usize);
224
225        if __result == Result::SUCCESS {
226            Ok(properties)
227        } else {
228            Err(__result.into())
229        }
230    }
231
232    /// <https://www.khronos.org/registry/vulkan/specs/latest/man/html/vkEnumeratePhysicalDevices.html>
233    #[inline]
234    unsafe fn enumerate_physical_devices(&self) -> crate::VkResult<Vec<PhysicalDevice>> {
235        let mut physical_device_count = 0;
236
237        (self.commands().enumerate_physical_devices)(
238            self.handle(),
239            &mut physical_device_count,
240            ptr::null_mut(),
241        );
242
243        let mut physical_devices = Vec::with_capacity(physical_device_count as usize);
244
245        let __result = (self.commands().enumerate_physical_devices)(
246            self.handle(),
247            &mut physical_device_count,
248            physical_devices.as_mut_ptr(),
249        );
250
251        debug_assert!(physical_devices.capacity() >= physical_device_count as usize);
252        physical_devices.set_len(physical_device_count as usize);
253
254        if __result == Result::SUCCESS {
255            Ok(physical_devices)
256        } else {
257            Err(__result.into())
258        }
259    }
260
261    /// <https://www.khronos.org/registry/vulkan/specs/latest/man/html/vkGetDeviceProcAddr.html>
262    #[inline]
263    unsafe fn get_device_proc_addr(&self, device: Device, name: &CStr) -> PFN_vkVoidFunction {
264        let __result = (self.commands().get_device_proc_addr)(device, name.as_ptr().cast());
265
266        __result
267    }
268
269    /// <https://www.khronos.org/registry/vulkan/specs/latest/man/html/vkGetPhysicalDeviceFeatures.html>
270    #[inline]
271    unsafe fn get_physical_device_features(
272        &self,
273        physical_device: PhysicalDevice,
274    ) -> PhysicalDeviceFeatures {
275        let mut features = MaybeUninit::<PhysicalDeviceFeatures>::uninit();
276
277        let __result =
278            (self.commands().get_physical_device_features)(physical_device, features.as_mut_ptr());
279
280        features.assume_init()
281    }
282
283    /// <https://www.khronos.org/registry/vulkan/specs/latest/man/html/vkGetPhysicalDeviceFormatProperties.html>
284    #[inline]
285    unsafe fn get_physical_device_format_properties(
286        &self,
287        physical_device: PhysicalDevice,
288        format: Format,
289    ) -> FormatProperties {
290        let mut format_properties = MaybeUninit::<FormatProperties>::uninit();
291
292        let __result = (self.commands().get_physical_device_format_properties)(
293            physical_device,
294            format,
295            format_properties.as_mut_ptr(),
296        );
297
298        format_properties.assume_init()
299    }
300
301    /// <https://www.khronos.org/registry/vulkan/specs/latest/man/html/vkGetPhysicalDeviceImageFormatProperties.html>
302    #[inline]
303    unsafe fn get_physical_device_image_format_properties(
304        &self,
305        physical_device: PhysicalDevice,
306        format: Format,
307        type_: ImageType,
308        tiling: ImageTiling,
309        usage: ImageUsageFlags,
310        flags: ImageCreateFlags,
311    ) -> crate::VkResult<ImageFormatProperties> {
312        let mut image_format_properties = MaybeUninit::<ImageFormatProperties>::uninit();
313
314        let __result = (self.commands().get_physical_device_image_format_properties)(
315            physical_device,
316            format,
317            type_,
318            tiling,
319            usage,
320            flags,
321            image_format_properties.as_mut_ptr(),
322        );
323
324        if __result == Result::SUCCESS {
325            Ok(image_format_properties.assume_init())
326        } else {
327            Err(__result.into())
328        }
329    }
330
331    /// <https://www.khronos.org/registry/vulkan/specs/latest/man/html/vkGetPhysicalDeviceMemoryProperties.html>
332    #[inline]
333    unsafe fn get_physical_device_memory_properties(
334        &self,
335        physical_device: PhysicalDevice,
336    ) -> PhysicalDeviceMemoryProperties {
337        let mut memory_properties = MaybeUninit::<PhysicalDeviceMemoryProperties>::uninit();
338
339        let __result = (self.commands().get_physical_device_memory_properties)(
340            physical_device,
341            memory_properties.as_mut_ptr(),
342        );
343
344        memory_properties.assume_init()
345    }
346
347    /// <https://www.khronos.org/registry/vulkan/specs/latest/man/html/vkGetPhysicalDeviceProperties.html>
348    #[inline]
349    unsafe fn get_physical_device_properties(
350        &self,
351        physical_device: PhysicalDevice,
352    ) -> PhysicalDeviceProperties {
353        let mut properties = MaybeUninit::<PhysicalDeviceProperties>::uninit();
354
355        let __result = (self.commands().get_physical_device_properties)(
356            physical_device,
357            properties.as_mut_ptr(),
358        );
359
360        properties.assume_init()
361    }
362
363    /// <https://www.khronos.org/registry/vulkan/specs/latest/man/html/vkGetPhysicalDeviceQueueFamilyProperties.html>
364    #[inline]
365    unsafe fn get_physical_device_queue_family_properties(
366        &self,
367        physical_device: PhysicalDevice,
368    ) -> Vec<QueueFamilyProperties> {
369        let mut queue_family_property_count = 0;
370
371        (self.commands().get_physical_device_queue_family_properties)(
372            physical_device,
373            &mut queue_family_property_count,
374            ptr::null_mut(),
375        );
376
377        let mut queue_family_properties = Vec::with_capacity(queue_family_property_count as usize);
378
379        let __result = (self.commands().get_physical_device_queue_family_properties)(
380            physical_device,
381            &mut queue_family_property_count,
382            queue_family_properties.as_mut_ptr(),
383        );
384
385        debug_assert!(queue_family_properties.capacity() >= queue_family_property_count as usize);
386        queue_family_properties.set_len(queue_family_property_count as usize);
387
388        queue_family_properties
389    }
390
391    /// <https://www.khronos.org/registry/vulkan/specs/latest/man/html/vkGetPhysicalDeviceSparseImageFormatProperties.html>
392    #[inline]
393    unsafe fn get_physical_device_sparse_image_format_properties(
394        &self,
395        physical_device: PhysicalDevice,
396        format: Format,
397        type_: ImageType,
398        samples: SampleCountFlags,
399        usage: ImageUsageFlags,
400        tiling: ImageTiling,
401    ) -> Vec<SparseImageFormatProperties> {
402        let mut property_count = 0;
403
404        (self
405            .commands()
406            .get_physical_device_sparse_image_format_properties)(
407            physical_device,
408            format,
409            type_,
410            samples,
411            usage,
412            tiling,
413            &mut property_count,
414            ptr::null_mut(),
415        );
416
417        let mut properties = Vec::with_capacity(property_count as usize);
418
419        let __result = (self
420            .commands()
421            .get_physical_device_sparse_image_format_properties)(
422            physical_device,
423            format,
424            type_,
425            samples,
426            usage,
427            tiling,
428            &mut property_count,
429            properties.as_mut_ptr(),
430        );
431
432        debug_assert!(properties.capacity() >= property_count as usize);
433        properties.set_len(property_count as usize);
434
435        properties
436    }
437}
438
439impl InstanceV1_0 for crate::Instance {
440    #[inline]
441    fn commands(&self) -> &InstanceCommands {
442        &self.commands
443    }
444
445    #[inline]
446    fn handle(&self) -> Instance {
447        self.handle
448    }
449}
450
451impl<C: Borrow<InstanceCommands>> InstanceV1_0 for (C, Instance) {
452    #[inline]
453    fn commands(&self) -> &InstanceCommands {
454        self.0.borrow()
455    }
456
457    #[inline]
458    fn handle(&self) -> Instance {
459        self.1
460    }
461}
462
463/// Vulkan 1.0 device command wrappers.
464pub trait DeviceV1_0 {
465    fn commands(&self) -> &DeviceCommands;
466
467    fn handle(&self) -> Device;
468
469    /// <https://www.khronos.org/registry/vulkan/specs/latest/man/html/vkAllocateCommandBuffers.html>
470    #[inline]
471    unsafe fn allocate_command_buffers(
472        &self,
473        allocate_info: &CommandBufferAllocateInfo,
474    ) -> crate::VkResult<Vec<CommandBuffer>> {
475        let mut command_buffers =
476            Vec::with_capacity(allocate_info.as_ref().command_buffer_count as usize);
477
478        let __result = (self.commands().allocate_command_buffers)(
479            self.handle(),
480            allocate_info,
481            command_buffers.as_mut_ptr(),
482        );
483
484        command_buffers.set_len(allocate_info.as_ref().command_buffer_count as usize);
485
486        if __result == Result::SUCCESS {
487            Ok(command_buffers)
488        } else {
489            Err(__result.into())
490        }
491    }
492
493    /// <https://www.khronos.org/registry/vulkan/specs/latest/man/html/vkAllocateDescriptorSets.html>
494    #[inline]
495    unsafe fn allocate_descriptor_sets(
496        &self,
497        allocate_info: &DescriptorSetAllocateInfo,
498    ) -> crate::VkResult<Vec<DescriptorSet>> {
499        let mut descriptor_sets =
500            Vec::with_capacity(allocate_info.as_ref().descriptor_set_count as usize);
501
502        let __result = (self.commands().allocate_descriptor_sets)(
503            self.handle(),
504            allocate_info,
505            descriptor_sets.as_mut_ptr(),
506        );
507
508        descriptor_sets.set_len(allocate_info.as_ref().descriptor_set_count as usize);
509
510        if __result == Result::SUCCESS {
511            Ok(descriptor_sets)
512        } else {
513            Err(__result.into())
514        }
515    }
516
517    /// <https://www.khronos.org/registry/vulkan/specs/latest/man/html/vkAllocateMemory.html>
518    #[inline]
519    unsafe fn allocate_memory(
520        &self,
521        allocate_info: &MemoryAllocateInfo,
522        allocator: Option<&AllocationCallbacks>,
523    ) -> crate::VkResult<DeviceMemory> {
524        let mut memory = MaybeUninit::<DeviceMemory>::uninit();
525
526        let __result = (self.commands().allocate_memory)(
527            self.handle(),
528            allocate_info,
529            allocator.map_or(ptr::null(), |v| v),
530            memory.as_mut_ptr(),
531        );
532
533        if __result == Result::SUCCESS {
534            Ok(memory.assume_init())
535        } else {
536            Err(__result.into())
537        }
538    }
539
540    /// <https://www.khronos.org/registry/vulkan/specs/latest/man/html/vkBeginCommandBuffer.html>
541    #[inline]
542    unsafe fn begin_command_buffer(
543        &self,
544        command_buffer: CommandBuffer,
545        begin_info: &CommandBufferBeginInfo,
546    ) -> crate::VkResult<()> {
547        let __result = (self.commands().begin_command_buffer)(command_buffer, begin_info);
548
549        if __result == Result::SUCCESS {
550            Ok(())
551        } else {
552            Err(__result.into())
553        }
554    }
555
556    /// <https://www.khronos.org/registry/vulkan/specs/latest/man/html/vkBindBufferMemory.html>
557    #[inline]
558    unsafe fn bind_buffer_memory(
559        &self,
560        buffer: Buffer,
561        memory: DeviceMemory,
562        memory_offset: DeviceSize,
563    ) -> crate::VkResult<()> {
564        let __result =
565            (self.commands().bind_buffer_memory)(self.handle(), buffer, memory, memory_offset);
566
567        if __result == Result::SUCCESS {
568            Ok(())
569        } else {
570            Err(__result.into())
571        }
572    }
573
574    /// <https://www.khronos.org/registry/vulkan/specs/latest/man/html/vkBindImageMemory.html>
575    #[inline]
576    unsafe fn bind_image_memory(
577        &self,
578        image: Image,
579        memory: DeviceMemory,
580        memory_offset: DeviceSize,
581    ) -> crate::VkResult<()> {
582        let __result =
583            (self.commands().bind_image_memory)(self.handle(), image, memory, memory_offset);
584
585        if __result == Result::SUCCESS {
586            Ok(())
587        } else {
588            Err(__result.into())
589        }
590    }
591
592    /// <https://www.khronos.org/registry/vulkan/specs/latest/man/html/vkCmdBeginQuery.html>
593    #[inline]
594    unsafe fn cmd_begin_query(
595        &self,
596        command_buffer: CommandBuffer,
597        query_pool: QueryPool,
598        query: u32,
599        flags: QueryControlFlags,
600    ) {
601        let __result = (self.commands().cmd_begin_query)(command_buffer, query_pool, query, flags);
602    }
603
604    /// <https://www.khronos.org/registry/vulkan/specs/latest/man/html/vkCmdBeginRenderPass.html>
605    #[inline]
606    unsafe fn cmd_begin_render_pass(
607        &self,
608        command_buffer: CommandBuffer,
609        render_pass_begin: &RenderPassBeginInfo,
610        contents: SubpassContents,
611    ) {
612        let __result =
613            (self.commands().cmd_begin_render_pass)(command_buffer, render_pass_begin, contents);
614    }
615
616    /// <https://www.khronos.org/registry/vulkan/specs/latest/man/html/vkCmdBindDescriptorSets.html>
617    #[inline]
618    unsafe fn cmd_bind_descriptor_sets(
619        &self,
620        command_buffer: CommandBuffer,
621        pipeline_bind_point: PipelineBindPoint,
622        layout: PipelineLayout,
623        first_set: u32,
624        descriptor_sets: &[DescriptorSet],
625        dynamic_offsets: &[u32],
626    ) {
627        let __result = (self.commands().cmd_bind_descriptor_sets)(
628            command_buffer,
629            pipeline_bind_point,
630            layout,
631            first_set,
632            descriptor_sets.len() as u32,
633            descriptor_sets.as_ptr(),
634            dynamic_offsets.len() as u32,
635            dynamic_offsets.as_ptr(),
636        );
637    }
638
639    /// <https://www.khronos.org/registry/vulkan/specs/latest/man/html/vkCmdBindIndexBuffer.html>
640    #[inline]
641    unsafe fn cmd_bind_index_buffer(
642        &self,
643        command_buffer: CommandBuffer,
644        buffer: Buffer,
645        offset: DeviceSize,
646        index_type: IndexType,
647    ) {
648        let __result =
649            (self.commands().cmd_bind_index_buffer)(command_buffer, buffer, offset, index_type);
650    }
651
652    /// <https://www.khronos.org/registry/vulkan/specs/latest/man/html/vkCmdBindPipeline.html>
653    #[inline]
654    unsafe fn cmd_bind_pipeline(
655        &self,
656        command_buffer: CommandBuffer,
657        pipeline_bind_point: PipelineBindPoint,
658        pipeline: Pipeline,
659    ) {
660        let __result =
661            (self.commands().cmd_bind_pipeline)(command_buffer, pipeline_bind_point, pipeline);
662    }
663
664    /// <https://www.khronos.org/registry/vulkan/specs/latest/man/html/vkCmdBindVertexBuffers.html>
665    #[inline]
666    unsafe fn cmd_bind_vertex_buffers(
667        &self,
668        command_buffer: CommandBuffer,
669        first_binding: u32,
670        buffers: &[Buffer],
671        offsets: &[DeviceSize],
672    ) {
673        let __result = (self.commands().cmd_bind_vertex_buffers)(
674            command_buffer,
675            first_binding,
676            buffers.len() as u32,
677            buffers.as_ptr(),
678            offsets.as_ptr(),
679        );
680    }
681
682    /// <https://www.khronos.org/registry/vulkan/specs/latest/man/html/vkCmdBlitImage.html>
683    #[inline]
684    unsafe fn cmd_blit_image(
685        &self,
686        command_buffer: CommandBuffer,
687        src_image: Image,
688        src_image_layout: ImageLayout,
689        dst_image: Image,
690        dst_image_layout: ImageLayout,
691        regions: &[impl Cast<Target = ImageBlit>],
692        filter: Filter,
693    ) {
694        let __result = (self.commands().cmd_blit_image)(
695            command_buffer,
696            src_image,
697            src_image_layout,
698            dst_image,
699            dst_image_layout,
700            regions.len() as u32,
701            regions.as_ptr().cast(),
702            filter,
703        );
704    }
705
706    /// <https://www.khronos.org/registry/vulkan/specs/latest/man/html/vkCmdClearAttachments.html>
707    #[inline]
708    unsafe fn cmd_clear_attachments(
709        &self,
710        command_buffer: CommandBuffer,
711        attachments: &[impl Cast<Target = ClearAttachment>],
712        rects: &[impl Cast<Target = ClearRect>],
713    ) {
714        let __result = (self.commands().cmd_clear_attachments)(
715            command_buffer,
716            attachments.len() as u32,
717            attachments.as_ptr().cast(),
718            rects.len() as u32,
719            rects.as_ptr().cast(),
720        );
721    }
722
723    /// <https://www.khronos.org/registry/vulkan/specs/latest/man/html/vkCmdClearColorImage.html>
724    #[inline]
725    unsafe fn cmd_clear_color_image(
726        &self,
727        command_buffer: CommandBuffer,
728        image: Image,
729        image_layout: ImageLayout,
730        color: &ClearColorValue,
731        ranges: &[impl Cast<Target = ImageSubresourceRange>],
732    ) {
733        let __result = (self.commands().cmd_clear_color_image)(
734            command_buffer,
735            image,
736            image_layout,
737            color,
738            ranges.len() as u32,
739            ranges.as_ptr().cast(),
740        );
741    }
742
743    /// <https://www.khronos.org/registry/vulkan/specs/latest/man/html/vkCmdClearDepthStencilImage.html>
744    #[inline]
745    unsafe fn cmd_clear_depth_stencil_image(
746        &self,
747        command_buffer: CommandBuffer,
748        image: Image,
749        image_layout: ImageLayout,
750        depth_stencil: &ClearDepthStencilValue,
751        ranges: &[impl Cast<Target = ImageSubresourceRange>],
752    ) {
753        let __result = (self.commands().cmd_clear_depth_stencil_image)(
754            command_buffer,
755            image,
756            image_layout,
757            depth_stencil,
758            ranges.len() as u32,
759            ranges.as_ptr().cast(),
760        );
761    }
762
763    /// <https://www.khronos.org/registry/vulkan/specs/latest/man/html/vkCmdCopyBuffer.html>
764    #[inline]
765    unsafe fn cmd_copy_buffer(
766        &self,
767        command_buffer: CommandBuffer,
768        src_buffer: Buffer,
769        dst_buffer: Buffer,
770        regions: &[impl Cast<Target = BufferCopy>],
771    ) {
772        let __result = (self.commands().cmd_copy_buffer)(
773            command_buffer,
774            src_buffer,
775            dst_buffer,
776            regions.len() as u32,
777            regions.as_ptr().cast(),
778        );
779    }
780
781    /// <https://www.khronos.org/registry/vulkan/specs/latest/man/html/vkCmdCopyBufferToImage.html>
782    #[inline]
783    unsafe fn cmd_copy_buffer_to_image(
784        &self,
785        command_buffer: CommandBuffer,
786        src_buffer: Buffer,
787        dst_image: Image,
788        dst_image_layout: ImageLayout,
789        regions: &[impl Cast<Target = BufferImageCopy>],
790    ) {
791        let __result = (self.commands().cmd_copy_buffer_to_image)(
792            command_buffer,
793            src_buffer,
794            dst_image,
795            dst_image_layout,
796            regions.len() as u32,
797            regions.as_ptr().cast(),
798        );
799    }
800
801    /// <https://www.khronos.org/registry/vulkan/specs/latest/man/html/vkCmdCopyImage.html>
802    #[inline]
803    unsafe fn cmd_copy_image(
804        &self,
805        command_buffer: CommandBuffer,
806        src_image: Image,
807        src_image_layout: ImageLayout,
808        dst_image: Image,
809        dst_image_layout: ImageLayout,
810        regions: &[impl Cast<Target = ImageCopy>],
811    ) {
812        let __result = (self.commands().cmd_copy_image)(
813            command_buffer,
814            src_image,
815            src_image_layout,
816            dst_image,
817            dst_image_layout,
818            regions.len() as u32,
819            regions.as_ptr().cast(),
820        );
821    }
822
823    /// <https://www.khronos.org/registry/vulkan/specs/latest/man/html/vkCmdCopyImageToBuffer.html>
824    #[inline]
825    unsafe fn cmd_copy_image_to_buffer(
826        &self,
827        command_buffer: CommandBuffer,
828        src_image: Image,
829        src_image_layout: ImageLayout,
830        dst_buffer: Buffer,
831        regions: &[impl Cast<Target = BufferImageCopy>],
832    ) {
833        let __result = (self.commands().cmd_copy_image_to_buffer)(
834            command_buffer,
835            src_image,
836            src_image_layout,
837            dst_buffer,
838            regions.len() as u32,
839            regions.as_ptr().cast(),
840        );
841    }
842
843    /// <https://www.khronos.org/registry/vulkan/specs/latest/man/html/vkCmdCopyQueryPoolResults.html>
844    #[inline]
845    unsafe fn cmd_copy_query_pool_results(
846        &self,
847        command_buffer: CommandBuffer,
848        query_pool: QueryPool,
849        first_query: u32,
850        query_count: u32,
851        dst_buffer: Buffer,
852        dst_offset: DeviceSize,
853        stride: DeviceSize,
854        flags: QueryResultFlags,
855    ) {
856        let __result = (self.commands().cmd_copy_query_pool_results)(
857            command_buffer,
858            query_pool,
859            first_query,
860            query_count,
861            dst_buffer,
862            dst_offset,
863            stride,
864            flags,
865        );
866    }
867
868    /// <https://www.khronos.org/registry/vulkan/specs/latest/man/html/vkCmdDispatch.html>
869    #[inline]
870    unsafe fn cmd_dispatch(
871        &self,
872        command_buffer: CommandBuffer,
873        group_count_x: u32,
874        group_count_y: u32,
875        group_count_z: u32,
876    ) {
877        let __result = (self.commands().cmd_dispatch)(
878            command_buffer,
879            group_count_x,
880            group_count_y,
881            group_count_z,
882        );
883    }
884
885    /// <https://www.khronos.org/registry/vulkan/specs/latest/man/html/vkCmdDispatchIndirect.html>
886    #[inline]
887    unsafe fn cmd_dispatch_indirect(
888        &self,
889        command_buffer: CommandBuffer,
890        buffer: Buffer,
891        offset: DeviceSize,
892    ) {
893        let __result = (self.commands().cmd_dispatch_indirect)(command_buffer, buffer, offset);
894    }
895
896    /// <https://www.khronos.org/registry/vulkan/specs/latest/man/html/vkCmdDraw.html>
897    #[inline]
898    unsafe fn cmd_draw(
899        &self,
900        command_buffer: CommandBuffer,
901        vertex_count: u32,
902        instance_count: u32,
903        first_vertex: u32,
904        first_instance: u32,
905    ) {
906        let __result = (self.commands().cmd_draw)(
907            command_buffer,
908            vertex_count,
909            instance_count,
910            first_vertex,
911            first_instance,
912        );
913    }
914
915    /// <https://www.khronos.org/registry/vulkan/specs/latest/man/html/vkCmdDrawIndexed.html>
916    #[inline]
917    unsafe fn cmd_draw_indexed(
918        &self,
919        command_buffer: CommandBuffer,
920        index_count: u32,
921        instance_count: u32,
922        first_index: u32,
923        vertex_offset: i32,
924        first_instance: u32,
925    ) {
926        let __result = (self.commands().cmd_draw_indexed)(
927            command_buffer,
928            index_count,
929            instance_count,
930            first_index,
931            vertex_offset,
932            first_instance,
933        );
934    }
935
936    /// <https://www.khronos.org/registry/vulkan/specs/latest/man/html/vkCmdDrawIndexedIndirect.html>
937    #[inline]
938    unsafe fn cmd_draw_indexed_indirect(
939        &self,
940        command_buffer: CommandBuffer,
941        buffer: Buffer,
942        offset: DeviceSize,
943        draw_count: u32,
944        stride: u32,
945    ) {
946        let __result = (self.commands().cmd_draw_indexed_indirect)(
947            command_buffer,
948            buffer,
949            offset,
950            draw_count,
951            stride,
952        );
953    }
954
955    /// <https://www.khronos.org/registry/vulkan/specs/latest/man/html/vkCmdDrawIndirect.html>
956    #[inline]
957    unsafe fn cmd_draw_indirect(
958        &self,
959        command_buffer: CommandBuffer,
960        buffer: Buffer,
961        offset: DeviceSize,
962        draw_count: u32,
963        stride: u32,
964    ) {
965        let __result =
966            (self.commands().cmd_draw_indirect)(command_buffer, buffer, offset, draw_count, stride);
967    }
968
969    /// <https://www.khronos.org/registry/vulkan/specs/latest/man/html/vkCmdEndQuery.html>
970    #[inline]
971    unsafe fn cmd_end_query(
972        &self,
973        command_buffer: CommandBuffer,
974        query_pool: QueryPool,
975        query: u32,
976    ) {
977        let __result = (self.commands().cmd_end_query)(command_buffer, query_pool, query);
978    }
979
980    /// <https://www.khronos.org/registry/vulkan/specs/latest/man/html/vkCmdEndRenderPass.html>
981    #[inline]
982    unsafe fn cmd_end_render_pass(&self, command_buffer: CommandBuffer) {
983        let __result = (self.commands().cmd_end_render_pass)(command_buffer);
984    }
985
986    /// <https://www.khronos.org/registry/vulkan/specs/latest/man/html/vkCmdExecuteCommands.html>
987    #[inline]
988    unsafe fn cmd_execute_commands(
989        &self,
990        command_buffer: CommandBuffer,
991        command_buffers: &[CommandBuffer],
992    ) {
993        let __result = (self.commands().cmd_execute_commands)(
994            command_buffer,
995            command_buffers.len() as u32,
996            command_buffers.as_ptr(),
997        );
998    }
999
1000    /// <https://www.khronos.org/registry/vulkan/specs/latest/man/html/vkCmdFillBuffer.html>
1001    #[inline]
1002    unsafe fn cmd_fill_buffer(
1003        &self,
1004        command_buffer: CommandBuffer,
1005        dst_buffer: Buffer,
1006        dst_offset: DeviceSize,
1007        size: DeviceSize,
1008        data: u32,
1009    ) {
1010        let __result =
1011            (self.commands().cmd_fill_buffer)(command_buffer, dst_buffer, dst_offset, size, data);
1012    }
1013
1014    /// <https://www.khronos.org/registry/vulkan/specs/latest/man/html/vkCmdNextSubpass.html>
1015    #[inline]
1016    unsafe fn cmd_next_subpass(&self, command_buffer: CommandBuffer, contents: SubpassContents) {
1017        let __result = (self.commands().cmd_next_subpass)(command_buffer, contents);
1018    }
1019
1020    /// <https://www.khronos.org/registry/vulkan/specs/latest/man/html/vkCmdPipelineBarrier.html>
1021    #[inline]
1022    unsafe fn cmd_pipeline_barrier(
1023        &self,
1024        command_buffer: CommandBuffer,
1025        src_stage_mask: PipelineStageFlags,
1026        dst_stage_mask: PipelineStageFlags,
1027        dependency_flags: DependencyFlags,
1028        memory_barriers: &[impl Cast<Target = MemoryBarrier>],
1029        buffer_memory_barriers: &[impl Cast<Target = BufferMemoryBarrier>],
1030        image_memory_barriers: &[impl Cast<Target = ImageMemoryBarrier>],
1031    ) {
1032        let __result = (self.commands().cmd_pipeline_barrier)(
1033            command_buffer,
1034            src_stage_mask,
1035            dst_stage_mask,
1036            dependency_flags,
1037            memory_barriers.len() as u32,
1038            memory_barriers.as_ptr().cast(),
1039            buffer_memory_barriers.len() as u32,
1040            buffer_memory_barriers.as_ptr().cast(),
1041            image_memory_barriers.len() as u32,
1042            image_memory_barriers.as_ptr().cast(),
1043        );
1044    }
1045
1046    /// <https://www.khronos.org/registry/vulkan/specs/latest/man/html/vkCmdPushConstants.html>
1047    #[inline]
1048    unsafe fn cmd_push_constants(
1049        &self,
1050        command_buffer: CommandBuffer,
1051        layout: PipelineLayout,
1052        stage_flags: ShaderStageFlags,
1053        offset: u32,
1054        values: &[u8],
1055    ) {
1056        let __result = (self.commands().cmd_push_constants)(
1057            command_buffer,
1058            layout,
1059            stage_flags,
1060            offset,
1061            values.len() as u32,
1062            values.as_ptr() as *const c_void,
1063        );
1064    }
1065
1066    /// <https://www.khronos.org/registry/vulkan/specs/latest/man/html/vkCmdResetEvent.html>
1067    #[inline]
1068    unsafe fn cmd_reset_event(
1069        &self,
1070        command_buffer: CommandBuffer,
1071        event: Event,
1072        stage_mask: PipelineStageFlags,
1073    ) {
1074        let __result = (self.commands().cmd_reset_event)(command_buffer, event, stage_mask);
1075    }
1076
1077    /// <https://www.khronos.org/registry/vulkan/specs/latest/man/html/vkCmdResetQueryPool.html>
1078    #[inline]
1079    unsafe fn cmd_reset_query_pool(
1080        &self,
1081        command_buffer: CommandBuffer,
1082        query_pool: QueryPool,
1083        first_query: u32,
1084        query_count: u32,
1085    ) {
1086        let __result = (self.commands().cmd_reset_query_pool)(
1087            command_buffer,
1088            query_pool,
1089            first_query,
1090            query_count,
1091        );
1092    }
1093
1094    /// <https://www.khronos.org/registry/vulkan/specs/latest/man/html/vkCmdResolveImage.html>
1095    #[inline]
1096    unsafe fn cmd_resolve_image(
1097        &self,
1098        command_buffer: CommandBuffer,
1099        src_image: Image,
1100        src_image_layout: ImageLayout,
1101        dst_image: Image,
1102        dst_image_layout: ImageLayout,
1103        regions: &[impl Cast<Target = ImageResolve>],
1104    ) {
1105        let __result = (self.commands().cmd_resolve_image)(
1106            command_buffer,
1107            src_image,
1108            src_image_layout,
1109            dst_image,
1110            dst_image_layout,
1111            regions.len() as u32,
1112            regions.as_ptr().cast(),
1113        );
1114    }
1115
1116    /// <https://www.khronos.org/registry/vulkan/specs/latest/man/html/vkCmdSetBlendConstants.html>
1117    #[inline]
1118    unsafe fn cmd_set_blend_constants(
1119        &self,
1120        command_buffer: CommandBuffer,
1121        blend_constants: [f32; 4],
1122    ) {
1123        let __result =
1124            (self.commands().cmd_set_blend_constants)(command_buffer, blend_constants.as_ptr());
1125    }
1126
1127    /// <https://www.khronos.org/registry/vulkan/specs/latest/man/html/vkCmdSetDepthBias.html>
1128    #[inline]
1129    unsafe fn cmd_set_depth_bias(
1130        &self,
1131        command_buffer: CommandBuffer,
1132        depth_bias_constant_factor: f32,
1133        depth_bias_clamp: f32,
1134        depth_bias_slope_factor: f32,
1135    ) {
1136        let __result = (self.commands().cmd_set_depth_bias)(
1137            command_buffer,
1138            depth_bias_constant_factor,
1139            depth_bias_clamp,
1140            depth_bias_slope_factor,
1141        );
1142    }
1143
1144    /// <https://www.khronos.org/registry/vulkan/specs/latest/man/html/vkCmdSetDepthBounds.html>
1145    #[inline]
1146    unsafe fn cmd_set_depth_bounds(
1147        &self,
1148        command_buffer: CommandBuffer,
1149        min_depth_bounds: f32,
1150        max_depth_bounds: f32,
1151    ) {
1152        let __result = (self.commands().cmd_set_depth_bounds)(
1153            command_buffer,
1154            min_depth_bounds,
1155            max_depth_bounds,
1156        );
1157    }
1158
1159    /// <https://www.khronos.org/registry/vulkan/specs/latest/man/html/vkCmdSetEvent.html>
1160    #[inline]
1161    unsafe fn cmd_set_event(
1162        &self,
1163        command_buffer: CommandBuffer,
1164        event: Event,
1165        stage_mask: PipelineStageFlags,
1166    ) {
1167        let __result = (self.commands().cmd_set_event)(command_buffer, event, stage_mask);
1168    }
1169
1170    /// <https://www.khronos.org/registry/vulkan/specs/latest/man/html/vkCmdSetLineWidth.html>
1171    #[inline]
1172    unsafe fn cmd_set_line_width(&self, command_buffer: CommandBuffer, line_width: f32) {
1173        let __result = (self.commands().cmd_set_line_width)(command_buffer, line_width);
1174    }
1175
1176    /// <https://www.khronos.org/registry/vulkan/specs/latest/man/html/vkCmdSetScissor.html>
1177    #[inline]
1178    unsafe fn cmd_set_scissor(
1179        &self,
1180        command_buffer: CommandBuffer,
1181        first_scissor: u32,
1182        scissors: &[impl Cast<Target = Rect2D>],
1183    ) {
1184        let __result = (self.commands().cmd_set_scissor)(
1185            command_buffer,
1186            first_scissor,
1187            scissors.len() as u32,
1188            scissors.as_ptr().cast(),
1189        );
1190    }
1191
1192    /// <https://www.khronos.org/registry/vulkan/specs/latest/man/html/vkCmdSetStencilCompareMask.html>
1193    #[inline]
1194    unsafe fn cmd_set_stencil_compare_mask(
1195        &self,
1196        command_buffer: CommandBuffer,
1197        face_mask: StencilFaceFlags,
1198        compare_mask: u32,
1199    ) {
1200        let __result =
1201            (self.commands().cmd_set_stencil_compare_mask)(command_buffer, face_mask, compare_mask);
1202    }
1203
1204    /// <https://www.khronos.org/registry/vulkan/specs/latest/man/html/vkCmdSetStencilReference.html>
1205    #[inline]
1206    unsafe fn cmd_set_stencil_reference(
1207        &self,
1208        command_buffer: CommandBuffer,
1209        face_mask: StencilFaceFlags,
1210        reference: u32,
1211    ) {
1212        let __result =
1213            (self.commands().cmd_set_stencil_reference)(command_buffer, face_mask, reference);
1214    }
1215
1216    /// <https://www.khronos.org/registry/vulkan/specs/latest/man/html/vkCmdSetStencilWriteMask.html>
1217    #[inline]
1218    unsafe fn cmd_set_stencil_write_mask(
1219        &self,
1220        command_buffer: CommandBuffer,
1221        face_mask: StencilFaceFlags,
1222        write_mask: u32,
1223    ) {
1224        let __result =
1225            (self.commands().cmd_set_stencil_write_mask)(command_buffer, face_mask, write_mask);
1226    }
1227
1228    /// <https://www.khronos.org/registry/vulkan/specs/latest/man/html/vkCmdSetViewport.html>
1229    #[inline]
1230    unsafe fn cmd_set_viewport(
1231        &self,
1232        command_buffer: CommandBuffer,
1233        first_viewport: u32,
1234        viewports: &[impl Cast<Target = Viewport>],
1235    ) {
1236        let __result = (self.commands().cmd_set_viewport)(
1237            command_buffer,
1238            first_viewport,
1239            viewports.len() as u32,
1240            viewports.as_ptr().cast(),
1241        );
1242    }
1243
1244    /// <https://www.khronos.org/registry/vulkan/specs/latest/man/html/vkCmdUpdateBuffer.html>
1245    #[inline]
1246    unsafe fn cmd_update_buffer(
1247        &self,
1248        command_buffer: CommandBuffer,
1249        dst_buffer: Buffer,
1250        dst_offset: DeviceSize,
1251        data: &[u8],
1252    ) {
1253        let __result = (self.commands().cmd_update_buffer)(
1254            command_buffer,
1255            dst_buffer,
1256            dst_offset,
1257            data.len() as DeviceSize,
1258            data.as_ptr() as *const c_void,
1259        );
1260    }
1261
1262    /// <https://www.khronos.org/registry/vulkan/specs/latest/man/html/vkCmdWaitEvents.html>
1263    #[inline]
1264    unsafe fn cmd_wait_events(
1265        &self,
1266        command_buffer: CommandBuffer,
1267        events: &[Event],
1268        src_stage_mask: PipelineStageFlags,
1269        dst_stage_mask: PipelineStageFlags,
1270        memory_barriers: &[impl Cast<Target = MemoryBarrier>],
1271        buffer_memory_barriers: &[impl Cast<Target = BufferMemoryBarrier>],
1272        image_memory_barriers: &[impl Cast<Target = ImageMemoryBarrier>],
1273    ) {
1274        let __result = (self.commands().cmd_wait_events)(
1275            command_buffer,
1276            events.len() as u32,
1277            events.as_ptr(),
1278            src_stage_mask,
1279            dst_stage_mask,
1280            memory_barriers.len() as u32,
1281            memory_barriers.as_ptr().cast(),
1282            buffer_memory_barriers.len() as u32,
1283            buffer_memory_barriers.as_ptr().cast(),
1284            image_memory_barriers.len() as u32,
1285            image_memory_barriers.as_ptr().cast(),
1286        );
1287    }
1288
1289    /// <https://www.khronos.org/registry/vulkan/specs/latest/man/html/vkCmdWriteTimestamp.html>
1290    #[inline]
1291    unsafe fn cmd_write_timestamp(
1292        &self,
1293        command_buffer: CommandBuffer,
1294        pipeline_stage: PipelineStageFlags,
1295        query_pool: QueryPool,
1296        query: u32,
1297    ) {
1298        let __result = (self.commands().cmd_write_timestamp)(
1299            command_buffer,
1300            pipeline_stage,
1301            query_pool,
1302            query,
1303        );
1304    }
1305
1306    /// <https://www.khronos.org/registry/vulkan/specs/latest/man/html/vkCreateBuffer.html>
1307    #[inline]
1308    unsafe fn create_buffer(
1309        &self,
1310        create_info: &BufferCreateInfo,
1311        allocator: Option<&AllocationCallbacks>,
1312    ) -> crate::VkResult<Buffer> {
1313        let mut buffer = MaybeUninit::<Buffer>::uninit();
1314
1315        let __result = (self.commands().create_buffer)(
1316            self.handle(),
1317            create_info,
1318            allocator.map_or(ptr::null(), |v| v),
1319            buffer.as_mut_ptr(),
1320        );
1321
1322        if __result == Result::SUCCESS {
1323            Ok(buffer.assume_init())
1324        } else {
1325            Err(__result.into())
1326        }
1327    }
1328
1329    /// <https://www.khronos.org/registry/vulkan/specs/latest/man/html/vkCreateBufferView.html>
1330    #[inline]
1331    unsafe fn create_buffer_view(
1332        &self,
1333        create_info: &BufferViewCreateInfo,
1334        allocator: Option<&AllocationCallbacks>,
1335    ) -> crate::VkResult<BufferView> {
1336        let mut view = MaybeUninit::<BufferView>::uninit();
1337
1338        let __result = (self.commands().create_buffer_view)(
1339            self.handle(),
1340            create_info,
1341            allocator.map_or(ptr::null(), |v| v),
1342            view.as_mut_ptr(),
1343        );
1344
1345        if __result == Result::SUCCESS {
1346            Ok(view.assume_init())
1347        } else {
1348            Err(__result.into())
1349        }
1350    }
1351
1352    /// <https://www.khronos.org/registry/vulkan/specs/latest/man/html/vkCreateCommandPool.html>
1353    #[inline]
1354    unsafe fn create_command_pool(
1355        &self,
1356        create_info: &CommandPoolCreateInfo,
1357        allocator: Option<&AllocationCallbacks>,
1358    ) -> crate::VkResult<CommandPool> {
1359        let mut command_pool = MaybeUninit::<CommandPool>::uninit();
1360
1361        let __result = (self.commands().create_command_pool)(
1362            self.handle(),
1363            create_info,
1364            allocator.map_or(ptr::null(), |v| v),
1365            command_pool.as_mut_ptr(),
1366        );
1367
1368        if __result == Result::SUCCESS {
1369            Ok(command_pool.assume_init())
1370        } else {
1371            Err(__result.into())
1372        }
1373    }
1374
1375    /// <https://www.khronos.org/registry/vulkan/specs/latest/man/html/vkCreateComputePipelines.html>
1376    #[inline]
1377    unsafe fn create_compute_pipelines(
1378        &self,
1379        pipeline_cache: PipelineCache,
1380        create_infos: &[impl Cast<Target = ComputePipelineCreateInfo>],
1381        allocator: Option<&AllocationCallbacks>,
1382    ) -> crate::VkSuccessResult<Vec<Pipeline>> {
1383        let mut pipelines = Vec::with_capacity(create_infos.len() as usize);
1384
1385        let __result = (self.commands().create_compute_pipelines)(
1386            self.handle(),
1387            pipeline_cache,
1388            create_infos.len() as u32,
1389            create_infos.as_ptr().cast(),
1390            allocator.map_or(ptr::null(), |v| v),
1391            pipelines.as_mut_ptr(),
1392        );
1393
1394        pipelines.set_len(create_infos.len() as usize);
1395
1396        if __result >= Result::SUCCESS {
1397            Ok((pipelines, __result.into()))
1398        } else {
1399            Err(__result.into())
1400        }
1401    }
1402
1403    /// <https://www.khronos.org/registry/vulkan/specs/latest/man/html/vkCreateDescriptorPool.html>
1404    #[inline]
1405    unsafe fn create_descriptor_pool(
1406        &self,
1407        create_info: &DescriptorPoolCreateInfo,
1408        allocator: Option<&AllocationCallbacks>,
1409    ) -> crate::VkResult<DescriptorPool> {
1410        let mut descriptor_pool = MaybeUninit::<DescriptorPool>::uninit();
1411
1412        let __result = (self.commands().create_descriptor_pool)(
1413            self.handle(),
1414            create_info,
1415            allocator.map_or(ptr::null(), |v| v),
1416            descriptor_pool.as_mut_ptr(),
1417        );
1418
1419        if __result == Result::SUCCESS {
1420            Ok(descriptor_pool.assume_init())
1421        } else {
1422            Err(__result.into())
1423        }
1424    }
1425
1426    /// <https://www.khronos.org/registry/vulkan/specs/latest/man/html/vkCreateDescriptorSetLayout.html>
1427    #[inline]
1428    unsafe fn create_descriptor_set_layout(
1429        &self,
1430        create_info: &DescriptorSetLayoutCreateInfo,
1431        allocator: Option<&AllocationCallbacks>,
1432    ) -> crate::VkResult<DescriptorSetLayout> {
1433        let mut set_layout = MaybeUninit::<DescriptorSetLayout>::uninit();
1434
1435        let __result = (self.commands().create_descriptor_set_layout)(
1436            self.handle(),
1437            create_info,
1438            allocator.map_or(ptr::null(), |v| v),
1439            set_layout.as_mut_ptr(),
1440        );
1441
1442        if __result == Result::SUCCESS {
1443            Ok(set_layout.assume_init())
1444        } else {
1445            Err(__result.into())
1446        }
1447    }
1448
1449    /// <https://www.khronos.org/registry/vulkan/specs/latest/man/html/vkCreateEvent.html>
1450    #[inline]
1451    unsafe fn create_event(
1452        &self,
1453        create_info: &EventCreateInfo,
1454        allocator: Option<&AllocationCallbacks>,
1455    ) -> crate::VkResult<Event> {
1456        let mut event = MaybeUninit::<Event>::uninit();
1457
1458        let __result = (self.commands().create_event)(
1459            self.handle(),
1460            create_info,
1461            allocator.map_or(ptr::null(), |v| v),
1462            event.as_mut_ptr(),
1463        );
1464
1465        if __result == Result::SUCCESS {
1466            Ok(event.assume_init())
1467        } else {
1468            Err(__result.into())
1469        }
1470    }
1471
1472    /// <https://www.khronos.org/registry/vulkan/specs/latest/man/html/vkCreateFence.html>
1473    #[inline]
1474    unsafe fn create_fence(
1475        &self,
1476        create_info: &FenceCreateInfo,
1477        allocator: Option<&AllocationCallbacks>,
1478    ) -> crate::VkResult<Fence> {
1479        let mut fence = MaybeUninit::<Fence>::uninit();
1480
1481        let __result = (self.commands().create_fence)(
1482            self.handle(),
1483            create_info,
1484            allocator.map_or(ptr::null(), |v| v),
1485            fence.as_mut_ptr(),
1486        );
1487
1488        if __result == Result::SUCCESS {
1489            Ok(fence.assume_init())
1490        } else {
1491            Err(__result.into())
1492        }
1493    }
1494
1495    /// <https://www.khronos.org/registry/vulkan/specs/latest/man/html/vkCreateFramebuffer.html>
1496    #[inline]
1497    unsafe fn create_framebuffer(
1498        &self,
1499        create_info: &FramebufferCreateInfo,
1500        allocator: Option<&AllocationCallbacks>,
1501    ) -> crate::VkResult<Framebuffer> {
1502        let mut framebuffer = MaybeUninit::<Framebuffer>::uninit();
1503
1504        let __result = (self.commands().create_framebuffer)(
1505            self.handle(),
1506            create_info,
1507            allocator.map_or(ptr::null(), |v| v),
1508            framebuffer.as_mut_ptr(),
1509        );
1510
1511        if __result == Result::SUCCESS {
1512            Ok(framebuffer.assume_init())
1513        } else {
1514            Err(__result.into())
1515        }
1516    }
1517
1518    /// <https://www.khronos.org/registry/vulkan/specs/latest/man/html/vkCreateGraphicsPipelines.html>
1519    #[inline]
1520    unsafe fn create_graphics_pipelines(
1521        &self,
1522        pipeline_cache: PipelineCache,
1523        create_infos: &[impl Cast<Target = GraphicsPipelineCreateInfo>],
1524        allocator: Option<&AllocationCallbacks>,
1525    ) -> crate::VkSuccessResult<Vec<Pipeline>> {
1526        let mut pipelines = Vec::with_capacity(create_infos.len() as usize);
1527
1528        let __result = (self.commands().create_graphics_pipelines)(
1529            self.handle(),
1530            pipeline_cache,
1531            create_infos.len() as u32,
1532            create_infos.as_ptr().cast(),
1533            allocator.map_or(ptr::null(), |v| v),
1534            pipelines.as_mut_ptr(),
1535        );
1536
1537        pipelines.set_len(create_infos.len() as usize);
1538
1539        if __result >= Result::SUCCESS {
1540            Ok((pipelines, __result.into()))
1541        } else {
1542            Err(__result.into())
1543        }
1544    }
1545
1546    /// <https://www.khronos.org/registry/vulkan/specs/latest/man/html/vkCreateImage.html>
1547    #[inline]
1548    unsafe fn create_image(
1549        &self,
1550        create_info: &ImageCreateInfo,
1551        allocator: Option<&AllocationCallbacks>,
1552    ) -> crate::VkResult<Image> {
1553        let mut image = MaybeUninit::<Image>::uninit();
1554
1555        let __result = (self.commands().create_image)(
1556            self.handle(),
1557            create_info,
1558            allocator.map_or(ptr::null(), |v| v),
1559            image.as_mut_ptr(),
1560        );
1561
1562        if __result == Result::SUCCESS {
1563            Ok(image.assume_init())
1564        } else {
1565            Err(__result.into())
1566        }
1567    }
1568
1569    /// <https://www.khronos.org/registry/vulkan/specs/latest/man/html/vkCreateImageView.html>
1570    #[inline]
1571    unsafe fn create_image_view(
1572        &self,
1573        create_info: &ImageViewCreateInfo,
1574        allocator: Option<&AllocationCallbacks>,
1575    ) -> crate::VkResult<ImageView> {
1576        let mut view = MaybeUninit::<ImageView>::uninit();
1577
1578        let __result = (self.commands().create_image_view)(
1579            self.handle(),
1580            create_info,
1581            allocator.map_or(ptr::null(), |v| v),
1582            view.as_mut_ptr(),
1583        );
1584
1585        if __result == Result::SUCCESS {
1586            Ok(view.assume_init())
1587        } else {
1588            Err(__result.into())
1589        }
1590    }
1591
1592    /// <https://www.khronos.org/registry/vulkan/specs/latest/man/html/vkCreatePipelineCache.html>
1593    #[inline]
1594    unsafe fn create_pipeline_cache(
1595        &self,
1596        create_info: &PipelineCacheCreateInfo,
1597        allocator: Option<&AllocationCallbacks>,
1598    ) -> crate::VkResult<PipelineCache> {
1599        let mut pipeline_cache = MaybeUninit::<PipelineCache>::uninit();
1600
1601        let __result = (self.commands().create_pipeline_cache)(
1602            self.handle(),
1603            create_info,
1604            allocator.map_or(ptr::null(), |v| v),
1605            pipeline_cache.as_mut_ptr(),
1606        );
1607
1608        if __result == Result::SUCCESS {
1609            Ok(pipeline_cache.assume_init())
1610        } else {
1611            Err(__result.into())
1612        }
1613    }
1614
1615    /// <https://www.khronos.org/registry/vulkan/specs/latest/man/html/vkCreatePipelineLayout.html>
1616    #[inline]
1617    unsafe fn create_pipeline_layout(
1618        &self,
1619        create_info: &PipelineLayoutCreateInfo,
1620        allocator: Option<&AllocationCallbacks>,
1621    ) -> crate::VkResult<PipelineLayout> {
1622        let mut pipeline_layout = MaybeUninit::<PipelineLayout>::uninit();
1623
1624        let __result = (self.commands().create_pipeline_layout)(
1625            self.handle(),
1626            create_info,
1627            allocator.map_or(ptr::null(), |v| v),
1628            pipeline_layout.as_mut_ptr(),
1629        );
1630
1631        if __result == Result::SUCCESS {
1632            Ok(pipeline_layout.assume_init())
1633        } else {
1634            Err(__result.into())
1635        }
1636    }
1637
1638    /// <https://www.khronos.org/registry/vulkan/specs/latest/man/html/vkCreateQueryPool.html>
1639    #[inline]
1640    unsafe fn create_query_pool(
1641        &self,
1642        create_info: &QueryPoolCreateInfo,
1643        allocator: Option<&AllocationCallbacks>,
1644    ) -> crate::VkResult<QueryPool> {
1645        let mut query_pool = MaybeUninit::<QueryPool>::uninit();
1646
1647        let __result = (self.commands().create_query_pool)(
1648            self.handle(),
1649            create_info,
1650            allocator.map_or(ptr::null(), |v| v),
1651            query_pool.as_mut_ptr(),
1652        );
1653
1654        if __result == Result::SUCCESS {
1655            Ok(query_pool.assume_init())
1656        } else {
1657            Err(__result.into())
1658        }
1659    }
1660
1661    /// <https://www.khronos.org/registry/vulkan/specs/latest/man/html/vkCreateRenderPass.html>
1662    #[inline]
1663    unsafe fn create_render_pass(
1664        &self,
1665        create_info: &RenderPassCreateInfo,
1666        allocator: Option<&AllocationCallbacks>,
1667    ) -> crate::VkResult<RenderPass> {
1668        let mut render_pass = MaybeUninit::<RenderPass>::uninit();
1669
1670        let __result = (self.commands().create_render_pass)(
1671            self.handle(),
1672            create_info,
1673            allocator.map_or(ptr::null(), |v| v),
1674            render_pass.as_mut_ptr(),
1675        );
1676
1677        if __result == Result::SUCCESS {
1678            Ok(render_pass.assume_init())
1679        } else {
1680            Err(__result.into())
1681        }
1682    }
1683
1684    /// <https://www.khronos.org/registry/vulkan/specs/latest/man/html/vkCreateSampler.html>
1685    #[inline]
1686    unsafe fn create_sampler(
1687        &self,
1688        create_info: &SamplerCreateInfo,
1689        allocator: Option<&AllocationCallbacks>,
1690    ) -> crate::VkResult<Sampler> {
1691        let mut sampler = MaybeUninit::<Sampler>::uninit();
1692
1693        let __result = (self.commands().create_sampler)(
1694            self.handle(),
1695            create_info,
1696            allocator.map_or(ptr::null(), |v| v),
1697            sampler.as_mut_ptr(),
1698        );
1699
1700        if __result == Result::SUCCESS {
1701            Ok(sampler.assume_init())
1702        } else {
1703            Err(__result.into())
1704        }
1705    }
1706
1707    /// <https://www.khronos.org/registry/vulkan/specs/latest/man/html/vkCreateSemaphore.html>
1708    #[inline]
1709    unsafe fn create_semaphore(
1710        &self,
1711        create_info: &SemaphoreCreateInfo,
1712        allocator: Option<&AllocationCallbacks>,
1713    ) -> crate::VkResult<Semaphore> {
1714        let mut semaphore = MaybeUninit::<Semaphore>::uninit();
1715
1716        let __result = (self.commands().create_semaphore)(
1717            self.handle(),
1718            create_info,
1719            allocator.map_or(ptr::null(), |v| v),
1720            semaphore.as_mut_ptr(),
1721        );
1722
1723        if __result == Result::SUCCESS {
1724            Ok(semaphore.assume_init())
1725        } else {
1726            Err(__result.into())
1727        }
1728    }
1729
1730    /// <https://www.khronos.org/registry/vulkan/specs/latest/man/html/vkCreateShaderModule.html>
1731    #[inline]
1732    unsafe fn create_shader_module(
1733        &self,
1734        create_info: &ShaderModuleCreateInfo,
1735        allocator: Option<&AllocationCallbacks>,
1736    ) -> crate::VkResult<ShaderModule> {
1737        let mut shader_module = MaybeUninit::<ShaderModule>::uninit();
1738
1739        let __result = (self.commands().create_shader_module)(
1740            self.handle(),
1741            create_info,
1742            allocator.map_or(ptr::null(), |v| v),
1743            shader_module.as_mut_ptr(),
1744        );
1745
1746        if __result == Result::SUCCESS {
1747            Ok(shader_module.assume_init())
1748        } else {
1749            Err(__result.into())
1750        }
1751    }
1752
1753    /// <https://www.khronos.org/registry/vulkan/specs/latest/man/html/vkDestroyBuffer.html>
1754    #[inline]
1755    unsafe fn destroy_buffer(&self, buffer: Buffer, allocator: Option<&AllocationCallbacks>) {
1756        let __result = (self.commands().destroy_buffer)(
1757            self.handle(),
1758            buffer,
1759            allocator.map_or(ptr::null(), |v| v),
1760        );
1761    }
1762
1763    /// <https://www.khronos.org/registry/vulkan/specs/latest/man/html/vkDestroyBufferView.html>
1764    #[inline]
1765    unsafe fn destroy_buffer_view(
1766        &self,
1767        buffer_view: BufferView,
1768        allocator: Option<&AllocationCallbacks>,
1769    ) {
1770        let __result = (self.commands().destroy_buffer_view)(
1771            self.handle(),
1772            buffer_view,
1773            allocator.map_or(ptr::null(), |v| v),
1774        );
1775    }
1776
1777    /// <https://www.khronos.org/registry/vulkan/specs/latest/man/html/vkDestroyCommandPool.html>
1778    #[inline]
1779    unsafe fn destroy_command_pool(
1780        &self,
1781        command_pool: CommandPool,
1782        allocator: Option<&AllocationCallbacks>,
1783    ) {
1784        let __result = (self.commands().destroy_command_pool)(
1785            self.handle(),
1786            command_pool,
1787            allocator.map_or(ptr::null(), |v| v),
1788        );
1789    }
1790
1791    /// <https://www.khronos.org/registry/vulkan/specs/latest/man/html/vkDestroyDescriptorPool.html>
1792    #[inline]
1793    unsafe fn destroy_descriptor_pool(
1794        &self,
1795        descriptor_pool: DescriptorPool,
1796        allocator: Option<&AllocationCallbacks>,
1797    ) {
1798        let __result = (self.commands().destroy_descriptor_pool)(
1799            self.handle(),
1800            descriptor_pool,
1801            allocator.map_or(ptr::null(), |v| v),
1802        );
1803    }
1804
1805    /// <https://www.khronos.org/registry/vulkan/specs/latest/man/html/vkDestroyDescriptorSetLayout.html>
1806    #[inline]
1807    unsafe fn destroy_descriptor_set_layout(
1808        &self,
1809        descriptor_set_layout: DescriptorSetLayout,
1810        allocator: Option<&AllocationCallbacks>,
1811    ) {
1812        let __result = (self.commands().destroy_descriptor_set_layout)(
1813            self.handle(),
1814            descriptor_set_layout,
1815            allocator.map_or(ptr::null(), |v| v),
1816        );
1817    }
1818
1819    /// <https://www.khronos.org/registry/vulkan/specs/latest/man/html/vkDestroyDevice.html>
1820    #[inline]
1821    unsafe fn destroy_device(&self, allocator: Option<&AllocationCallbacks>) {
1822        let __result =
1823            (self.commands().destroy_device)(self.handle(), allocator.map_or(ptr::null(), |v| v));
1824    }
1825
1826    /// <https://www.khronos.org/registry/vulkan/specs/latest/man/html/vkDestroyEvent.html>
1827    #[inline]
1828    unsafe fn destroy_event(&self, event: Event, allocator: Option<&AllocationCallbacks>) {
1829        let __result = (self.commands().destroy_event)(
1830            self.handle(),
1831            event,
1832            allocator.map_or(ptr::null(), |v| v),
1833        );
1834    }
1835
1836    /// <https://www.khronos.org/registry/vulkan/specs/latest/man/html/vkDestroyFence.html>
1837    #[inline]
1838    unsafe fn destroy_fence(&self, fence: Fence, allocator: Option<&AllocationCallbacks>) {
1839        let __result = (self.commands().destroy_fence)(
1840            self.handle(),
1841            fence,
1842            allocator.map_or(ptr::null(), |v| v),
1843        );
1844    }
1845
1846    /// <https://www.khronos.org/registry/vulkan/specs/latest/man/html/vkDestroyFramebuffer.html>
1847    #[inline]
1848    unsafe fn destroy_framebuffer(
1849        &self,
1850        framebuffer: Framebuffer,
1851        allocator: Option<&AllocationCallbacks>,
1852    ) {
1853        let __result = (self.commands().destroy_framebuffer)(
1854            self.handle(),
1855            framebuffer,
1856            allocator.map_or(ptr::null(), |v| v),
1857        );
1858    }
1859
1860    /// <https://www.khronos.org/registry/vulkan/specs/latest/man/html/vkDestroyImage.html>
1861    #[inline]
1862    unsafe fn destroy_image(&self, image: Image, allocator: Option<&AllocationCallbacks>) {
1863        let __result = (self.commands().destroy_image)(
1864            self.handle(),
1865            image,
1866            allocator.map_or(ptr::null(), |v| v),
1867        );
1868    }
1869
1870    /// <https://www.khronos.org/registry/vulkan/specs/latest/man/html/vkDestroyImageView.html>
1871    #[inline]
1872    unsafe fn destroy_image_view(
1873        &self,
1874        image_view: ImageView,
1875        allocator: Option<&AllocationCallbacks>,
1876    ) {
1877        let __result = (self.commands().destroy_image_view)(
1878            self.handle(),
1879            image_view,
1880            allocator.map_or(ptr::null(), |v| v),
1881        );
1882    }
1883
1884    /// <https://www.khronos.org/registry/vulkan/specs/latest/man/html/vkDestroyPipeline.html>
1885    #[inline]
1886    unsafe fn destroy_pipeline(&self, pipeline: Pipeline, allocator: Option<&AllocationCallbacks>) {
1887        let __result = (self.commands().destroy_pipeline)(
1888            self.handle(),
1889            pipeline,
1890            allocator.map_or(ptr::null(), |v| v),
1891        );
1892    }
1893
1894    /// <https://www.khronos.org/registry/vulkan/specs/latest/man/html/vkDestroyPipelineCache.html>
1895    #[inline]
1896    unsafe fn destroy_pipeline_cache(
1897        &self,
1898        pipeline_cache: PipelineCache,
1899        allocator: Option<&AllocationCallbacks>,
1900    ) {
1901        let __result = (self.commands().destroy_pipeline_cache)(
1902            self.handle(),
1903            pipeline_cache,
1904            allocator.map_or(ptr::null(), |v| v),
1905        );
1906    }
1907
1908    /// <https://www.khronos.org/registry/vulkan/specs/latest/man/html/vkDestroyPipelineLayout.html>
1909    #[inline]
1910    unsafe fn destroy_pipeline_layout(
1911        &self,
1912        pipeline_layout: PipelineLayout,
1913        allocator: Option<&AllocationCallbacks>,
1914    ) {
1915        let __result = (self.commands().destroy_pipeline_layout)(
1916            self.handle(),
1917            pipeline_layout,
1918            allocator.map_or(ptr::null(), |v| v),
1919        );
1920    }
1921
1922    /// <https://www.khronos.org/registry/vulkan/specs/latest/man/html/vkDestroyQueryPool.html>
1923    #[inline]
1924    unsafe fn destroy_query_pool(
1925        &self,
1926        query_pool: QueryPool,
1927        allocator: Option<&AllocationCallbacks>,
1928    ) {
1929        let __result = (self.commands().destroy_query_pool)(
1930            self.handle(),
1931            query_pool,
1932            allocator.map_or(ptr::null(), |v| v),
1933        );
1934    }
1935
1936    /// <https://www.khronos.org/registry/vulkan/specs/latest/man/html/vkDestroyRenderPass.html>
1937    #[inline]
1938    unsafe fn destroy_render_pass(
1939        &self,
1940        render_pass: RenderPass,
1941        allocator: Option<&AllocationCallbacks>,
1942    ) {
1943        let __result = (self.commands().destroy_render_pass)(
1944            self.handle(),
1945            render_pass,
1946            allocator.map_or(ptr::null(), |v| v),
1947        );
1948    }
1949
1950    /// <https://www.khronos.org/registry/vulkan/specs/latest/man/html/vkDestroySampler.html>
1951    #[inline]
1952    unsafe fn destroy_sampler(&self, sampler: Sampler, allocator: Option<&AllocationCallbacks>) {
1953        let __result = (self.commands().destroy_sampler)(
1954            self.handle(),
1955            sampler,
1956            allocator.map_or(ptr::null(), |v| v),
1957        );
1958    }
1959
1960    /// <https://www.khronos.org/registry/vulkan/specs/latest/man/html/vkDestroySemaphore.html>
1961    #[inline]
1962    unsafe fn destroy_semaphore(
1963        &self,
1964        semaphore: Semaphore,
1965        allocator: Option<&AllocationCallbacks>,
1966    ) {
1967        let __result = (self.commands().destroy_semaphore)(
1968            self.handle(),
1969            semaphore,
1970            allocator.map_or(ptr::null(), |v| v),
1971        );
1972    }
1973
1974    /// <https://www.khronos.org/registry/vulkan/specs/latest/man/html/vkDestroyShaderModule.html>
1975    #[inline]
1976    unsafe fn destroy_shader_module(
1977        &self,
1978        shader_module: ShaderModule,
1979        allocator: Option<&AllocationCallbacks>,
1980    ) {
1981        let __result = (self.commands().destroy_shader_module)(
1982            self.handle(),
1983            shader_module,
1984            allocator.map_or(ptr::null(), |v| v),
1985        );
1986    }
1987
1988    /// <https://www.khronos.org/registry/vulkan/specs/latest/man/html/vkDeviceWaitIdle.html>
1989    #[inline]
1990    unsafe fn device_wait_idle(&self) -> crate::VkResult<()> {
1991        let __result = (self.commands().device_wait_idle)(self.handle());
1992
1993        if __result == Result::SUCCESS {
1994            Ok(())
1995        } else {
1996            Err(__result.into())
1997        }
1998    }
1999
2000    /// <https://www.khronos.org/registry/vulkan/specs/latest/man/html/vkEndCommandBuffer.html>
2001    #[inline]
2002    unsafe fn end_command_buffer(&self, command_buffer: CommandBuffer) -> crate::VkResult<()> {
2003        let __result = (self.commands().end_command_buffer)(command_buffer);
2004
2005        if __result == Result::SUCCESS {
2006            Ok(())
2007        } else {
2008            Err(__result.into())
2009        }
2010    }
2011
2012    /// <https://www.khronos.org/registry/vulkan/specs/latest/man/html/vkFlushMappedMemoryRanges.html>
2013    #[inline]
2014    unsafe fn flush_mapped_memory_ranges(
2015        &self,
2016        memory_ranges: &[impl Cast<Target = MappedMemoryRange>],
2017    ) -> crate::VkResult<()> {
2018        let __result = (self.commands().flush_mapped_memory_ranges)(
2019            self.handle(),
2020            memory_ranges.len() as u32,
2021            memory_ranges.as_ptr().cast(),
2022        );
2023
2024        if __result == Result::SUCCESS {
2025            Ok(())
2026        } else {
2027            Err(__result.into())
2028        }
2029    }
2030
2031    /// <https://www.khronos.org/registry/vulkan/specs/latest/man/html/vkFreeCommandBuffers.html>
2032    #[inline]
2033    unsafe fn free_command_buffers(
2034        &self,
2035        command_pool: CommandPool,
2036        command_buffers: &[CommandBuffer],
2037    ) {
2038        let __result = (self.commands().free_command_buffers)(
2039            self.handle(),
2040            command_pool,
2041            command_buffers.len() as u32,
2042            command_buffers.as_ptr(),
2043        );
2044    }
2045
2046    /// <https://www.khronos.org/registry/vulkan/specs/latest/man/html/vkFreeDescriptorSets.html>
2047    #[inline]
2048    unsafe fn free_descriptor_sets(
2049        &self,
2050        descriptor_pool: DescriptorPool,
2051        descriptor_sets: &[DescriptorSet],
2052    ) -> crate::VkResult<()> {
2053        let __result = (self.commands().free_descriptor_sets)(
2054            self.handle(),
2055            descriptor_pool,
2056            descriptor_sets.len() as u32,
2057            descriptor_sets.as_ptr(),
2058        );
2059
2060        if __result == Result::SUCCESS {
2061            Ok(())
2062        } else {
2063            Err(__result.into())
2064        }
2065    }
2066
2067    /// <https://www.khronos.org/registry/vulkan/specs/latest/man/html/vkFreeMemory.html>
2068    #[inline]
2069    unsafe fn free_memory(&self, memory: DeviceMemory, allocator: Option<&AllocationCallbacks>) {
2070        let __result = (self.commands().free_memory)(
2071            self.handle(),
2072            memory,
2073            allocator.map_or(ptr::null(), |v| v),
2074        );
2075    }
2076
2077    /// <https://www.khronos.org/registry/vulkan/specs/latest/man/html/vkGetBufferMemoryRequirements.html>
2078    #[inline]
2079    unsafe fn get_buffer_memory_requirements(&self, buffer: Buffer) -> MemoryRequirements {
2080        let mut memory_requirements = MaybeUninit::<MemoryRequirements>::uninit();
2081
2082        let __result = (self.commands().get_buffer_memory_requirements)(
2083            self.handle(),
2084            buffer,
2085            memory_requirements.as_mut_ptr(),
2086        );
2087
2088        memory_requirements.assume_init()
2089    }
2090
2091    /// <https://www.khronos.org/registry/vulkan/specs/latest/man/html/vkGetDeviceMemoryCommitment.html>
2092    #[inline]
2093    unsafe fn get_device_memory_commitment(&self, memory: DeviceMemory) -> DeviceSize {
2094        let mut committed_memory_in_bytes = MaybeUninit::<DeviceSize>::uninit();
2095
2096        let __result = (self.commands().get_device_memory_commitment)(
2097            self.handle(),
2098            memory,
2099            committed_memory_in_bytes.as_mut_ptr(),
2100        );
2101
2102        committed_memory_in_bytes.assume_init()
2103    }
2104
2105    /// <https://www.khronos.org/registry/vulkan/specs/latest/man/html/vkGetDeviceQueue.html>
2106    #[inline]
2107    unsafe fn get_device_queue(&self, queue_family_index: u32, queue_index: u32) -> Queue {
2108        let mut queue = MaybeUninit::<Queue>::uninit();
2109
2110        let __result = (self.commands().get_device_queue)(
2111            self.handle(),
2112            queue_family_index,
2113            queue_index,
2114            queue.as_mut_ptr(),
2115        );
2116
2117        queue.assume_init()
2118    }
2119
2120    /// <https://www.khronos.org/registry/vulkan/specs/latest/man/html/vkGetEventStatus.html>
2121    #[inline]
2122    unsafe fn get_event_status(&self, event: Event) -> crate::VkResult<SuccessCode> {
2123        let __result = (self.commands().get_event_status)(self.handle(), event);
2124
2125        if __result >= Result::SUCCESS {
2126            Ok(__result.into())
2127        } else {
2128            Err(__result.into())
2129        }
2130    }
2131
2132    /// <https://www.khronos.org/registry/vulkan/specs/latest/man/html/vkGetFenceStatus.html>
2133    #[inline]
2134    unsafe fn get_fence_status(&self, fence: Fence) -> crate::VkResult<SuccessCode> {
2135        let __result = (self.commands().get_fence_status)(self.handle(), fence);
2136
2137        if __result >= Result::SUCCESS {
2138            Ok(__result.into())
2139        } else {
2140            Err(__result.into())
2141        }
2142    }
2143
2144    /// <https://www.khronos.org/registry/vulkan/specs/latest/man/html/vkGetImageMemoryRequirements.html>
2145    #[inline]
2146    unsafe fn get_image_memory_requirements(&self, image: Image) -> MemoryRequirements {
2147        let mut memory_requirements = MaybeUninit::<MemoryRequirements>::uninit();
2148
2149        let __result = (self.commands().get_image_memory_requirements)(
2150            self.handle(),
2151            image,
2152            memory_requirements.as_mut_ptr(),
2153        );
2154
2155        memory_requirements.assume_init()
2156    }
2157
2158    /// <https://www.khronos.org/registry/vulkan/specs/latest/man/html/vkGetImageSparseMemoryRequirements.html>
2159    #[inline]
2160    unsafe fn get_image_sparse_memory_requirements(
2161        &self,
2162        image: Image,
2163    ) -> Vec<SparseImageMemoryRequirements> {
2164        let mut sparse_memory_requirement_count = 0;
2165
2166        (self.commands().get_image_sparse_memory_requirements)(
2167            self.handle(),
2168            image,
2169            &mut sparse_memory_requirement_count,
2170            ptr::null_mut(),
2171        );
2172
2173        let mut sparse_memory_requirements =
2174            Vec::with_capacity(sparse_memory_requirement_count as usize);
2175
2176        let __result = (self.commands().get_image_sparse_memory_requirements)(
2177            self.handle(),
2178            image,
2179            &mut sparse_memory_requirement_count,
2180            sparse_memory_requirements.as_mut_ptr(),
2181        );
2182
2183        debug_assert!(
2184            sparse_memory_requirements.capacity() >= sparse_memory_requirement_count as usize
2185        );
2186        sparse_memory_requirements.set_len(sparse_memory_requirement_count as usize);
2187
2188        sparse_memory_requirements
2189    }
2190
2191    /// <https://www.khronos.org/registry/vulkan/specs/latest/man/html/vkGetImageSubresourceLayout.html>
2192    #[inline]
2193    unsafe fn get_image_subresource_layout(
2194        &self,
2195        image: Image,
2196        subresource: &ImageSubresource,
2197    ) -> SubresourceLayout {
2198        let mut layout = MaybeUninit::<SubresourceLayout>::uninit();
2199
2200        let __result = (self.commands().get_image_subresource_layout)(
2201            self.handle(),
2202            image,
2203            subresource,
2204            layout.as_mut_ptr(),
2205        );
2206
2207        layout.assume_init()
2208    }
2209
2210    /// <https://www.khronos.org/registry/vulkan/specs/latest/man/html/vkGetPipelineCacheData.html>
2211    #[inline]
2212    unsafe fn get_pipeline_cache_data(
2213        &self,
2214        pipeline_cache: PipelineCache,
2215    ) -> crate::VkResult<Vec<u8>> {
2216        let mut data_size = 0;
2217
2218        (self.commands().get_pipeline_cache_data)(
2219            self.handle(),
2220            pipeline_cache,
2221            &mut data_size,
2222            ptr::null_mut(),
2223        );
2224
2225        let mut data = Vec::with_capacity(data_size as usize);
2226
2227        let __result = (self.commands().get_pipeline_cache_data)(
2228            self.handle(),
2229            pipeline_cache,
2230            &mut data_size,
2231            data.as_mut_ptr() as *mut c_void,
2232        );
2233
2234        debug_assert!(data.capacity() >= data_size as usize);
2235        data.set_len(data_size as usize);
2236
2237        if __result == Result::SUCCESS {
2238            Ok(data)
2239        } else {
2240            Err(__result.into())
2241        }
2242    }
2243
2244    /// <https://www.khronos.org/registry/vulkan/specs/latest/man/html/vkGetQueryPoolResults.html>
2245    #[inline]
2246    unsafe fn get_query_pool_results(
2247        &self,
2248        query_pool: QueryPool,
2249        first_query: u32,
2250        query_count: u32,
2251        data: &mut [u8],
2252        stride: DeviceSize,
2253        flags: QueryResultFlags,
2254    ) -> crate::VkResult<SuccessCode> {
2255        let __result = (self.commands().get_query_pool_results)(
2256            self.handle(),
2257            query_pool,
2258            first_query,
2259            query_count,
2260            data.len() as usize,
2261            data.as_mut_ptr() as *mut c_void,
2262            stride,
2263            flags,
2264        );
2265
2266        if __result >= Result::SUCCESS {
2267            Ok(__result.into())
2268        } else {
2269            Err(__result.into())
2270        }
2271    }
2272
2273    /// <https://www.khronos.org/registry/vulkan/specs/latest/man/html/vkGetRenderAreaGranularity.html>
2274    #[inline]
2275    unsafe fn get_render_area_granularity(&self, render_pass: RenderPass) -> Extent2D {
2276        let mut granularity = MaybeUninit::<Extent2D>::uninit();
2277
2278        let __result = (self.commands().get_render_area_granularity)(
2279            self.handle(),
2280            render_pass,
2281            granularity.as_mut_ptr(),
2282        );
2283
2284        granularity.assume_init()
2285    }
2286
2287    /// <https://www.khronos.org/registry/vulkan/specs/latest/man/html/vkInvalidateMappedMemoryRanges.html>
2288    #[inline]
2289    unsafe fn invalidate_mapped_memory_ranges(
2290        &self,
2291        memory_ranges: &[impl Cast<Target = MappedMemoryRange>],
2292    ) -> crate::VkResult<()> {
2293        let __result = (self.commands().invalidate_mapped_memory_ranges)(
2294            self.handle(),
2295            memory_ranges.len() as u32,
2296            memory_ranges.as_ptr().cast(),
2297        );
2298
2299        if __result == Result::SUCCESS {
2300            Ok(())
2301        } else {
2302            Err(__result.into())
2303        }
2304    }
2305
2306    /// <https://www.khronos.org/registry/vulkan/specs/latest/man/html/vkMapMemory.html>
2307    #[inline]
2308    unsafe fn map_memory(
2309        &self,
2310        memory: DeviceMemory,
2311        offset: DeviceSize,
2312        size: DeviceSize,
2313        flags: MemoryMapFlags,
2314    ) -> crate::VkResult<*mut c_void> {
2315        let mut data = MaybeUninit::<*mut c_void>::uninit();
2316
2317        let __result = (self.commands().map_memory)(
2318            self.handle(),
2319            memory,
2320            offset,
2321            size,
2322            flags,
2323            data.as_mut_ptr(),
2324        );
2325
2326        if __result == Result::SUCCESS {
2327            Ok(data.assume_init())
2328        } else {
2329            Err(__result.into())
2330        }
2331    }
2332
2333    /// <https://www.khronos.org/registry/vulkan/specs/latest/man/html/vkMergePipelineCaches.html>
2334    #[inline]
2335    unsafe fn merge_pipeline_caches(
2336        &self,
2337        dst_cache: PipelineCache,
2338        src_caches: &[PipelineCache],
2339    ) -> crate::VkResult<()> {
2340        let __result = (self.commands().merge_pipeline_caches)(
2341            self.handle(),
2342            dst_cache,
2343            src_caches.len() as u32,
2344            src_caches.as_ptr(),
2345        );
2346
2347        if __result == Result::SUCCESS {
2348            Ok(())
2349        } else {
2350            Err(__result.into())
2351        }
2352    }
2353
2354    /// <https://www.khronos.org/registry/vulkan/specs/latest/man/html/vkQueueBindSparse.html>
2355    #[inline]
2356    unsafe fn queue_bind_sparse(
2357        &self,
2358        queue: Queue,
2359        bind_info: &[impl Cast<Target = BindSparseInfo>],
2360        fence: Fence,
2361    ) -> crate::VkResult<()> {
2362        let __result = (self.commands().queue_bind_sparse)(
2363            queue,
2364            bind_info.len() as u32,
2365            bind_info.as_ptr().cast(),
2366            fence,
2367        );
2368
2369        if __result == Result::SUCCESS {
2370            Ok(())
2371        } else {
2372            Err(__result.into())
2373        }
2374    }
2375
2376    /// <https://www.khronos.org/registry/vulkan/specs/latest/man/html/vkQueueSubmit.html>
2377    #[inline]
2378    unsafe fn queue_submit(
2379        &self,
2380        queue: Queue,
2381        submits: &[impl Cast<Target = SubmitInfo>],
2382        fence: Fence,
2383    ) -> crate::VkResult<()> {
2384        let __result = (self.commands().queue_submit)(
2385            queue,
2386            submits.len() as u32,
2387            submits.as_ptr().cast(),
2388            fence,
2389        );
2390
2391        if __result == Result::SUCCESS {
2392            Ok(())
2393        } else {
2394            Err(__result.into())
2395        }
2396    }
2397
2398    /// <https://www.khronos.org/registry/vulkan/specs/latest/man/html/vkQueueWaitIdle.html>
2399    #[inline]
2400    unsafe fn queue_wait_idle(&self, queue: Queue) -> crate::VkResult<()> {
2401        let __result = (self.commands().queue_wait_idle)(queue);
2402
2403        if __result == Result::SUCCESS {
2404            Ok(())
2405        } else {
2406            Err(__result.into())
2407        }
2408    }
2409
2410    /// <https://www.khronos.org/registry/vulkan/specs/latest/man/html/vkResetCommandBuffer.html>
2411    #[inline]
2412    unsafe fn reset_command_buffer(
2413        &self,
2414        command_buffer: CommandBuffer,
2415        flags: CommandBufferResetFlags,
2416    ) -> crate::VkResult<()> {
2417        let __result = (self.commands().reset_command_buffer)(command_buffer, flags);
2418
2419        if __result == Result::SUCCESS {
2420            Ok(())
2421        } else {
2422            Err(__result.into())
2423        }
2424    }
2425
2426    /// <https://www.khronos.org/registry/vulkan/specs/latest/man/html/vkResetCommandPool.html>
2427    #[inline]
2428    unsafe fn reset_command_pool(
2429        &self,
2430        command_pool: CommandPool,
2431        flags: CommandPoolResetFlags,
2432    ) -> crate::VkResult<()> {
2433        let __result = (self.commands().reset_command_pool)(self.handle(), command_pool, flags);
2434
2435        if __result == Result::SUCCESS {
2436            Ok(())
2437        } else {
2438            Err(__result.into())
2439        }
2440    }
2441
2442    /// <https://www.khronos.org/registry/vulkan/specs/latest/man/html/vkResetDescriptorPool.html>
2443    #[inline]
2444    unsafe fn reset_descriptor_pool(
2445        &self,
2446        descriptor_pool: DescriptorPool,
2447        flags: DescriptorPoolResetFlags,
2448    ) -> crate::VkResult<()> {
2449        let __result =
2450            (self.commands().reset_descriptor_pool)(self.handle(), descriptor_pool, flags);
2451
2452        if __result == Result::SUCCESS {
2453            Ok(())
2454        } else {
2455            Err(__result.into())
2456        }
2457    }
2458
2459    /// <https://www.khronos.org/registry/vulkan/specs/latest/man/html/vkResetEvent.html>
2460    #[inline]
2461    unsafe fn reset_event(&self, event: Event) -> crate::VkResult<()> {
2462        let __result = (self.commands().reset_event)(self.handle(), event);
2463
2464        if __result == Result::SUCCESS {
2465            Ok(())
2466        } else {
2467            Err(__result.into())
2468        }
2469    }
2470
2471    /// <https://www.khronos.org/registry/vulkan/specs/latest/man/html/vkResetFences.html>
2472    #[inline]
2473    unsafe fn reset_fences(&self, fences: &[Fence]) -> crate::VkResult<()> {
2474        let __result =
2475            (self.commands().reset_fences)(self.handle(), fences.len() as u32, fences.as_ptr());
2476
2477        if __result == Result::SUCCESS {
2478            Ok(())
2479        } else {
2480            Err(__result.into())
2481        }
2482    }
2483
2484    /// <https://www.khronos.org/registry/vulkan/specs/latest/man/html/vkSetEvent.html>
2485    #[inline]
2486    unsafe fn set_event(&self, event: Event) -> crate::VkResult<()> {
2487        let __result = (self.commands().set_event)(self.handle(), event);
2488
2489        if __result == Result::SUCCESS {
2490            Ok(())
2491        } else {
2492            Err(__result.into())
2493        }
2494    }
2495
2496    /// <https://www.khronos.org/registry/vulkan/specs/latest/man/html/vkUnmapMemory.html>
2497    #[inline]
2498    unsafe fn unmap_memory(&self, memory: DeviceMemory) {
2499        let __result = (self.commands().unmap_memory)(self.handle(), memory);
2500    }
2501
2502    /// <https://www.khronos.org/registry/vulkan/specs/latest/man/html/vkUpdateDescriptorSets.html>
2503    #[inline]
2504    unsafe fn update_descriptor_sets(
2505        &self,
2506        descriptor_writes: &[impl Cast<Target = WriteDescriptorSet>],
2507        descriptor_copies: &[impl Cast<Target = CopyDescriptorSet>],
2508    ) {
2509        let __result = (self.commands().update_descriptor_sets)(
2510            self.handle(),
2511            descriptor_writes.len() as u32,
2512            descriptor_writes.as_ptr().cast(),
2513            descriptor_copies.len() as u32,
2514            descriptor_copies.as_ptr().cast(),
2515        );
2516    }
2517
2518    /// <https://www.khronos.org/registry/vulkan/specs/latest/man/html/vkWaitForFences.html>
2519    #[inline]
2520    unsafe fn wait_for_fences(
2521        &self,
2522        fences: &[Fence],
2523        wait_all: bool,
2524        timeout: u64,
2525    ) -> crate::VkResult<SuccessCode> {
2526        let __result = (self.commands().wait_for_fences)(
2527            self.handle(),
2528            fences.len() as u32,
2529            fences.as_ptr(),
2530            wait_all as Bool32,
2531            timeout,
2532        );
2533
2534        if __result >= Result::SUCCESS {
2535            Ok(__result.into())
2536        } else {
2537            Err(__result.into())
2538        }
2539    }
2540}
2541
2542impl DeviceV1_0 for crate::Device {
2543    #[inline]
2544    fn commands(&self) -> &DeviceCommands {
2545        &self.commands
2546    }
2547
2548    #[inline]
2549    fn handle(&self) -> Device {
2550        self.handle
2551    }
2552}
2553
2554impl<C: Borrow<DeviceCommands>> DeviceV1_0 for (C, Device) {
2555    #[inline]
2556    fn commands(&self) -> &DeviceCommands {
2557        self.0.borrow()
2558    }
2559
2560    #[inline]
2561    fn handle(&self) -> Device {
2562        self.1
2563    }
2564}
2565
2566/// Vulkan 1.1 entry command wrappers.
2567pub trait EntryV1_1: EntryV1_0 {
2568    /// <https://www.khronos.org/registry/vulkan/specs/latest/man/html/vkEnumerateInstanceVersion.html>
2569    #[inline]
2570    unsafe fn enumerate_instance_version(&self) -> crate::VkResult<u32> {
2571        let mut api_version = MaybeUninit::<u32>::uninit();
2572
2573        let __result = (self.commands().enumerate_instance_version)(api_version.as_mut_ptr());
2574
2575        if __result == Result::SUCCESS {
2576            Ok(api_version.assume_init())
2577        } else {
2578            Err(__result.into())
2579        }
2580    }
2581}
2582
2583impl<C: EntryV1_0 + ?Sized> EntryV1_1 for C {}
2584
2585/// Vulkan 1.1 instance command wrappers.
2586pub trait InstanceV1_1: InstanceV1_0 {
2587    /// <https://www.khronos.org/registry/vulkan/specs/latest/man/html/vkEnumeratePhysicalDeviceGroups.html>
2588    #[inline]
2589    unsafe fn enumerate_physical_device_groups(
2590        &self,
2591    ) -> crate::VkResult<Vec<PhysicalDeviceGroupProperties>> {
2592        let mut physical_device_group_count = 0;
2593
2594        (self.commands().enumerate_physical_device_groups)(
2595            self.handle(),
2596            &mut physical_device_group_count,
2597            ptr::null_mut(),
2598        );
2599
2600        let mut physical_device_group_properties =
2601            Vec::with_capacity(physical_device_group_count as usize);
2602
2603        let __result = (self.commands().enumerate_physical_device_groups)(
2604            self.handle(),
2605            &mut physical_device_group_count,
2606            physical_device_group_properties.as_mut_ptr(),
2607        );
2608
2609        debug_assert!(
2610            physical_device_group_properties.capacity() >= physical_device_group_count as usize
2611        );
2612        physical_device_group_properties.set_len(physical_device_group_count as usize);
2613
2614        if __result == Result::SUCCESS {
2615            Ok(physical_device_group_properties)
2616        } else {
2617            Err(__result.into())
2618        }
2619    }
2620
2621    /// <https://www.khronos.org/registry/vulkan/specs/latest/man/html/vkGetPhysicalDeviceExternalBufferProperties.html>
2622    #[inline]
2623    unsafe fn get_physical_device_external_buffer_properties(
2624        &self,
2625        physical_device: PhysicalDevice,
2626        external_buffer_info: &PhysicalDeviceExternalBufferInfo,
2627        external_buffer_properties: &mut ExternalBufferProperties,
2628    ) {
2629        let __result = (self
2630            .commands()
2631            .get_physical_device_external_buffer_properties)(
2632            physical_device,
2633            external_buffer_info,
2634            external_buffer_properties,
2635        );
2636    }
2637
2638    /// <https://www.khronos.org/registry/vulkan/specs/latest/man/html/vkGetPhysicalDeviceExternalFenceProperties.html>
2639    #[inline]
2640    unsafe fn get_physical_device_external_fence_properties(
2641        &self,
2642        physical_device: PhysicalDevice,
2643        external_fence_info: &PhysicalDeviceExternalFenceInfo,
2644        external_fence_properties: &mut ExternalFenceProperties,
2645    ) {
2646        let __result = (self
2647            .commands()
2648            .get_physical_device_external_fence_properties)(
2649            physical_device,
2650            external_fence_info,
2651            external_fence_properties,
2652        );
2653    }
2654
2655    /// <https://www.khronos.org/registry/vulkan/specs/latest/man/html/vkGetPhysicalDeviceExternalSemaphoreProperties.html>
2656    #[inline]
2657    unsafe fn get_physical_device_external_semaphore_properties(
2658        &self,
2659        physical_device: PhysicalDevice,
2660        external_semaphore_info: &PhysicalDeviceExternalSemaphoreInfo,
2661        external_semaphore_properties: &mut ExternalSemaphoreProperties,
2662    ) {
2663        let __result = (self
2664            .commands()
2665            .get_physical_device_external_semaphore_properties)(
2666            physical_device,
2667            external_semaphore_info,
2668            external_semaphore_properties,
2669        );
2670    }
2671
2672    /// <https://www.khronos.org/registry/vulkan/specs/latest/man/html/vkGetPhysicalDeviceFeatures2.html>
2673    #[inline]
2674    unsafe fn get_physical_device_features2(
2675        &self,
2676        physical_device: PhysicalDevice,
2677        features: &mut PhysicalDeviceFeatures2,
2678    ) {
2679        let __result = (self.commands().get_physical_device_features2)(physical_device, features);
2680    }
2681
2682    /// <https://www.khronos.org/registry/vulkan/specs/latest/man/html/vkGetPhysicalDeviceFormatProperties2.html>
2683    #[inline]
2684    unsafe fn get_physical_device_format_properties2(
2685        &self,
2686        physical_device: PhysicalDevice,
2687        format: Format,
2688        format_properties: &mut FormatProperties2,
2689    ) {
2690        let __result = (self.commands().get_physical_device_format_properties2)(
2691            physical_device,
2692            format,
2693            format_properties,
2694        );
2695    }
2696
2697    /// <https://www.khronos.org/registry/vulkan/specs/latest/man/html/vkGetPhysicalDeviceImageFormatProperties2.html>
2698    #[inline]
2699    unsafe fn get_physical_device_image_format_properties2(
2700        &self,
2701        physical_device: PhysicalDevice,
2702        image_format_info: &PhysicalDeviceImageFormatInfo2,
2703        image_format_properties: &mut ImageFormatProperties2,
2704    ) -> crate::VkResult<()> {
2705        let __result = (self.commands().get_physical_device_image_format_properties2)(
2706            physical_device,
2707            image_format_info,
2708            image_format_properties,
2709        );
2710
2711        if __result == Result::SUCCESS {
2712            Ok(())
2713        } else {
2714            Err(__result.into())
2715        }
2716    }
2717
2718    /// <https://www.khronos.org/registry/vulkan/specs/latest/man/html/vkGetPhysicalDeviceMemoryProperties2.html>
2719    #[inline]
2720    unsafe fn get_physical_device_memory_properties2(
2721        &self,
2722        physical_device: PhysicalDevice,
2723        memory_properties: &mut PhysicalDeviceMemoryProperties2,
2724    ) {
2725        let __result = (self.commands().get_physical_device_memory_properties2)(
2726            physical_device,
2727            memory_properties,
2728        );
2729    }
2730
2731    /// <https://www.khronos.org/registry/vulkan/specs/latest/man/html/vkGetPhysicalDeviceProperties2.html>
2732    #[inline]
2733    unsafe fn get_physical_device_properties2(
2734        &self,
2735        physical_device: PhysicalDevice,
2736        properties: &mut PhysicalDeviceProperties2,
2737    ) {
2738        let __result =
2739            (self.commands().get_physical_device_properties2)(physical_device, properties);
2740    }
2741
2742    /// <https://www.khronos.org/registry/vulkan/specs/latest/man/html/vkGetPhysicalDeviceQueueFamilyProperties2.html>
2743    #[inline]
2744    unsafe fn get_physical_device_queue_family_properties2(
2745        &self,
2746        physical_device: PhysicalDevice,
2747    ) -> Vec<QueueFamilyProperties2> {
2748        let mut queue_family_property_count = 0;
2749
2750        (self.commands().get_physical_device_queue_family_properties2)(
2751            physical_device,
2752            &mut queue_family_property_count,
2753            ptr::null_mut(),
2754        );
2755
2756        let mut queue_family_properties = Vec::with_capacity(queue_family_property_count as usize);
2757
2758        let __result = (self.commands().get_physical_device_queue_family_properties2)(
2759            physical_device,
2760            &mut queue_family_property_count,
2761            queue_family_properties.as_mut_ptr(),
2762        );
2763
2764        debug_assert!(queue_family_properties.capacity() >= queue_family_property_count as usize);
2765        queue_family_properties.set_len(queue_family_property_count as usize);
2766
2767        queue_family_properties
2768    }
2769
2770    /// <https://www.khronos.org/registry/vulkan/specs/latest/man/html/vkGetPhysicalDeviceSparseImageFormatProperties2.html>
2771    #[inline]
2772    unsafe fn get_physical_device_sparse_image_format_properties2(
2773        &self,
2774        physical_device: PhysicalDevice,
2775        format_info: &PhysicalDeviceSparseImageFormatInfo2,
2776    ) -> Vec<SparseImageFormatProperties2> {
2777        let mut property_count = 0;
2778
2779        (self
2780            .commands()
2781            .get_physical_device_sparse_image_format_properties2)(
2782            physical_device,
2783            format_info,
2784            &mut property_count,
2785            ptr::null_mut(),
2786        );
2787
2788        let mut properties = Vec::with_capacity(property_count as usize);
2789
2790        let __result = (self
2791            .commands()
2792            .get_physical_device_sparse_image_format_properties2)(
2793            physical_device,
2794            format_info,
2795            &mut property_count,
2796            properties.as_mut_ptr(),
2797        );
2798
2799        debug_assert!(properties.capacity() >= property_count as usize);
2800        properties.set_len(property_count as usize);
2801
2802        properties
2803    }
2804}
2805
2806impl<C: InstanceV1_0 + ?Sized> InstanceV1_1 for C {}
2807
2808/// Vulkan 1.1 device command wrappers.
2809pub trait DeviceV1_1: DeviceV1_0 {
2810    /// <https://www.khronos.org/registry/vulkan/specs/latest/man/html/vkBindBufferMemory2.html>
2811    #[inline]
2812    unsafe fn bind_buffer_memory2(
2813        &self,
2814        bind_infos: &[impl Cast<Target = BindBufferMemoryInfo>],
2815    ) -> crate::VkResult<()> {
2816        let __result = (self.commands().bind_buffer_memory2)(
2817            self.handle(),
2818            bind_infos.len() as u32,
2819            bind_infos.as_ptr().cast(),
2820        );
2821
2822        if __result == Result::SUCCESS {
2823            Ok(())
2824        } else {
2825            Err(__result.into())
2826        }
2827    }
2828
2829    /// <https://www.khronos.org/registry/vulkan/specs/latest/man/html/vkBindImageMemory2.html>
2830    #[inline]
2831    unsafe fn bind_image_memory2(
2832        &self,
2833        bind_infos: &[impl Cast<Target = BindImageMemoryInfo>],
2834    ) -> crate::VkResult<()> {
2835        let __result = (self.commands().bind_image_memory2)(
2836            self.handle(),
2837            bind_infos.len() as u32,
2838            bind_infos.as_ptr().cast(),
2839        );
2840
2841        if __result == Result::SUCCESS {
2842            Ok(())
2843        } else {
2844            Err(__result.into())
2845        }
2846    }
2847
2848    /// <https://www.khronos.org/registry/vulkan/specs/latest/man/html/vkCmdDispatchBase.html>
2849    #[inline]
2850    unsafe fn cmd_dispatch_base(
2851        &self,
2852        command_buffer: CommandBuffer,
2853        base_group_x: u32,
2854        base_group_y: u32,
2855        base_group_z: u32,
2856        group_count_x: u32,
2857        group_count_y: u32,
2858        group_count_z: u32,
2859    ) {
2860        let __result = (self.commands().cmd_dispatch_base)(
2861            command_buffer,
2862            base_group_x,
2863            base_group_y,
2864            base_group_z,
2865            group_count_x,
2866            group_count_y,
2867            group_count_z,
2868        );
2869    }
2870
2871    /// <https://www.khronos.org/registry/vulkan/specs/latest/man/html/vkCmdSetDeviceMask.html>
2872    #[inline]
2873    unsafe fn cmd_set_device_mask(&self, command_buffer: CommandBuffer, device_mask: u32) {
2874        let __result = (self.commands().cmd_set_device_mask)(command_buffer, device_mask);
2875    }
2876
2877    /// <https://www.khronos.org/registry/vulkan/specs/latest/man/html/vkCreateDescriptorUpdateTemplate.html>
2878    #[inline]
2879    unsafe fn create_descriptor_update_template(
2880        &self,
2881        create_info: &DescriptorUpdateTemplateCreateInfo,
2882        allocator: Option<&AllocationCallbacks>,
2883    ) -> crate::VkResult<DescriptorUpdateTemplate> {
2884        let mut descriptor_update_template = MaybeUninit::<DescriptorUpdateTemplate>::uninit();
2885
2886        let __result = (self.commands().create_descriptor_update_template)(
2887            self.handle(),
2888            create_info,
2889            allocator.map_or(ptr::null(), |v| v),
2890            descriptor_update_template.as_mut_ptr(),
2891        );
2892
2893        if __result == Result::SUCCESS {
2894            Ok(descriptor_update_template.assume_init())
2895        } else {
2896            Err(__result.into())
2897        }
2898    }
2899
2900    /// <https://www.khronos.org/registry/vulkan/specs/latest/man/html/vkCreateSamplerYcbcrConversion.html>
2901    #[inline]
2902    unsafe fn create_sampler_ycbcr_conversion(
2903        &self,
2904        create_info: &SamplerYcbcrConversionCreateInfo,
2905        allocator: Option<&AllocationCallbacks>,
2906    ) -> crate::VkResult<SamplerYcbcrConversion> {
2907        let mut ycbcr_conversion = MaybeUninit::<SamplerYcbcrConversion>::uninit();
2908
2909        let __result = (self.commands().create_sampler_ycbcr_conversion)(
2910            self.handle(),
2911            create_info,
2912            allocator.map_or(ptr::null(), |v| v),
2913            ycbcr_conversion.as_mut_ptr(),
2914        );
2915
2916        if __result == Result::SUCCESS {
2917            Ok(ycbcr_conversion.assume_init())
2918        } else {
2919            Err(__result.into())
2920        }
2921    }
2922
2923    /// <https://www.khronos.org/registry/vulkan/specs/latest/man/html/vkDestroyDescriptorUpdateTemplate.html>
2924    #[inline]
2925    unsafe fn destroy_descriptor_update_template(
2926        &self,
2927        descriptor_update_template: DescriptorUpdateTemplate,
2928        allocator: Option<&AllocationCallbacks>,
2929    ) {
2930        let __result = (self.commands().destroy_descriptor_update_template)(
2931            self.handle(),
2932            descriptor_update_template,
2933            allocator.map_or(ptr::null(), |v| v),
2934        );
2935    }
2936
2937    /// <https://www.khronos.org/registry/vulkan/specs/latest/man/html/vkDestroySamplerYcbcrConversion.html>
2938    #[inline]
2939    unsafe fn destroy_sampler_ycbcr_conversion(
2940        &self,
2941        ycbcr_conversion: SamplerYcbcrConversion,
2942        allocator: Option<&AllocationCallbacks>,
2943    ) {
2944        let __result = (self.commands().destroy_sampler_ycbcr_conversion)(
2945            self.handle(),
2946            ycbcr_conversion,
2947            allocator.map_or(ptr::null(), |v| v),
2948        );
2949    }
2950
2951    /// <https://www.khronos.org/registry/vulkan/specs/latest/man/html/vkGetBufferMemoryRequirements2.html>
2952    #[inline]
2953    unsafe fn get_buffer_memory_requirements2(
2954        &self,
2955        info: &BufferMemoryRequirementsInfo2,
2956        memory_requirements: &mut MemoryRequirements2,
2957    ) {
2958        let __result = (self.commands().get_buffer_memory_requirements2)(
2959            self.handle(),
2960            info,
2961            memory_requirements,
2962        );
2963    }
2964
2965    /// <https://www.khronos.org/registry/vulkan/specs/latest/man/html/vkGetDescriptorSetLayoutSupport.html>
2966    #[inline]
2967    unsafe fn get_descriptor_set_layout_support(
2968        &self,
2969        create_info: &DescriptorSetLayoutCreateInfo,
2970        support: &mut DescriptorSetLayoutSupport,
2971    ) {
2972        let __result = (self.commands().get_descriptor_set_layout_support)(
2973            self.handle(),
2974            create_info,
2975            support,
2976        );
2977    }
2978
2979    /// <https://www.khronos.org/registry/vulkan/specs/latest/man/html/vkGetDeviceGroupPeerMemoryFeatures.html>
2980    #[inline]
2981    unsafe fn get_device_group_peer_memory_features(
2982        &self,
2983        heap_index: u32,
2984        local_device_index: u32,
2985        remote_device_index: u32,
2986    ) -> PeerMemoryFeatureFlags {
2987        let mut peer_memory_features = MaybeUninit::<PeerMemoryFeatureFlags>::uninit();
2988
2989        let __result = (self.commands().get_device_group_peer_memory_features)(
2990            self.handle(),
2991            heap_index,
2992            local_device_index,
2993            remote_device_index,
2994            peer_memory_features.as_mut_ptr(),
2995        );
2996
2997        peer_memory_features.assume_init()
2998    }
2999
3000    /// <https://www.khronos.org/registry/vulkan/specs/latest/man/html/vkGetDeviceQueue2.html>
3001    #[inline]
3002    unsafe fn get_device_queue2(&self, queue_info: &DeviceQueueInfo2) -> Queue {
3003        let mut queue = MaybeUninit::<Queue>::uninit();
3004
3005        let __result =
3006            (self.commands().get_device_queue2)(self.handle(), queue_info, queue.as_mut_ptr());
3007
3008        queue.assume_init()
3009    }
3010
3011    /// <https://www.khronos.org/registry/vulkan/specs/latest/man/html/vkGetImageMemoryRequirements2.html>
3012    #[inline]
3013    unsafe fn get_image_memory_requirements2(
3014        &self,
3015        info: &ImageMemoryRequirementsInfo2,
3016        memory_requirements: &mut MemoryRequirements2,
3017    ) {
3018        let __result = (self.commands().get_image_memory_requirements2)(
3019            self.handle(),
3020            info,
3021            memory_requirements,
3022        );
3023    }
3024
3025    /// <https://www.khronos.org/registry/vulkan/specs/latest/man/html/vkGetImageSparseMemoryRequirements2.html>
3026    #[inline]
3027    unsafe fn get_image_sparse_memory_requirements2(
3028        &self,
3029        info: &ImageSparseMemoryRequirementsInfo2,
3030    ) -> Vec<SparseImageMemoryRequirements2> {
3031        let mut sparse_memory_requirement_count = 0;
3032
3033        (self.commands().get_image_sparse_memory_requirements2)(
3034            self.handle(),
3035            info,
3036            &mut sparse_memory_requirement_count,
3037            ptr::null_mut(),
3038        );
3039
3040        let mut sparse_memory_requirements =
3041            Vec::with_capacity(sparse_memory_requirement_count as usize);
3042
3043        let __result = (self.commands().get_image_sparse_memory_requirements2)(
3044            self.handle(),
3045            info,
3046            &mut sparse_memory_requirement_count,
3047            sparse_memory_requirements.as_mut_ptr(),
3048        );
3049
3050        debug_assert!(
3051            sparse_memory_requirements.capacity() >= sparse_memory_requirement_count as usize
3052        );
3053        sparse_memory_requirements.set_len(sparse_memory_requirement_count as usize);
3054
3055        sparse_memory_requirements
3056    }
3057
3058    /// <https://www.khronos.org/registry/vulkan/specs/latest/man/html/vkTrimCommandPool.html>
3059    #[inline]
3060    unsafe fn trim_command_pool(&self, command_pool: CommandPool, flags: CommandPoolTrimFlags) {
3061        let __result = (self.commands().trim_command_pool)(self.handle(), command_pool, flags);
3062    }
3063
3064    /// <https://www.khronos.org/registry/vulkan/specs/latest/man/html/vkUpdateDescriptorSetWithTemplate.html>
3065    #[inline]
3066    unsafe fn update_descriptor_set_with_template(
3067        &self,
3068        descriptor_set: DescriptorSet,
3069        descriptor_update_template: DescriptorUpdateTemplate,
3070        data: *const c_void,
3071    ) {
3072        let __result = (self.commands().update_descriptor_set_with_template)(
3073            self.handle(),
3074            descriptor_set,
3075            descriptor_update_template,
3076            data,
3077        );
3078    }
3079}
3080
3081impl<C: DeviceV1_0 + ?Sized> DeviceV1_1 for C {}
3082
3083/// Vulkan 1.2 entry command wrappers.
3084pub trait EntryV1_2: EntryV1_1 {}
3085
3086impl<C: EntryV1_0 + ?Sized> EntryV1_2 for C {}
3087
3088/// Vulkan 1.2 instance command wrappers.
3089pub trait InstanceV1_2: InstanceV1_1 {}
3090
3091impl<C: InstanceV1_0 + ?Sized> InstanceV1_2 for C {}
3092
3093/// Vulkan 1.2 device command wrappers.
3094pub trait DeviceV1_2: DeviceV1_1 {
3095    /// <https://www.khronos.org/registry/vulkan/specs/latest/man/html/vkCmdBeginRenderPass2.html>
3096    #[inline]
3097    unsafe fn cmd_begin_render_pass2(
3098        &self,
3099        command_buffer: CommandBuffer,
3100        render_pass_begin: &RenderPassBeginInfo,
3101        subpass_begin_info: &SubpassBeginInfo,
3102    ) {
3103        let __result = (self.commands().cmd_begin_render_pass2)(
3104            command_buffer,
3105            render_pass_begin,
3106            subpass_begin_info,
3107        );
3108    }
3109
3110    /// <https://www.khronos.org/registry/vulkan/specs/latest/man/html/vkCmdDrawIndexedIndirectCount.html>
3111    #[inline]
3112    unsafe fn cmd_draw_indexed_indirect_count(
3113        &self,
3114        command_buffer: CommandBuffer,
3115        buffer: Buffer,
3116        offset: DeviceSize,
3117        count_buffer: Buffer,
3118        count_buffer_offset: DeviceSize,
3119        max_draw_count: u32,
3120        stride: u32,
3121    ) {
3122        let __result = (self.commands().cmd_draw_indexed_indirect_count)(
3123            command_buffer,
3124            buffer,
3125            offset,
3126            count_buffer,
3127            count_buffer_offset,
3128            max_draw_count,
3129            stride,
3130        );
3131    }
3132
3133    /// <https://www.khronos.org/registry/vulkan/specs/latest/man/html/vkCmdDrawIndirectCount.html>
3134    #[inline]
3135    unsafe fn cmd_draw_indirect_count(
3136        &self,
3137        command_buffer: CommandBuffer,
3138        buffer: Buffer,
3139        offset: DeviceSize,
3140        count_buffer: Buffer,
3141        count_buffer_offset: DeviceSize,
3142        max_draw_count: u32,
3143        stride: u32,
3144    ) {
3145        let __result = (self.commands().cmd_draw_indirect_count)(
3146            command_buffer,
3147            buffer,
3148            offset,
3149            count_buffer,
3150            count_buffer_offset,
3151            max_draw_count,
3152            stride,
3153        );
3154    }
3155
3156    /// <https://www.khronos.org/registry/vulkan/specs/latest/man/html/vkCmdEndRenderPass2.html>
3157    #[inline]
3158    unsafe fn cmd_end_render_pass2(
3159        &self,
3160        command_buffer: CommandBuffer,
3161        subpass_end_info: &SubpassEndInfo,
3162    ) {
3163        let __result = (self.commands().cmd_end_render_pass2)(command_buffer, subpass_end_info);
3164    }
3165
3166    /// <https://www.khronos.org/registry/vulkan/specs/latest/man/html/vkCmdNextSubpass2.html>
3167    #[inline]
3168    unsafe fn cmd_next_subpass2(
3169        &self,
3170        command_buffer: CommandBuffer,
3171        subpass_begin_info: &SubpassBeginInfo,
3172        subpass_end_info: &SubpassEndInfo,
3173    ) {
3174        let __result = (self.commands().cmd_next_subpass2)(
3175            command_buffer,
3176            subpass_begin_info,
3177            subpass_end_info,
3178        );
3179    }
3180
3181    /// <https://www.khronos.org/registry/vulkan/specs/latest/man/html/vkCreateRenderPass2.html>
3182    #[inline]
3183    unsafe fn create_render_pass2(
3184        &self,
3185        create_info: &RenderPassCreateInfo2,
3186        allocator: Option<&AllocationCallbacks>,
3187    ) -> crate::VkResult<RenderPass> {
3188        let mut render_pass = MaybeUninit::<RenderPass>::uninit();
3189
3190        let __result = (self.commands().create_render_pass2)(
3191            self.handle(),
3192            create_info,
3193            allocator.map_or(ptr::null(), |v| v),
3194            render_pass.as_mut_ptr(),
3195        );
3196
3197        if __result == Result::SUCCESS {
3198            Ok(render_pass.assume_init())
3199        } else {
3200            Err(__result.into())
3201        }
3202    }
3203
3204    /// <https://www.khronos.org/registry/vulkan/specs/latest/man/html/vkGetBufferDeviceAddress.html>
3205    #[inline]
3206    unsafe fn get_buffer_device_address(&self, info: &BufferDeviceAddressInfo) -> DeviceAddress {
3207        let __result = (self.commands().get_buffer_device_address)(self.handle(), info);
3208
3209        __result
3210    }
3211
3212    /// <https://www.khronos.org/registry/vulkan/specs/latest/man/html/vkGetBufferOpaqueCaptureAddress.html>
3213    #[inline]
3214    unsafe fn get_buffer_opaque_capture_address(&self, info: &BufferDeviceAddressInfo) -> u64 {
3215        let __result = (self.commands().get_buffer_opaque_capture_address)(self.handle(), info);
3216
3217        __result
3218    }
3219
3220    /// <https://www.khronos.org/registry/vulkan/specs/latest/man/html/vkGetDeviceMemoryOpaqueCaptureAddress.html>
3221    #[inline]
3222    unsafe fn get_device_memory_opaque_capture_address(
3223        &self,
3224        info: &DeviceMemoryOpaqueCaptureAddressInfo,
3225    ) -> u64 {
3226        let __result =
3227            (self.commands().get_device_memory_opaque_capture_address)(self.handle(), info);
3228
3229        __result
3230    }
3231
3232    /// <https://www.khronos.org/registry/vulkan/specs/latest/man/html/vkGetSemaphoreCounterValue.html>
3233    #[inline]
3234    unsafe fn get_semaphore_counter_value(&self, semaphore: Semaphore) -> crate::VkResult<u64> {
3235        let mut value = MaybeUninit::<u64>::uninit();
3236
3237        let __result = (self.commands().get_semaphore_counter_value)(
3238            self.handle(),
3239            semaphore,
3240            value.as_mut_ptr(),
3241        );
3242
3243        if __result == Result::SUCCESS {
3244            Ok(value.assume_init())
3245        } else {
3246            Err(__result.into())
3247        }
3248    }
3249
3250    /// <https://www.khronos.org/registry/vulkan/specs/latest/man/html/vkResetQueryPool.html>
3251    #[inline]
3252    unsafe fn reset_query_pool(&self, query_pool: QueryPool, first_query: u32, query_count: u32) {
3253        let __result =
3254            (self.commands().reset_query_pool)(self.handle(), query_pool, first_query, query_count);
3255    }
3256
3257    /// <https://www.khronos.org/registry/vulkan/specs/latest/man/html/vkSignalSemaphore.html>
3258    #[inline]
3259    unsafe fn signal_semaphore(&self, signal_info: &SemaphoreSignalInfo) -> crate::VkResult<()> {
3260        let __result = (self.commands().signal_semaphore)(self.handle(), signal_info);
3261
3262        if __result == Result::SUCCESS {
3263            Ok(())
3264        } else {
3265            Err(__result.into())
3266        }
3267    }
3268
3269    /// <https://www.khronos.org/registry/vulkan/specs/latest/man/html/vkWaitSemaphores.html>
3270    #[inline]
3271    unsafe fn wait_semaphores(
3272        &self,
3273        wait_info: &SemaphoreWaitInfo,
3274        timeout: u64,
3275    ) -> crate::VkResult<SuccessCode> {
3276        let __result = (self.commands().wait_semaphores)(self.handle(), wait_info, timeout);
3277
3278        if __result >= Result::SUCCESS {
3279            Ok(__result.into())
3280        } else {
3281            Err(__result.into())
3282        }
3283    }
3284}
3285
3286impl<C: DeviceV1_0 + ?Sized> DeviceV1_2 for C {}
3287
3288/// Vulkan 1.3 entry command wrappers.
3289pub trait EntryV1_3: EntryV1_2 {}
3290
3291impl<C: EntryV1_0 + ?Sized> EntryV1_3 for C {}
3292
3293/// Vulkan 1.3 instance command wrappers.
3294pub trait InstanceV1_3: InstanceV1_2 {
3295    /// <https://www.khronos.org/registry/vulkan/specs/latest/man/html/vkGetPhysicalDeviceToolProperties.html>
3296    #[inline]
3297    unsafe fn get_physical_device_tool_properties(
3298        &self,
3299        physical_device: PhysicalDevice,
3300    ) -> crate::VkResult<Vec<PhysicalDeviceToolProperties>> {
3301        let mut tool_count = 0;
3302
3303        (self.commands().get_physical_device_tool_properties)(
3304            physical_device,
3305            &mut tool_count,
3306            ptr::null_mut(),
3307        );
3308
3309        let mut tool_properties = Vec::with_capacity(tool_count as usize);
3310
3311        let __result = (self.commands().get_physical_device_tool_properties)(
3312            physical_device,
3313            &mut tool_count,
3314            tool_properties.as_mut_ptr(),
3315        );
3316
3317        debug_assert!(tool_properties.capacity() >= tool_count as usize);
3318        tool_properties.set_len(tool_count as usize);
3319
3320        if __result == Result::SUCCESS {
3321            Ok(tool_properties)
3322        } else {
3323            Err(__result.into())
3324        }
3325    }
3326}
3327
3328impl<C: InstanceV1_0 + ?Sized> InstanceV1_3 for C {}
3329
3330/// Vulkan 1.3 device command wrappers.
3331pub trait DeviceV1_3: DeviceV1_2 {
3332    /// <https://www.khronos.org/registry/vulkan/specs/latest/man/html/vkCmdBeginRendering.html>
3333    #[inline]
3334    unsafe fn cmd_begin_rendering(
3335        &self,
3336        command_buffer: CommandBuffer,
3337        rendering_info: &RenderingInfo,
3338    ) {
3339        let __result = (self.commands().cmd_begin_rendering)(command_buffer, rendering_info);
3340    }
3341
3342    /// <https://www.khronos.org/registry/vulkan/specs/latest/man/html/vkCmdBindVertexBuffers2.html>
3343    #[inline]
3344    unsafe fn cmd_bind_vertex_buffers2(
3345        &self,
3346        command_buffer: CommandBuffer,
3347        first_binding: u32,
3348        buffers: &[Buffer],
3349        offsets: &[DeviceSize],
3350        sizes: &[DeviceSize],
3351        strides: &[DeviceSize],
3352    ) {
3353        let __result = (self.commands().cmd_bind_vertex_buffers2)(
3354            command_buffer,
3355            first_binding,
3356            buffers.len() as u32,
3357            buffers.as_ptr(),
3358            offsets.as_ptr(),
3359            sizes.as_ptr(),
3360            strides.as_ptr(),
3361        );
3362    }
3363
3364    /// <https://www.khronos.org/registry/vulkan/specs/latest/man/html/vkCmdBlitImage2.html>
3365    #[inline]
3366    unsafe fn cmd_blit_image2(
3367        &self,
3368        command_buffer: CommandBuffer,
3369        blit_image_info: &BlitImageInfo2,
3370    ) {
3371        let __result = (self.commands().cmd_blit_image2)(command_buffer, blit_image_info);
3372    }
3373
3374    /// <https://www.khronos.org/registry/vulkan/specs/latest/man/html/vkCmdCopyBuffer2.html>
3375    #[inline]
3376    unsafe fn cmd_copy_buffer2(
3377        &self,
3378        command_buffer: CommandBuffer,
3379        copy_buffer_info: &CopyBufferInfo2,
3380    ) {
3381        let __result = (self.commands().cmd_copy_buffer2)(command_buffer, copy_buffer_info);
3382    }
3383
3384    /// <https://www.khronos.org/registry/vulkan/specs/latest/man/html/vkCmdCopyBufferToImage2.html>
3385    #[inline]
3386    unsafe fn cmd_copy_buffer_to_image2(
3387        &self,
3388        command_buffer: CommandBuffer,
3389        copy_buffer_to_image_info: &CopyBufferToImageInfo2,
3390    ) {
3391        let __result =
3392            (self.commands().cmd_copy_buffer_to_image2)(command_buffer, copy_buffer_to_image_info);
3393    }
3394
3395    /// <https://www.khronos.org/registry/vulkan/specs/latest/man/html/vkCmdCopyImage2.html>
3396    #[inline]
3397    unsafe fn cmd_copy_image2(
3398        &self,
3399        command_buffer: CommandBuffer,
3400        copy_image_info: &CopyImageInfo2,
3401    ) {
3402        let __result = (self.commands().cmd_copy_image2)(command_buffer, copy_image_info);
3403    }
3404
3405    /// <https://www.khronos.org/registry/vulkan/specs/latest/man/html/vkCmdCopyImageToBuffer2.html>
3406    #[inline]
3407    unsafe fn cmd_copy_image_to_buffer2(
3408        &self,
3409        command_buffer: CommandBuffer,
3410        copy_image_to_buffer_info: &CopyImageToBufferInfo2,
3411    ) {
3412        let __result =
3413            (self.commands().cmd_copy_image_to_buffer2)(command_buffer, copy_image_to_buffer_info);
3414    }
3415
3416    /// <https://www.khronos.org/registry/vulkan/specs/latest/man/html/vkCmdEndRendering.html>
3417    #[inline]
3418    unsafe fn cmd_end_rendering(&self, command_buffer: CommandBuffer) {
3419        let __result = (self.commands().cmd_end_rendering)(command_buffer);
3420    }
3421
3422    /// <https://www.khronos.org/registry/vulkan/specs/latest/man/html/vkCmdPipelineBarrier2.html>
3423    #[inline]
3424    unsafe fn cmd_pipeline_barrier2(
3425        &self,
3426        command_buffer: CommandBuffer,
3427        dependency_info: &DependencyInfo,
3428    ) {
3429        let __result = (self.commands().cmd_pipeline_barrier2)(command_buffer, dependency_info);
3430    }
3431
3432    /// <https://www.khronos.org/registry/vulkan/specs/latest/man/html/vkCmdResetEvent2.html>
3433    #[inline]
3434    unsafe fn cmd_reset_event2(
3435        &self,
3436        command_buffer: CommandBuffer,
3437        event: Event,
3438        stage_mask: PipelineStageFlags2,
3439    ) {
3440        let __result = (self.commands().cmd_reset_event2)(command_buffer, event, stage_mask);
3441    }
3442
3443    /// <https://www.khronos.org/registry/vulkan/specs/latest/man/html/vkCmdResolveImage2.html>
3444    #[inline]
3445    unsafe fn cmd_resolve_image2(
3446        &self,
3447        command_buffer: CommandBuffer,
3448        resolve_image_info: &ResolveImageInfo2,
3449    ) {
3450        let __result = (self.commands().cmd_resolve_image2)(command_buffer, resolve_image_info);
3451    }
3452
3453    /// <https://www.khronos.org/registry/vulkan/specs/latest/man/html/vkCmdSetCullMode.html>
3454    #[inline]
3455    unsafe fn cmd_set_cull_mode(&self, command_buffer: CommandBuffer, cull_mode: CullModeFlags) {
3456        let __result = (self.commands().cmd_set_cull_mode)(command_buffer, cull_mode);
3457    }
3458
3459    /// <https://www.khronos.org/registry/vulkan/specs/latest/man/html/vkCmdSetDepthBiasEnable.html>
3460    #[inline]
3461    unsafe fn cmd_set_depth_bias_enable(
3462        &self,
3463        command_buffer: CommandBuffer,
3464        depth_bias_enable: bool,
3465    ) {
3466        let __result = (self.commands().cmd_set_depth_bias_enable)(
3467            command_buffer,
3468            depth_bias_enable as Bool32,
3469        );
3470    }
3471
3472    /// <https://www.khronos.org/registry/vulkan/specs/latest/man/html/vkCmdSetDepthBoundsTestEnable.html>
3473    #[inline]
3474    unsafe fn cmd_set_depth_bounds_test_enable(
3475        &self,
3476        command_buffer: CommandBuffer,
3477        depth_bounds_test_enable: bool,
3478    ) {
3479        let __result = (self.commands().cmd_set_depth_bounds_test_enable)(
3480            command_buffer,
3481            depth_bounds_test_enable as Bool32,
3482        );
3483    }
3484
3485    /// <https://www.khronos.org/registry/vulkan/specs/latest/man/html/vkCmdSetDepthCompareOp.html>
3486    #[inline]
3487    unsafe fn cmd_set_depth_compare_op(
3488        &self,
3489        command_buffer: CommandBuffer,
3490        depth_compare_op: CompareOp,
3491    ) {
3492        let __result = (self.commands().cmd_set_depth_compare_op)(command_buffer, depth_compare_op);
3493    }
3494
3495    /// <https://www.khronos.org/registry/vulkan/specs/latest/man/html/vkCmdSetDepthTestEnable.html>
3496    #[inline]
3497    unsafe fn cmd_set_depth_test_enable(
3498        &self,
3499        command_buffer: CommandBuffer,
3500        depth_test_enable: bool,
3501    ) {
3502        let __result = (self.commands().cmd_set_depth_test_enable)(
3503            command_buffer,
3504            depth_test_enable as Bool32,
3505        );
3506    }
3507
3508    /// <https://www.khronos.org/registry/vulkan/specs/latest/man/html/vkCmdSetDepthWriteEnable.html>
3509    #[inline]
3510    unsafe fn cmd_set_depth_write_enable(
3511        &self,
3512        command_buffer: CommandBuffer,
3513        depth_write_enable: bool,
3514    ) {
3515        let __result = (self.commands().cmd_set_depth_write_enable)(
3516            command_buffer,
3517            depth_write_enable as Bool32,
3518        );
3519    }
3520
3521    /// <https://www.khronos.org/registry/vulkan/specs/latest/man/html/vkCmdSetEvent2.html>
3522    #[inline]
3523    unsafe fn cmd_set_event2(
3524        &self,
3525        command_buffer: CommandBuffer,
3526        event: Event,
3527        dependency_info: &DependencyInfo,
3528    ) {
3529        let __result = (self.commands().cmd_set_event2)(command_buffer, event, dependency_info);
3530    }
3531
3532    /// <https://www.khronos.org/registry/vulkan/specs/latest/man/html/vkCmdSetFrontFace.html>
3533    #[inline]
3534    unsafe fn cmd_set_front_face(&self, command_buffer: CommandBuffer, front_face: FrontFace) {
3535        let __result = (self.commands().cmd_set_front_face)(command_buffer, front_face);
3536    }
3537
3538    /// <https://www.khronos.org/registry/vulkan/specs/latest/man/html/vkCmdSetPrimitiveRestartEnable.html>
3539    #[inline]
3540    unsafe fn cmd_set_primitive_restart_enable(
3541        &self,
3542        command_buffer: CommandBuffer,
3543        primitive_restart_enable: bool,
3544    ) {
3545        let __result = (self.commands().cmd_set_primitive_restart_enable)(
3546            command_buffer,
3547            primitive_restart_enable as Bool32,
3548        );
3549    }
3550
3551    /// <https://www.khronos.org/registry/vulkan/specs/latest/man/html/vkCmdSetPrimitiveTopology.html>
3552    #[inline]
3553    unsafe fn cmd_set_primitive_topology(
3554        &self,
3555        command_buffer: CommandBuffer,
3556        primitive_topology: PrimitiveTopology,
3557    ) {
3558        let __result =
3559            (self.commands().cmd_set_primitive_topology)(command_buffer, primitive_topology);
3560    }
3561
3562    /// <https://www.khronos.org/registry/vulkan/specs/latest/man/html/vkCmdSetRasterizerDiscardEnable.html>
3563    #[inline]
3564    unsafe fn cmd_set_rasterizer_discard_enable(
3565        &self,
3566        command_buffer: CommandBuffer,
3567        rasterizer_discard_enable: bool,
3568    ) {
3569        let __result = (self.commands().cmd_set_rasterizer_discard_enable)(
3570            command_buffer,
3571            rasterizer_discard_enable as Bool32,
3572        );
3573    }
3574
3575    /// <https://www.khronos.org/registry/vulkan/specs/latest/man/html/vkCmdSetScissorWithCount.html>
3576    #[inline]
3577    unsafe fn cmd_set_scissor_with_count(
3578        &self,
3579        command_buffer: CommandBuffer,
3580        scissors: &[impl Cast<Target = Rect2D>],
3581    ) {
3582        let __result = (self.commands().cmd_set_scissor_with_count)(
3583            command_buffer,
3584            scissors.len() as u32,
3585            scissors.as_ptr().cast(),
3586        );
3587    }
3588
3589    /// <https://www.khronos.org/registry/vulkan/specs/latest/man/html/vkCmdSetStencilOp.html>
3590    #[inline]
3591    unsafe fn cmd_set_stencil_op(
3592        &self,
3593        command_buffer: CommandBuffer,
3594        face_mask: StencilFaceFlags,
3595        fail_op: StencilOp,
3596        pass_op: StencilOp,
3597        depth_fail_op: StencilOp,
3598        compare_op: CompareOp,
3599    ) {
3600        let __result = (self.commands().cmd_set_stencil_op)(
3601            command_buffer,
3602            face_mask,
3603            fail_op,
3604            pass_op,
3605            depth_fail_op,
3606            compare_op,
3607        );
3608    }
3609
3610    /// <https://www.khronos.org/registry/vulkan/specs/latest/man/html/vkCmdSetStencilTestEnable.html>
3611    #[inline]
3612    unsafe fn cmd_set_stencil_test_enable(
3613        &self,
3614        command_buffer: CommandBuffer,
3615        stencil_test_enable: bool,
3616    ) {
3617        let __result = (self.commands().cmd_set_stencil_test_enable)(
3618            command_buffer,
3619            stencil_test_enable as Bool32,
3620        );
3621    }
3622
3623    /// <https://www.khronos.org/registry/vulkan/specs/latest/man/html/vkCmdSetViewportWithCount.html>
3624    #[inline]
3625    unsafe fn cmd_set_viewport_with_count(
3626        &self,
3627        command_buffer: CommandBuffer,
3628        viewports: &[impl Cast<Target = Viewport>],
3629    ) {
3630        let __result = (self.commands().cmd_set_viewport_with_count)(
3631            command_buffer,
3632            viewports.len() as u32,
3633            viewports.as_ptr().cast(),
3634        );
3635    }
3636
3637    /// <https://www.khronos.org/registry/vulkan/specs/latest/man/html/vkCmdWaitEvents2.html>
3638    #[inline]
3639    unsafe fn cmd_wait_events2(
3640        &self,
3641        command_buffer: CommandBuffer,
3642        events: &[Event],
3643        dependency_infos: &[impl Cast<Target = DependencyInfo>],
3644    ) {
3645        let __result = (self.commands().cmd_wait_events2)(
3646            command_buffer,
3647            events.len() as u32,
3648            events.as_ptr(),
3649            dependency_infos.as_ptr().cast(),
3650        );
3651    }
3652
3653    /// <https://www.khronos.org/registry/vulkan/specs/latest/man/html/vkCmdWriteTimestamp2.html>
3654    #[inline]
3655    unsafe fn cmd_write_timestamp2(
3656        &self,
3657        command_buffer: CommandBuffer,
3658        stage: PipelineStageFlags2,
3659        query_pool: QueryPool,
3660        query: u32,
3661    ) {
3662        let __result =
3663            (self.commands().cmd_write_timestamp2)(command_buffer, stage, query_pool, query);
3664    }
3665
3666    /// <https://www.khronos.org/registry/vulkan/specs/latest/man/html/vkCreatePrivateDataSlot.html>
3667    #[inline]
3668    unsafe fn create_private_data_slot(
3669        &self,
3670        create_info: &PrivateDataSlotCreateInfo,
3671        allocator: Option<&AllocationCallbacks>,
3672    ) -> crate::VkResult<PrivateDataSlot> {
3673        let mut private_data_slot = MaybeUninit::<PrivateDataSlot>::uninit();
3674
3675        let __result = (self.commands().create_private_data_slot)(
3676            self.handle(),
3677            create_info,
3678            allocator.map_or(ptr::null(), |v| v),
3679            private_data_slot.as_mut_ptr(),
3680        );
3681
3682        if __result == Result::SUCCESS {
3683            Ok(private_data_slot.assume_init())
3684        } else {
3685            Err(__result.into())
3686        }
3687    }
3688
3689    /// <https://www.khronos.org/registry/vulkan/specs/latest/man/html/vkDestroyPrivateDataSlot.html>
3690    #[inline]
3691    unsafe fn destroy_private_data_slot(
3692        &self,
3693        private_data_slot: PrivateDataSlot,
3694        allocator: Option<&AllocationCallbacks>,
3695    ) {
3696        let __result = (self.commands().destroy_private_data_slot)(
3697            self.handle(),
3698            private_data_slot,
3699            allocator.map_or(ptr::null(), |v| v),
3700        );
3701    }
3702
3703    /// <https://www.khronos.org/registry/vulkan/specs/latest/man/html/vkGetDeviceBufferMemoryRequirements.html>
3704    #[inline]
3705    unsafe fn get_device_buffer_memory_requirements(
3706        &self,
3707        info: &DeviceBufferMemoryRequirements,
3708        memory_requirements: &mut MemoryRequirements2,
3709    ) {
3710        let __result = (self.commands().get_device_buffer_memory_requirements)(
3711            self.handle(),
3712            info,
3713            memory_requirements,
3714        );
3715    }
3716
3717    /// <https://www.khronos.org/registry/vulkan/specs/latest/man/html/vkGetDeviceImageMemoryRequirements.html>
3718    #[inline]
3719    unsafe fn get_device_image_memory_requirements(
3720        &self,
3721        info: &DeviceImageMemoryRequirements,
3722        memory_requirements: &mut MemoryRequirements2,
3723    ) {
3724        let __result = (self.commands().get_device_image_memory_requirements)(
3725            self.handle(),
3726            info,
3727            memory_requirements,
3728        );
3729    }
3730
3731    /// <https://www.khronos.org/registry/vulkan/specs/latest/man/html/vkGetDeviceImageSparseMemoryRequirements.html>
3732    #[inline]
3733    unsafe fn get_device_image_sparse_memory_requirements(
3734        &self,
3735        info: &DeviceImageMemoryRequirements,
3736    ) -> Vec<SparseImageMemoryRequirements2> {
3737        let mut sparse_memory_requirement_count = 0;
3738
3739        (self.commands().get_device_image_sparse_memory_requirements)(
3740            self.handle(),
3741            info,
3742            &mut sparse_memory_requirement_count,
3743            ptr::null_mut(),
3744        );
3745
3746        let mut sparse_memory_requirements =
3747            Vec::with_capacity(sparse_memory_requirement_count as usize);
3748
3749        let __result = (self.commands().get_device_image_sparse_memory_requirements)(
3750            self.handle(),
3751            info,
3752            &mut sparse_memory_requirement_count,
3753            sparse_memory_requirements.as_mut_ptr(),
3754        );
3755
3756        debug_assert!(
3757            sparse_memory_requirements.capacity() >= sparse_memory_requirement_count as usize
3758        );
3759        sparse_memory_requirements.set_len(sparse_memory_requirement_count as usize);
3760
3761        sparse_memory_requirements
3762    }
3763
3764    /// <https://www.khronos.org/registry/vulkan/specs/latest/man/html/vkGetPrivateData.html>
3765    #[inline]
3766    unsafe fn get_private_data(
3767        &self,
3768        object_type: ObjectType,
3769        object_handle: u64,
3770        private_data_slot: PrivateDataSlot,
3771    ) -> u64 {
3772        let mut data = MaybeUninit::<u64>::uninit();
3773
3774        let __result = (self.commands().get_private_data)(
3775            self.handle(),
3776            object_type,
3777            object_handle,
3778            private_data_slot,
3779            data.as_mut_ptr(),
3780        );
3781
3782        data.assume_init()
3783    }
3784
3785    /// <https://www.khronos.org/registry/vulkan/specs/latest/man/html/vkQueueSubmit2.html>
3786    #[inline]
3787    unsafe fn queue_submit2(
3788        &self,
3789        queue: Queue,
3790        submits: &[impl Cast<Target = SubmitInfo2>],
3791        fence: Fence,
3792    ) -> crate::VkResult<()> {
3793        let __result = (self.commands().queue_submit2)(
3794            queue,
3795            submits.len() as u32,
3796            submits.as_ptr().cast(),
3797            fence,
3798        );
3799
3800        if __result == Result::SUCCESS {
3801            Ok(())
3802        } else {
3803            Err(__result.into())
3804        }
3805    }
3806
3807    /// <https://www.khronos.org/registry/vulkan/specs/latest/man/html/vkSetPrivateData.html>
3808    #[inline]
3809    unsafe fn set_private_data(
3810        &self,
3811        object_type: ObjectType,
3812        object_handle: u64,
3813        private_data_slot: PrivateDataSlot,
3814        data: u64,
3815    ) -> crate::VkResult<()> {
3816        let __result = (self.commands().set_private_data)(
3817            self.handle(),
3818            object_type,
3819            object_handle,
3820            private_data_slot,
3821            data,
3822        );
3823
3824        if __result == Result::SUCCESS {
3825            Ok(())
3826        } else {
3827            Err(__result.into())
3828        }
3829    }
3830}
3831
3832impl<C: DeviceV1_0 + ?Sized> DeviceV1_3 for C {}
3833
3834/// Vulkan 1.4 entry command wrappers.
3835pub trait EntryV1_4: EntryV1_3 {}
3836
3837impl<C: EntryV1_0 + ?Sized> EntryV1_4 for C {}
3838
3839/// Vulkan 1.4 instance command wrappers.
3840pub trait InstanceV1_4: InstanceV1_3 {}
3841
3842impl<C: InstanceV1_0 + ?Sized> InstanceV1_4 for C {}
3843
3844/// Vulkan 1.4 device command wrappers.
3845pub trait DeviceV1_4: DeviceV1_3 {
3846    /// <https://www.khronos.org/registry/vulkan/specs/latest/man/html/vkCmdBindDescriptorSets2.html>
3847    #[inline]
3848    unsafe fn cmd_bind_descriptor_sets2(
3849        &self,
3850        command_buffer: CommandBuffer,
3851        bind_descriptor_sets_info: &BindDescriptorSetsInfo,
3852    ) {
3853        let __result =
3854            (self.commands().cmd_bind_descriptor_sets2)(command_buffer, bind_descriptor_sets_info);
3855    }
3856
3857    /// <https://www.khronos.org/registry/vulkan/specs/latest/man/html/vkCmdBindIndexBuffer2.html>
3858    #[inline]
3859    unsafe fn cmd_bind_index_buffer2(
3860        &self,
3861        command_buffer: CommandBuffer,
3862        buffer: Buffer,
3863        offset: DeviceSize,
3864        size: DeviceSize,
3865        index_type: IndexType,
3866    ) {
3867        let __result = (self.commands().cmd_bind_index_buffer2)(
3868            command_buffer,
3869            buffer,
3870            offset,
3871            size,
3872            index_type,
3873        );
3874    }
3875
3876    /// <https://www.khronos.org/registry/vulkan/specs/latest/man/html/vkCmdPushConstants2.html>
3877    #[inline]
3878    unsafe fn cmd_push_constants2(
3879        &self,
3880        command_buffer: CommandBuffer,
3881        push_constants_info: &PushConstantsInfo,
3882    ) {
3883        let __result = (self.commands().cmd_push_constants2)(command_buffer, push_constants_info);
3884    }
3885
3886    /// <https://www.khronos.org/registry/vulkan/specs/latest/man/html/vkCmdPushDescriptorSet.html>
3887    #[inline]
3888    unsafe fn cmd_push_descriptor_set(
3889        &self,
3890        command_buffer: CommandBuffer,
3891        pipeline_bind_point: PipelineBindPoint,
3892        layout: PipelineLayout,
3893        set: u32,
3894        descriptor_writes: &[impl Cast<Target = WriteDescriptorSet>],
3895    ) {
3896        let __result = (self.commands().cmd_push_descriptor_set)(
3897            command_buffer,
3898            pipeline_bind_point,
3899            layout,
3900            set,
3901            descriptor_writes.len() as u32,
3902            descriptor_writes.as_ptr().cast(),
3903        );
3904    }
3905
3906    /// <https://www.khronos.org/registry/vulkan/specs/latest/man/html/vkCmdPushDescriptorSet2.html>
3907    #[inline]
3908    unsafe fn cmd_push_descriptor_set2(
3909        &self,
3910        command_buffer: CommandBuffer,
3911        push_descriptor_set_info: &PushDescriptorSetInfo,
3912    ) {
3913        let __result =
3914            (self.commands().cmd_push_descriptor_set2)(command_buffer, push_descriptor_set_info);
3915    }
3916
3917    /// <https://www.khronos.org/registry/vulkan/specs/latest/man/html/vkCmdPushDescriptorSetWithTemplate.html>
3918    #[inline]
3919    unsafe fn cmd_push_descriptor_set_with_template(
3920        &self,
3921        command_buffer: CommandBuffer,
3922        descriptor_update_template: DescriptorUpdateTemplate,
3923        layout: PipelineLayout,
3924        set: u32,
3925        data: *const c_void,
3926    ) {
3927        let __result = (self.commands().cmd_push_descriptor_set_with_template)(
3928            command_buffer,
3929            descriptor_update_template,
3930            layout,
3931            set,
3932            data,
3933        );
3934    }
3935
3936    /// <https://www.khronos.org/registry/vulkan/specs/latest/man/html/vkCmdPushDescriptorSetWithTemplate2.html>
3937    #[inline]
3938    unsafe fn cmd_push_descriptor_set_with_template2(
3939        &self,
3940        command_buffer: CommandBuffer,
3941        push_descriptor_set_with_template_info: &PushDescriptorSetWithTemplateInfo,
3942    ) {
3943        let __result = (self.commands().cmd_push_descriptor_set_with_template2)(
3944            command_buffer,
3945            push_descriptor_set_with_template_info,
3946        );
3947    }
3948
3949    /// <https://www.khronos.org/registry/vulkan/specs/latest/man/html/vkCmdSetLineStipple.html>
3950    #[inline]
3951    unsafe fn cmd_set_line_stipple(
3952        &self,
3953        command_buffer: CommandBuffer,
3954        line_stipple_factor: u32,
3955        line_stipple_pattern: u16,
3956    ) {
3957        let __result = (self.commands().cmd_set_line_stipple)(
3958            command_buffer,
3959            line_stipple_factor,
3960            line_stipple_pattern,
3961        );
3962    }
3963
3964    /// <https://www.khronos.org/registry/vulkan/specs/latest/man/html/vkCmdSetRenderingAttachmentLocations.html>
3965    #[inline]
3966    unsafe fn cmd_set_rendering_attachment_locations(
3967        &self,
3968        command_buffer: CommandBuffer,
3969        location_info: &RenderingAttachmentLocationInfo,
3970    ) {
3971        let __result =
3972            (self.commands().cmd_set_rendering_attachment_locations)(command_buffer, location_info);
3973    }
3974
3975    /// <https://www.khronos.org/registry/vulkan/specs/latest/man/html/vkCmdSetRenderingInputAttachmentIndices.html>
3976    #[inline]
3977    unsafe fn cmd_set_rendering_input_attachment_indices(
3978        &self,
3979        command_buffer: CommandBuffer,
3980        input_attachment_index_info: &RenderingInputAttachmentIndexInfo,
3981    ) {
3982        let __result = (self.commands().cmd_set_rendering_input_attachment_indices)(
3983            command_buffer,
3984            input_attachment_index_info,
3985        );
3986    }
3987
3988    /// <https://www.khronos.org/registry/vulkan/specs/latest/man/html/vkCopyImageToImage.html>
3989    #[inline]
3990    unsafe fn copy_image_to_image(
3991        &self,
3992        copy_image_to_image_info: &CopyImageToImageInfo,
3993    ) -> crate::VkResult<()> {
3994        let __result =
3995            (self.commands().copy_image_to_image)(self.handle(), copy_image_to_image_info);
3996
3997        if __result == Result::SUCCESS {
3998            Ok(())
3999        } else {
4000            Err(__result.into())
4001        }
4002    }
4003
4004    /// <https://www.khronos.org/registry/vulkan/specs/latest/man/html/vkCopyImageToMemory.html>
4005    #[inline]
4006    unsafe fn copy_image_to_memory(
4007        &self,
4008        copy_image_to_memory_info: &CopyImageToMemoryInfo,
4009    ) -> crate::VkResult<()> {
4010        let __result =
4011            (self.commands().copy_image_to_memory)(self.handle(), copy_image_to_memory_info);
4012
4013        if __result == Result::SUCCESS {
4014            Ok(())
4015        } else {
4016            Err(__result.into())
4017        }
4018    }
4019
4020    /// <https://www.khronos.org/registry/vulkan/specs/latest/man/html/vkCopyMemoryToImage.html>
4021    #[inline]
4022    unsafe fn copy_memory_to_image(
4023        &self,
4024        copy_memory_to_image_info: &CopyMemoryToImageInfo,
4025    ) -> crate::VkResult<()> {
4026        let __result =
4027            (self.commands().copy_memory_to_image)(self.handle(), copy_memory_to_image_info);
4028
4029        if __result == Result::SUCCESS {
4030            Ok(())
4031        } else {
4032            Err(__result.into())
4033        }
4034    }
4035
4036    /// <https://www.khronos.org/registry/vulkan/specs/latest/man/html/vkGetDeviceImageSubresourceLayout.html>
4037    #[inline]
4038    unsafe fn get_device_image_subresource_layout(
4039        &self,
4040        info: &DeviceImageSubresourceInfo,
4041        layout: &mut SubresourceLayout2,
4042    ) {
4043        let __result =
4044            (self.commands().get_device_image_subresource_layout)(self.handle(), info, layout);
4045    }
4046
4047    /// <https://www.khronos.org/registry/vulkan/specs/latest/man/html/vkGetImageSubresourceLayout2.html>
4048    #[inline]
4049    unsafe fn get_image_subresource_layout2(
4050        &self,
4051        image: Image,
4052        subresource: &ImageSubresource2,
4053        layout: &mut SubresourceLayout2,
4054    ) {
4055        let __result = (self.commands().get_image_subresource_layout2)(
4056            self.handle(),
4057            image,
4058            subresource,
4059            layout,
4060        );
4061    }
4062
4063    /// <https://www.khronos.org/registry/vulkan/specs/latest/man/html/vkGetRenderingAreaGranularity.html>
4064    #[inline]
4065    unsafe fn get_rendering_area_granularity(
4066        &self,
4067        rendering_area_info: &RenderingAreaInfo,
4068    ) -> Extent2D {
4069        let mut granularity = MaybeUninit::<Extent2D>::uninit();
4070
4071        let __result = (self.commands().get_rendering_area_granularity)(
4072            self.handle(),
4073            rendering_area_info,
4074            granularity.as_mut_ptr(),
4075        );
4076
4077        granularity.assume_init()
4078    }
4079
4080    /// <https://www.khronos.org/registry/vulkan/specs/latest/man/html/vkMapMemory2.html>
4081    #[inline]
4082    unsafe fn map_memory2(&self, memory_map_info: &MemoryMapInfo) -> crate::VkResult<*mut c_void> {
4083        let mut data = MaybeUninit::<*mut c_void>::uninit();
4084
4085        let __result =
4086            (self.commands().map_memory2)(self.handle(), memory_map_info, data.as_mut_ptr());
4087
4088        if __result == Result::SUCCESS {
4089            Ok(data.assume_init())
4090        } else {
4091            Err(__result.into())
4092        }
4093    }
4094
4095    /// <https://www.khronos.org/registry/vulkan/specs/latest/man/html/vkTransitionImageLayout.html>
4096    #[inline]
4097    unsafe fn transition_image_layout(
4098        &self,
4099        transitions: &[impl Cast<Target = HostImageLayoutTransitionInfo>],
4100    ) -> crate::VkResult<()> {
4101        let __result = (self.commands().transition_image_layout)(
4102            self.handle(),
4103            transitions.len() as u32,
4104            transitions.as_ptr().cast(),
4105        );
4106
4107        if __result == Result::SUCCESS {
4108            Ok(())
4109        } else {
4110            Err(__result.into())
4111        }
4112    }
4113
4114    /// <https://www.khronos.org/registry/vulkan/specs/latest/man/html/vkUnmapMemory2.html>
4115    #[inline]
4116    unsafe fn unmap_memory2(&self, memory_unmap_info: &MemoryUnmapInfo) -> crate::VkResult<()> {
4117        let __result = (self.commands().unmap_memory2)(self.handle(), memory_unmap_info);
4118
4119        if __result == Result::SUCCESS {
4120            Ok(())
4121        } else {
4122            Err(__result.into())
4123        }
4124    }
4125}
4126
4127impl<C: DeviceV1_0 + ?Sized> DeviceV1_4 for C {}