covk 0.1.2-1.4.346

Unsafe vulkan bindings for Rust
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
// generated file, do not modify manually
#![allow(unused_qualifications)]
#![allow(mismatched_lifetime_syntaxes)]
use crate::sys;
use crate::sys::ffi::*;
use crate::vk::*;
use crate::vk;
use crate::{Abi, Vk, Sys};

/// `VK_EXT_debug_utils` InstanceCommands
#[derive(Debug, Clone, Copy)]
pub struct Instance(pub sys::ext::debug_utils::InstanceCommands);

impl Instance {
    pub fn load(get: impl FnMut(&::core::ffi::CStr) -> Option<crate::ProcAddr>) -> Self {
        Self(unsafe { sys::ext::debug_utils::InstanceCommands::load(get) })
    }
}

impl Instance {
    /// ```c
    /// VkResult vkCreateDebugUtilsMessengerEXT(VkInstance instance, VkDebugUtilsMessengerCreateInfoEXT const* pCreateInfo, VkAllocationCallbacks const* pAllocator, VkDebugUtilsMessengerEXT* pMessenger)
    /// ```
    pub unsafe fn create_debug_utils_messenger(
        &self,
        instance: vk::Instance,
        create_info: &DebugUtilsMessengerCreateInfoEXT,
    ) -> crate::Result<vk::DebugUtilsMessengerEXT> {
        unsafe {
            let mut _v: Option<vk::DebugUtilsMessengerEXT> = Default::default();
            let _r = self.0.CreateDebugUtilsMessengerEXT(
                instance.abi(), 
                create_info.abi(), 
                Default::default(), 
                (&mut _v).abi(), 
            ).vk();
            _r.result(|| _v)
        }
    }
    /// ```c
    /// void vkDestroyDebugUtilsMessengerEXT(VkInstance instance, VkDebugUtilsMessengerEXT messenger, VkAllocationCallbacks const* pAllocator)
    /// ```
    pub unsafe fn destroy_debug_utils_messenger(
        &self,
        instance: vk::Instance,
        messenger: Option<vk::DebugUtilsMessengerEXT>,
    ) -> () {
        unsafe {
            self.0.DestroyDebugUtilsMessengerEXT(
                instance.abi(), 
                messenger.abi(), 
                Default::default(), 
            );
        }
    }
    /// ```c
    /// void vkSubmitDebugUtilsMessageEXT(VkInstance instance, VkDebugUtilsMessageSeverityFlagBitsEXT messageSeverity, VkDebugUtilsMessageTypeFlagsEXT messageTypes, VkDebugUtilsMessengerCallbackDataEXT const* pCallbackData)
    /// ```
    pub unsafe fn submit_debug_utils_message(
        &self,
        instance: vk::Instance,
        message_severity: DebugUtilsMessageSeverityFlagsEXT,
        message_types: DebugUtilsMessageTypeFlagsEXT,
        callback_data: &DebugUtilsMessengerCallbackDataEXT,
    ) -> () {
        unsafe {
            self.0.SubmitDebugUtilsMessageEXT(
                instance.abi(), 
                message_severity.abi(), 
                message_types.abi(), 
                callback_data.abi(), 
            );
        }
    }
}

impl crate::CommandScope<vk::Instance> for vk::extensions::ext::debug_utils {
    type Commands = Instance;
}

/// Instance object
pub trait ExtDebugUtilsInstance {
    fn raw(&self) -> vk::Instance;
    fn commands(&self) -> &Instance;

    /// ```c
    /// VkResult vkCreateDebugUtilsMessengerEXT(VkInstance instance, VkDebugUtilsMessengerCreateInfoEXT const* pCreateInfo, VkAllocationCallbacks const* pAllocator, VkDebugUtilsMessengerEXT* pMessenger)
    /// ```
    unsafe fn create_debug_utils_messenger(
        &self,
        create_info: &DebugUtilsMessengerCreateInfoEXT,
    ) -> crate::Result<vk::DebugUtilsMessengerEXT> {
        unsafe {
            self.commands().create_debug_utils_messenger(
                self.raw(),
                create_info,
            )
        }
    }
    /// ```c
    /// void vkDestroyDebugUtilsMessengerEXT(VkInstance instance, VkDebugUtilsMessengerEXT messenger, VkAllocationCallbacks const* pAllocator)
    /// ```
    unsafe fn destroy_debug_utils_messenger(
        &self,
        messenger: Option<vk::DebugUtilsMessengerEXT>,
    ) -> () {
        unsafe {
            self.commands().destroy_debug_utils_messenger(
                self.raw(),
                messenger,
            )
        }
    }
    /// ```c
    /// void vkSubmitDebugUtilsMessageEXT(VkInstance instance, VkDebugUtilsMessageSeverityFlagBitsEXT messageSeverity, VkDebugUtilsMessageTypeFlagsEXT messageTypes, VkDebugUtilsMessengerCallbackDataEXT const* pCallbackData)
    /// ```
    unsafe fn submit_debug_utils_message(
        &self,
        message_severity: DebugUtilsMessageSeverityFlagsEXT,
        message_types: DebugUtilsMessageTypeFlagsEXT,
        callback_data: &DebugUtilsMessengerCallbackDataEXT,
    ) -> () {
        unsafe {
            self.commands().submit_debug_utils_message(
                self.raw(),
                message_severity,
                message_types,
                callback_data,
            )
        }
    }
}

impl crate::HndScope<vk::Instance> for vk::extensions::ext::debug_utils {
    type Impl = _hs_Instance::Instance;
}

mod _hs_Instance {
    use super::*;
    #[derive(Debug)]
    pub struct Instance(pub(crate) ::alloc::sync::Arc<super::Instance>, pub(crate) crate::hnd::Instance<vk::core>);

    impl Clone for Instance {
        fn clone(&self) -> Self { Self(self.0.clone(), self.1.clone()) }
    }

    impl crate::hnd::Instance<vk::extensions::ext::debug_utils> {
        pub unsafe fn new(base: &crate::hnd::Instance<vk::core>) -> Self {
            unsafe {
                Self(Instance(
                   ::alloc::sync::Arc::new(super::Instance::load(|name| unsafe { base.get_proc_addr(name) })),
                   base.clone(),
                ))
            }
        }
    }

    impl crate::Extension<crate::hnd::Instance<vk::core>> for vk::extensions::ext::debug_utils {
        type Output = crate::hnd::Instance<vk::extensions::ext::debug_utils>;
        unsafe fn make(target: &crate::hnd::Instance<vk::core>) -> Self::Output {
            unsafe { crate::hnd::Instance::<vk::extensions::ext::debug_utils>::new(target) }
        }
    }

    impl crate::hnd::Instance<vk::extensions::ext::debug_utils> {
        pub fn raw(&self) -> vk::Instance { self.0.1.raw() }
        pub fn commands(&self) -> &::alloc::sync::Arc<super::Instance> { &self.0.0 }
        pub fn core(&self) -> &crate::hnd::Instance<vk::core> { &self.0.1 }
    }

    impl ::core::fmt::Debug for crate::hnd::Instance<vk::extensions::ext::debug_utils> {
        fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
            f.write_fmt(format_args!("Instance({:p})", self.raw()))
        }
    }

    impl ::core::fmt::Pointer for crate::hnd::Instance<vk::extensions::ext::debug_utils> {
        fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
            self.raw().fmt(f)
        }
    }

    impl ::core::ops::Deref for crate::hnd::Instance<vk::extensions::ext::debug_utils> {
        type Target = super::Instance;
        fn deref(&self) -> &Self::Target { self.commands() }
    }

    impl super::ExtDebugUtilsInstance for crate::hnd::Instance<vk::extensions::ext::debug_utils> {
        fn raw(&self) -> vk::Instance { self.raw() }
        fn commands(&self) -> &super::Instance { self.commands() }
    }

    impl crate::HndCtx<vk::extensions::ext::debug_utils, vk::Instance> for crate::hnd::Instance<vk::extensions::ext::debug_utils> {
        type Ctx = Self;
        fn ctx(&self) -> Self::Ctx { self.clone() }
        fn raw(&self) -> vk::Instance { self.raw() }
        fn commands(&self) -> &::alloc::sync::Arc<super::Instance> { self.commands() }
    }
}

impl<O: crate::HndCtx<vk::extensions::ext::debug_utils, vk::Instance>> crate::Owner<vk::DebugUtilsMessengerEXT, vk::extensions::ext::debug_utils> for O {
    fn drop(&mut self, raw: vk::DebugUtilsMessengerEXT) {
        unsafe {
            self.commands().destroy_debug_utils_messenger(self.raw(), Some(raw))
        }
    }
}
impl<O> crate::HndCtx<vk::extensions::ext::debug_utils, vk::Instance> for ::alloc::sync::Arc<crate::Unique<vk::DebugUtilsMessengerEXT, O, vk::extensions::ext::debug_utils>>
    where O: crate::HndCtx<vk::extensions::ext::debug_utils, vk::Instance> + Send + Sync + 'static,
{
    type Ctx = Self;
    fn ctx(&self) -> Self::Ctx { self.clone() }
    fn raw(&self) -> vk::Instance { self.owner.raw() }
    fn commands(&self) -> &::alloc::sync::Arc<Instance> { self.owner.commands() }
}

impl crate::HndScope<vk::DebugUtilsMessengerEXT> for vk::extensions::ext::debug_utils {
    type Impl = _hs_DebugUtilsMessengerEXT::DebugUtilsMessengerEXT;
}


mod _hs_DebugUtilsMessengerEXT {
    use super::*;

    #[repr(transparent)]
    #[derive(Debug)]
    pub struct DebugUtilsMessengerEXT(pub(crate) crate::handle::Hnd<vk::DebugUtilsMessengerEXT, ::alloc::sync::Arc<super::Instance>>);

    impl Clone for DebugUtilsMessengerEXT {
        fn clone(&self) -> Self { Self(self.0.clone()) }
    }

    #[derive(Debug, Clone, Copy)]
    struct Inst;
    impl<Ctx, Dep> crate::handle::HndInst<vk::DebugUtilsMessengerEXT, ::alloc::sync::Arc<super::Instance>, (Ctx, Dep)> for Inst
        where Ctx: crate::HndCtx<vk::extensions::ext::debug_utils, vk::Instance>,
    {
        fn drop(this: &mut crate::handle::HndData<vk::DebugUtilsMessengerEXT, ::alloc::sync::Arc<super::Instance>, (Ctx, Dep)>) {
            unsafe {
                this.scope.destroy_debug_utils_messenger(this.dep.0.raw(), Some(this.raw))
            }
        }
    }

    impl crate::hnd::DebugUtilsMessengerEXT<vk::extensions::ext::debug_utils>
    {
        pub unsafe fn new(ctx: &impl crate::HndCtx<vk::extensions::ext::debug_utils, vk::Instance>, raw: vk::DebugUtilsMessengerEXT) -> Self {
            unsafe { Self::new_with(ctx, raw, || ()) }
        }
        pub unsafe fn new_with<Dep: Send + Sync + 'static>(ctx: &impl crate::HndCtx<vk::extensions::ext::debug_utils, vk::Instance>, raw: vk::DebugUtilsMessengerEXT, dep: impl FnOnce() -> Dep) -> Self {
            Self(DebugUtilsMessengerEXT(crate::handle::Hnd::new(
                ctx.commands().clone(),
                raw,
                (ctx.ctx(), dep()),
                Inst,
            )))
        }
    }

    impl crate::hnd::DebugUtilsMessengerEXT<vk::extensions::ext::debug_utils> {
        pub fn raw(&self) -> vk::DebugUtilsMessengerEXT { self.0.0.raw }
        pub fn commands(&self) -> &::alloc::sync::Arc<super::Instance> { &self.0.0.scope }
    }

    impl ::core::fmt::Debug for crate::hnd::DebugUtilsMessengerEXT<vk::extensions::ext::debug_utils> {
        fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
            f.write_fmt(format_args!("DebugUtilsMessengerEXT({:p})", self.raw()))
        }
    }

    impl ::core::fmt::Pointer for crate::hnd::DebugUtilsMessengerEXT<vk::extensions::ext::debug_utils> {
        fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
            self.raw().fmt(f)
        }
    }

    impl<Ctx> crate::MakeHnd<Ctx, vk::extensions::ext::debug_utils> for vk::DebugUtilsMessengerEXT
        where Ctx: crate::HndCtx<vk::extensions::ext::debug_utils, vk::Instance>,
    {
        type Output = crate::hnd::DebugUtilsMessengerEXT<vk::extensions::ext::debug_utils>;
        unsafe fn hnd_with<Dep: Send + Sync + 'static>(self, ctx: &Ctx, dep: impl FnOnce() -> Dep) -> Self::Output {
            unsafe { crate::hnd::DebugUtilsMessengerEXT::<vk::extensions::ext::debug_utils>::new_with(ctx, self, dep) }
        }
    }
}

/// `VK_EXT_debug_utils` DeviceCommands
#[derive(Debug, Clone, Copy)]
pub struct Device(pub sys::ext::debug_utils::DeviceCommands);

impl Device {
    pub fn load(get: impl FnMut(&::core::ffi::CStr) -> Option<crate::ProcAddr>) -> Self {
        Self(unsafe { sys::ext::debug_utils::DeviceCommands::load(get) })
    }
}

impl Device {
    /// ```c
    /// void vkCmdBeginDebugUtilsLabelEXT(VkCommandBuffer commandBuffer, VkDebugUtilsLabelEXT const* pLabelInfo)
    /// ```
    pub unsafe fn cmd_begin_debug_utils_label(
        &self,
        command_buffer: vk::CommandBuffer,
        label_info: &DebugUtilsLabelEXT,
    ) -> () {
        unsafe {
            self.0.CmdBeginDebugUtilsLabelEXT(
                command_buffer.abi(), 
                label_info.abi(), 
            );
        }
    }
    /// ```c
    /// void vkCmdEndDebugUtilsLabelEXT(VkCommandBuffer commandBuffer)
    /// ```
    pub unsafe fn cmd_end_debug_utils_label(
        &self,
        command_buffer: vk::CommandBuffer,
    ) -> () {
        unsafe {
            self.0.CmdEndDebugUtilsLabelEXT(
                command_buffer.abi(), 
            );
        }
    }
    /// ```c
    /// void vkCmdInsertDebugUtilsLabelEXT(VkCommandBuffer commandBuffer, VkDebugUtilsLabelEXT const* pLabelInfo)
    /// ```
    pub unsafe fn cmd_insert_debug_utils_label(
        &self,
        command_buffer: vk::CommandBuffer,
        label_info: &DebugUtilsLabelEXT,
    ) -> () {
        unsafe {
            self.0.CmdInsertDebugUtilsLabelEXT(
                command_buffer.abi(), 
                label_info.abi(), 
            );
        }
    }
    /// ```c
    /// void vkQueueBeginDebugUtilsLabelEXT(VkQueue queue, VkDebugUtilsLabelEXT const* pLabelInfo)
    /// ```
    pub unsafe fn queue_begin_debug_utils_label(
        &self,
        queue: vk::Queue,
        label_info: &DebugUtilsLabelEXT,
    ) -> () {
        unsafe {
            self.0.QueueBeginDebugUtilsLabelEXT(
                queue.abi(), 
                label_info.abi(), 
            );
        }
    }
    /// ```c
    /// void vkQueueEndDebugUtilsLabelEXT(VkQueue queue)
    /// ```
    pub unsafe fn queue_end_debug_utils_label(
        &self,
        queue: vk::Queue,
    ) -> () {
        unsafe {
            self.0.QueueEndDebugUtilsLabelEXT(
                queue.abi(), 
            );
        }
    }
    /// ```c
    /// void vkQueueInsertDebugUtilsLabelEXT(VkQueue queue, VkDebugUtilsLabelEXT const* pLabelInfo)
    /// ```
    pub unsafe fn queue_insert_debug_utils_label(
        &self,
        queue: vk::Queue,
        label_info: &DebugUtilsLabelEXT,
    ) -> () {
        unsafe {
            self.0.QueueInsertDebugUtilsLabelEXT(
                queue.abi(), 
                label_info.abi(), 
            );
        }
    }
    /// ```c
    /// VkResult vkSetDebugUtilsObjectNameEXT(VkDevice device, VkDebugUtilsObjectNameInfoEXT const* pNameInfo)
    /// ```
    pub unsafe fn set_debug_utils_object_name(
        &self,
        device: vk::Device,
        name_info: &DebugUtilsObjectNameInfoEXT,
    ) -> crate::Result<()> {
        unsafe {
            let _r = self.0.SetDebugUtilsObjectNameEXT(
                device.abi(), 
                name_info.abi(), 
            ).vk();
            _r.result(|| Some(()))
        }
    }
    /// ```c
    /// VkResult vkSetDebugUtilsObjectTagEXT(VkDevice device, VkDebugUtilsObjectTagInfoEXT const* pTagInfo)
    /// ```
    pub unsafe fn set_debug_utils_object_tag(
        &self,
        device: vk::Device,
        tag_info: &DebugUtilsObjectTagInfoEXT,
    ) -> crate::Result<()> {
        unsafe {
            let _r = self.0.SetDebugUtilsObjectTagEXT(
                device.abi(), 
                tag_info.abi(), 
            ).vk();
            _r.result(|| Some(()))
        }
    }
}

impl crate::CommandScope<vk::Device> for vk::extensions::ext::debug_utils {
    type Commands = Device;
}

/// Device object
pub trait ExtDebugUtilsDevice {
    fn raw(&self) -> vk::Device;
    fn commands(&self) -> &Device;

    /// ```c
    /// VkResult vkSetDebugUtilsObjectNameEXT(VkDevice device, VkDebugUtilsObjectNameInfoEXT const* pNameInfo)
    /// ```
    unsafe fn set_debug_utils_object_name(
        &self,
        name_info: &DebugUtilsObjectNameInfoEXT,
    ) -> crate::Result<()> {
        unsafe {
            self.commands().set_debug_utils_object_name(
                self.raw(),
                name_info,
            )
        }
    }
    /// ```c
    /// VkResult vkSetDebugUtilsObjectTagEXT(VkDevice device, VkDebugUtilsObjectTagInfoEXT const* pTagInfo)
    /// ```
    unsafe fn set_debug_utils_object_tag(
        &self,
        tag_info: &DebugUtilsObjectTagInfoEXT,
    ) -> crate::Result<()> {
        unsafe {
            self.commands().set_debug_utils_object_tag(
                self.raw(),
                tag_info,
            )
        }
    }
}

impl crate::HndScope<vk::Device> for vk::extensions::ext::debug_utils {
    type Impl = _hs_Device::Device;
}

mod _hs_Device {
    use super::*;
    #[derive(Debug)]
    pub struct Device(pub(crate) ::alloc::sync::Arc<super::Device>, pub(crate) crate::hnd::Device<vk::core>);

    impl Clone for Device {
        fn clone(&self) -> Self { Self(self.0.clone(), self.1.clone()) }
    }

    impl crate::hnd::Device<vk::extensions::ext::debug_utils> {
        pub unsafe fn new(base: &crate::hnd::Device<vk::core>) -> Self {
            unsafe {
                Self(Device(
                   ::alloc::sync::Arc::new(super::Device::load(|name| unsafe { base.get_proc_addr(name) })),
                   base.clone(),
                ))
            }
        }
    }

    impl crate::Extension<crate::hnd::Device<vk::core>> for vk::extensions::ext::debug_utils {
        type Output = crate::hnd::Device<vk::extensions::ext::debug_utils>;
        unsafe fn make(target: &crate::hnd::Device<vk::core>) -> Self::Output {
            unsafe { crate::hnd::Device::<vk::extensions::ext::debug_utils>::new(target) }
        }
    }

    impl crate::hnd::Device<vk::extensions::ext::debug_utils> {
        pub fn raw(&self) -> vk::Device { self.0.1.raw() }
        pub fn commands(&self) -> &::alloc::sync::Arc<super::Device> { &self.0.0 }
        pub fn core(&self) -> &crate::hnd::Device<vk::core> { &self.0.1 }
    }

    impl ::core::fmt::Debug for crate::hnd::Device<vk::extensions::ext::debug_utils> {
        fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
            f.write_fmt(format_args!("Device({:p})", self.raw()))
        }
    }

    impl ::core::fmt::Pointer for crate::hnd::Device<vk::extensions::ext::debug_utils> {
        fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
            self.raw().fmt(f)
        }
    }

    impl ::core::ops::Deref for crate::hnd::Device<vk::extensions::ext::debug_utils> {
        type Target = super::Device;
        fn deref(&self) -> &Self::Target { self.commands() }
    }

    impl super::ExtDebugUtilsDevice for crate::hnd::Device<vk::extensions::ext::debug_utils> {
        fn raw(&self) -> vk::Device { self.raw() }
        fn commands(&self) -> &super::Device { self.commands() }
    }

    impl crate::HndCtx<vk::extensions::ext::debug_utils, vk::Device> for crate::hnd::Device<vk::extensions::ext::debug_utils> {
        type Ctx = Self;
        fn ctx(&self) -> Self::Ctx { self.clone() }
        fn raw(&self) -> vk::Device { self.raw() }
        fn commands(&self) -> &::alloc::sync::Arc<super::Device> { self.commands() }
    }
}

/// CommandBuffer object
pub trait ExtDebugUtilsCommandBuffer {
    fn raw(&self) -> vk::CommandBuffer;
    fn commands(&self) -> &Device;

    /// ```c
    /// void vkCmdBeginDebugUtilsLabelEXT(VkCommandBuffer commandBuffer, VkDebugUtilsLabelEXT const* pLabelInfo)
    /// ```
    unsafe fn begin_debug_utils_label(
        &self,
        label_info: &DebugUtilsLabelEXT,
    ) -> () {
        unsafe {
            self.commands().cmd_begin_debug_utils_label(
                self.raw(),
                label_info,
            )
        }
    }
    /// ```c
    /// void vkCmdEndDebugUtilsLabelEXT(VkCommandBuffer commandBuffer)
    /// ```
    unsafe fn end_debug_utils_label(
        &self,
    ) -> () {
        unsafe {
            self.commands().cmd_end_debug_utils_label(
                self.raw(),
            )
        }
    }
    /// ```c
    /// void vkCmdInsertDebugUtilsLabelEXT(VkCommandBuffer commandBuffer, VkDebugUtilsLabelEXT const* pLabelInfo)
    /// ```
    unsafe fn insert_debug_utils_label(
        &self,
        label_info: &DebugUtilsLabelEXT,
    ) -> () {
        unsafe {
            self.commands().cmd_insert_debug_utils_label(
                self.raw(),
                label_info,
            )
        }
    }
}

/// Queue object
pub trait ExtDebugUtilsQueue {
    fn raw(&self) -> vk::Queue;
    fn commands(&self) -> &Device;

    /// ```c
    /// void vkQueueBeginDebugUtilsLabelEXT(VkQueue queue, VkDebugUtilsLabelEXT const* pLabelInfo)
    /// ```
    unsafe fn begin_debug_utils_label(
        &self,
        label_info: &DebugUtilsLabelEXT,
    ) -> () {
        unsafe {
            self.commands().queue_begin_debug_utils_label(
                self.raw(),
                label_info,
            )
        }
    }
    /// ```c
    /// void vkQueueEndDebugUtilsLabelEXT(VkQueue queue)
    /// ```
    unsafe fn end_debug_utils_label(
        &self,
    ) -> () {
        unsafe {
            self.commands().queue_end_debug_utils_label(
                self.raw(),
            )
        }
    }
    /// ```c
    /// void vkQueueInsertDebugUtilsLabelEXT(VkQueue queue, VkDebugUtilsLabelEXT const* pLabelInfo)
    /// ```
    unsafe fn insert_debug_utils_label(
        &self,
        label_info: &DebugUtilsLabelEXT,
    ) -> () {
        unsafe {
            self.commands().queue_insert_debug_utils_label(
                self.raw(),
                label_info,
            )
        }
    }
}