erupt 0.23.0+213

Vulkan API bindings
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
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
// DO NOT EDIT: @generated by erupt's generator
//! ## Versioning Warning ⚠️
//!
//! This is a Vulkan **provisional/beta** extension and **must** be used with
//! caution. Its API/behaviour has not been finalized yet and _may_ therefore
//! change in ways that break backwards compatibility between revisions, and
//! before final release of a non-provisional version of this extension.
///<s>Vulkan Manual Page</s> · Constant
#[doc(alias = "VK_KHR_VIDEO_ENCODE_QUEUE_SPEC_VERSION")]
pub const KHR_VIDEO_ENCODE_QUEUE_SPEC_VERSION: u32 = 5;
///<s>Vulkan Manual Page</s> · Constant
#[doc(alias = "VK_KHR_VIDEO_ENCODE_QUEUE_EXTENSION_NAME")]
pub const KHR_VIDEO_ENCODE_QUEUE_EXTENSION_NAME: *const std::os::raw::c_char = crate::cstr!(
    "VK_KHR_video_encode_queue"
);
///<s>Vulkan Manual Page</s> · Constant
pub const FN_CMD_ENCODE_VIDEO_KHR: *const std::os::raw::c_char = crate::cstr!(
    "vkCmdEncodeVideoKHR"
);
///Provided by [`crate::extensions::khr_video_encode_queue`]
impl crate::vk1_3::AccessFlagBits2 {
    pub const VIDEO_ENCODE_READ_KHR: Self = Self(137438953472);
    pub const VIDEO_ENCODE_WRITE_KHR: Self = Self(274877906944);
}
///Provided by [`crate::extensions::khr_video_encode_queue`]
impl crate::vk1_3::PipelineStageFlagBits2 {
    pub const VIDEO_ENCODE_KHR: Self = Self(134217728);
}
///Provided by [`crate::extensions::khr_video_encode_queue`]
impl crate::vk1_3::FormatFeatureFlagBits2 {
    pub const VIDEO_ENCODE_INPUT_KHR: Self = Self(134217728);
    pub const VIDEO_ENCODE_DPB_KHR: Self = Self(268435456);
}
///Provided by [`crate::extensions::khr_video_encode_queue`]
impl crate::vk1_0::BufferUsageFlagBits {
    pub const VIDEO_ENCODE_DST_KHR: Self = Self(32768);
    pub const VIDEO_ENCODE_SRC_KHR: Self = Self(65536);
}
///Provided by [`crate::extensions::khr_video_encode_queue`]
impl crate::vk1_0::FormatFeatureFlagBits {
    pub const VIDEO_ENCODE_INPUT_KHR: Self = Self(134217728);
    pub const VIDEO_ENCODE_DPB_KHR: Self = Self(268435456);
}
///Provided by [`crate::extensions::khr_video_encode_queue`]
impl crate::vk1_0::ImageLayout {
    pub const VIDEO_ENCODE_DST_KHR: Self = Self(1000299000);
    pub const VIDEO_ENCODE_SRC_KHR: Self = Self(1000299001);
    pub const VIDEO_ENCODE_DPB_KHR: Self = Self(1000299002);
}
///Provided by [`crate::extensions::khr_video_encode_queue`]
impl crate::vk1_0::ImageUsageFlagBits {
    pub const VIDEO_ENCODE_DST_KHR: Self = Self(8192);
    pub const VIDEO_ENCODE_SRC_KHR: Self = Self(16384);
    pub const VIDEO_ENCODE_DPB_KHR: Self = Self(32768);
}
///Provided by [`crate::extensions::khr_video_encode_queue`]
impl crate::vk1_0::QueryType {
    pub const VIDEO_ENCODE_BITSTREAM_BUFFER_RANGE_KHR: Self = Self(1000299000);
}
///Provided by [`crate::extensions::khr_video_encode_queue`]
impl crate::vk1_0::QueueFlagBits {
    pub const VIDEO_ENCODE_KHR: Self = Self(64);
}
///Provided by [`crate::extensions::khr_video_encode_queue`]
impl crate::vk1_0::StructureType {
    pub const VIDEO_ENCODE_INFO_KHR: Self = Self(1000299000);
    pub const VIDEO_ENCODE_RATE_CONTROL_INFO_KHR: Self = Self(1000299001);
    pub const VIDEO_ENCODE_RATE_CONTROL_LAYER_INFO_KHR: Self = Self(1000299002);
    pub const VIDEO_ENCODE_CAPABILITIES_KHR: Self = Self(1000299003);
}
bitflags::bitflags! {
    #[doc =
    "[Vulkan Manual Page](https://www.khronos.org/registry/vulkan/specs/1.3-extensions/man/html/VkVideoEncodeFlagsKHR.html) · Bitmask of [`VideoEncodeFlagBitsKHR`]"]
    #[doc(alias = "VkVideoEncodeFlagsKHR")] #[derive(Default)] #[repr(transparent)] pub
    struct VideoEncodeFlagsKHR : u32 { const DEFAULT_KHR =
    VideoEncodeFlagBitsKHR::DEFAULT_KHR.0; const RESERVED_0_KHR =
    VideoEncodeFlagBitsKHR::RESERVED_0_KHR.0; }
}
///[Vulkan Manual Page](https://www.khronos.org/registry/vulkan/specs/1.3-extensions/man/html/VkVideoEncodeFlagBitsKHR.html) · Bits enum of [`VideoEncodeFlagsKHR`]
#[doc(alias = "VkVideoEncodeFlagBitsKHR")]
#[derive(Copy, Clone, PartialEq, Eq, Hash, Default, Ord, PartialOrd)]
#[repr(transparent)]
pub struct VideoEncodeFlagBitsKHR(pub u32);
impl VideoEncodeFlagBitsKHR {
    #[inline]
    ///Converts this enum variant to the corresponding bitmask
    pub const fn bitmask(&self) -> VideoEncodeFlagsKHR {
        VideoEncodeFlagsKHR::from_bits_truncate(self.0)
    }
}
impl std::fmt::Debug for VideoEncodeFlagBitsKHR {
    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
        f.write_str(
            match self {
                &Self::DEFAULT_KHR => "DEFAULT_KHR",
                &Self::RESERVED_0_KHR => "RESERVED_0_KHR",
                _ => "(unknown variant)",
            },
        )
    }
}
///Provided by [`crate::extensions::khr_video_encode_queue`]
impl crate::extensions::khr_video_encode_queue::VideoEncodeFlagBitsKHR {
    pub const DEFAULT_KHR: Self = Self(0);
    pub const RESERVED_0_KHR: Self = Self(1);
}
bitflags::bitflags! {
    #[doc =
    "[Vulkan Manual Page](https://www.khronos.org/registry/vulkan/specs/1.3-extensions/man/html/VkVideoEncodeCapabilityFlagsKHR.html) · Bitmask of [`VideoEncodeCapabilityFlagBitsKHR`]"]
    #[doc(alias = "VkVideoEncodeCapabilityFlagsKHR")] #[derive(Default)]
    #[repr(transparent)] pub struct VideoEncodeCapabilityFlagsKHR : u32 { const
    DEFAULT_KHR = VideoEncodeCapabilityFlagBitsKHR::DEFAULT_KHR.0; const
    PRECEDING_EXTERNALLY_ENCODED_BYTES_KHR =
    VideoEncodeCapabilityFlagBitsKHR::PRECEDING_EXTERNALLY_ENCODED_BYTES_KHR.0; }
}
///[Vulkan Manual Page](https://www.khronos.org/registry/vulkan/specs/1.3-extensions/man/html/VkVideoEncodeCapabilityFlagBitsKHR.html) · Bits enum of [`VideoEncodeCapabilityFlagsKHR`]
#[doc(alias = "VkVideoEncodeCapabilityFlagBitsKHR")]
#[derive(Copy, Clone, PartialEq, Eq, Hash, Default, Ord, PartialOrd)]
#[repr(transparent)]
pub struct VideoEncodeCapabilityFlagBitsKHR(pub u32);
impl VideoEncodeCapabilityFlagBitsKHR {
    #[inline]
    ///Converts this enum variant to the corresponding bitmask
    pub const fn bitmask(&self) -> VideoEncodeCapabilityFlagsKHR {
        VideoEncodeCapabilityFlagsKHR::from_bits_truncate(self.0)
    }
}
impl std::fmt::Debug for VideoEncodeCapabilityFlagBitsKHR {
    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
        f.write_str(
            match self {
                &Self::DEFAULT_KHR => "DEFAULT_KHR",
                &Self::PRECEDING_EXTERNALLY_ENCODED_BYTES_KHR => {
                    "PRECEDING_EXTERNALLY_ENCODED_BYTES_KHR"
                }
                _ => "(unknown variant)",
            },
        )
    }
}
///Provided by [`crate::extensions::khr_video_encode_queue`]
impl crate::extensions::khr_video_encode_queue::VideoEncodeCapabilityFlagBitsKHR {
    pub const DEFAULT_KHR: Self = Self(0);
    pub const PRECEDING_EXTERNALLY_ENCODED_BYTES_KHR: Self = Self(1);
}
bitflags::bitflags! {
    #[doc =
    "[Vulkan Manual Page](https://www.khronos.org/registry/vulkan/specs/1.3-extensions/man/html/VkVideoEncodeRateControlFlagsKHR.html) · Bitmask of [`VideoEncodeRateControlFlagBitsKHR`]"]
    #[doc(alias = "VkVideoEncodeRateControlFlagsKHR")] #[derive(Default)]
    #[repr(transparent)] pub struct VideoEncodeRateControlFlagsKHR : u32 { const
    DEFAULT_KHR = VideoEncodeRateControlFlagBitsKHR::DEFAULT_KHR.0; const RESERVED_0_KHR
    = VideoEncodeRateControlFlagBitsKHR::RESERVED_0_KHR.0; }
}
///[Vulkan Manual Page](https://www.khronos.org/registry/vulkan/specs/1.3-extensions/man/html/VkVideoEncodeRateControlFlagBitsKHR.html) · Bits enum of [`VideoEncodeRateControlFlagsKHR`]
#[doc(alias = "VkVideoEncodeRateControlFlagBitsKHR")]
#[derive(Copy, Clone, PartialEq, Eq, Hash, Default, Ord, PartialOrd)]
#[repr(transparent)]
pub struct VideoEncodeRateControlFlagBitsKHR(pub u32);
impl VideoEncodeRateControlFlagBitsKHR {
    #[inline]
    ///Converts this enum variant to the corresponding bitmask
    pub const fn bitmask(&self) -> VideoEncodeRateControlFlagsKHR {
        VideoEncodeRateControlFlagsKHR::from_bits_truncate(self.0)
    }
}
impl std::fmt::Debug for VideoEncodeRateControlFlagBitsKHR {
    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
        f.write_str(
            match self {
                &Self::DEFAULT_KHR => "DEFAULT_KHR",
                &Self::RESERVED_0_KHR => "RESERVED_0_KHR",
                _ => "(unknown variant)",
            },
        )
    }
}
///Provided by [`crate::extensions::khr_video_encode_queue`]
impl crate::extensions::khr_video_encode_queue::VideoEncodeRateControlFlagBitsKHR {
    pub const DEFAULT_KHR: Self = Self(0);
    pub const RESERVED_0_KHR: Self = Self(1);
}
bitflags::bitflags! {
    #[doc =
    "[Vulkan Manual Page](https://www.khronos.org/registry/vulkan/specs/1.3-extensions/man/html/VkVideoEncodeRateControlModeFlagsKHR.html) · Bitmask of [`VideoEncodeRateControlModeFlagBitsKHR`]"]
    #[doc(alias = "VkVideoEncodeRateControlModeFlagsKHR")] #[derive(Default)]
    #[repr(transparent)] pub struct VideoEncodeRateControlModeFlagsKHR : u32 { const
    NONE_KHR = VideoEncodeRateControlModeFlagBitsKHR::NONE_KHR.0; const CBR_KHR =
    VideoEncodeRateControlModeFlagBitsKHR::CBR_KHR.0; const VBR_KHR =
    VideoEncodeRateControlModeFlagBitsKHR::VBR_KHR.0; }
}
///[Vulkan Manual Page](https://www.khronos.org/registry/vulkan/specs/1.3-extensions/man/html/VkVideoEncodeRateControlModeFlagBitsKHR.html) · Bits enum of [`VideoEncodeRateControlModeFlagsKHR`]
#[doc(alias = "VkVideoEncodeRateControlModeFlagBitsKHR")]
#[derive(Copy, Clone, PartialEq, Eq, Hash, Default, Ord, PartialOrd)]
#[repr(transparent)]
pub struct VideoEncodeRateControlModeFlagBitsKHR(pub u32);
impl VideoEncodeRateControlModeFlagBitsKHR {
    #[inline]
    ///Converts this enum variant to the corresponding bitmask
    pub const fn bitmask(&self) -> VideoEncodeRateControlModeFlagsKHR {
        VideoEncodeRateControlModeFlagsKHR::from_bits_truncate(self.0)
    }
}
impl std::fmt::Debug for VideoEncodeRateControlModeFlagBitsKHR {
    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
        f.write_str(
            match self {
                &Self::NONE_KHR => "NONE_KHR",
                &Self::CBR_KHR => "CBR_KHR",
                &Self::VBR_KHR => "VBR_KHR",
                _ => "(unknown variant)",
            },
        )
    }
}
///Provided by [`crate::extensions::khr_video_encode_queue`]
impl crate::extensions::khr_video_encode_queue::VideoEncodeRateControlModeFlagBitsKHR {
    pub const NONE_KHR: Self = Self(0);
    pub const CBR_KHR: Self = Self(1);
    pub const VBR_KHR: Self = Self(2);
}
///[Vulkan Manual Page](https://www.khronos.org/registry/vulkan/specs/1.3-extensions/man/html/vkCmdEncodeVideoKHR.html) · Function
#[allow(non_camel_case_types)]
pub type PFN_vkCmdEncodeVideoKHR = unsafe extern "system" fn(
    command_buffer: crate::vk1_0::CommandBuffer,
    p_encode_info: *const crate::extensions::khr_video_encode_queue::VideoEncodeInfoKHR,
) -> ();
impl<'a> crate::ExtendableFrom<'a, VideoEncodeCapabilitiesKHR>
for crate::extensions::khr_video_queue::VideoCapabilitiesKHRBuilder<'a> {}
impl<'a> crate::ExtendableFrom<'a, VideoEncodeCapabilitiesKHRBuilder<'_>>
for crate::extensions::khr_video_queue::VideoCapabilitiesKHRBuilder<'a> {}
impl<'a> crate::ExtendableFrom<'a, VideoEncodeRateControlInfoKHR>
for crate::extensions::khr_video_queue::VideoCodingControlInfoKHRBuilder<'a> {}
impl<'a> crate::ExtendableFrom<'a, VideoEncodeRateControlInfoKHRBuilder<'_>>
for crate::extensions::khr_video_queue::VideoCodingControlInfoKHRBuilder<'a> {}
impl<'a> crate::ExtendableFrom<'a, VideoEncodeRateControlLayerInfoKHR>
for crate::extensions::khr_video_queue::VideoCodingControlInfoKHRBuilder<'a> {}
impl<'a> crate::ExtendableFrom<'a, VideoEncodeRateControlLayerInfoKHRBuilder<'_>>
for crate::extensions::khr_video_queue::VideoCodingControlInfoKHRBuilder<'a> {}
///[Vulkan Manual Page](https://www.khronos.org/registry/vulkan/specs/1.3-extensions/man/html/VkVideoEncodeInfoKHR.html) · Structure
#[doc(alias = "VkVideoEncodeInfoKHR")]
#[derive(Copy, Clone)]
#[repr(C)]
pub struct VideoEncodeInfoKHR {
    pub s_type: crate::vk1_0::StructureType,
    pub p_next: *const std::ffi::c_void,
    pub flags: crate::extensions::khr_video_encode_queue::VideoEncodeFlagsKHR,
    pub quality_level: u32,
    pub dst_bitstream_buffer: crate::vk1_0::Buffer,
    pub dst_bitstream_buffer_offset: crate::vk1_0::DeviceSize,
    pub dst_bitstream_buffer_max_range: crate::vk1_0::DeviceSize,
    pub src_picture_resource: crate::extensions::khr_video_queue::VideoPictureResourceKHR,
    pub p_setup_reference_slot: *const crate::extensions::khr_video_queue::VideoReferenceSlotKHR,
    pub reference_slot_count: u32,
    pub p_reference_slots: *const crate::extensions::khr_video_queue::VideoReferenceSlotKHR,
    pub preceding_externally_encoded_bytes: u32,
}
impl VideoEncodeInfoKHR {
    pub const STRUCTURE_TYPE: crate::vk1_0::StructureType = crate::vk1_0::StructureType::VIDEO_ENCODE_INFO_KHR;
}
impl Default for VideoEncodeInfoKHR {
    fn default() -> Self {
        Self {
            s_type: Self::STRUCTURE_TYPE,
            p_next: std::ptr::null(),
            flags: Default::default(),
            quality_level: Default::default(),
            dst_bitstream_buffer: Default::default(),
            dst_bitstream_buffer_offset: Default::default(),
            dst_bitstream_buffer_max_range: Default::default(),
            src_picture_resource: Default::default(),
            p_setup_reference_slot: std::ptr::null(),
            reference_slot_count: Default::default(),
            p_reference_slots: std::ptr::null(),
            preceding_externally_encoded_bytes: Default::default(),
        }
    }
}
impl std::fmt::Debug for VideoEncodeInfoKHR {
    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
        f.debug_struct("VideoEncodeInfoKHR")
            .field("s_type", &self.s_type)
            .field("p_next", &self.p_next)
            .field("flags", &self.flags)
            .field("quality_level", &self.quality_level)
            .field("dst_bitstream_buffer", &self.dst_bitstream_buffer)
            .field("dst_bitstream_buffer_offset", &self.dst_bitstream_buffer_offset)
            .field(
                "dst_bitstream_buffer_max_range",
                &self.dst_bitstream_buffer_max_range,
            )
            .field("src_picture_resource", &self.src_picture_resource)
            .field("p_setup_reference_slot", &self.p_setup_reference_slot)
            .field("reference_slot_count", &self.reference_slot_count)
            .field("p_reference_slots", &self.p_reference_slots)
            .field(
                "preceding_externally_encoded_bytes",
                &self.preceding_externally_encoded_bytes,
            )
            .finish()
    }
}
impl VideoEncodeInfoKHR {
    #[inline]
    pub fn into_builder<'a>(self) -> VideoEncodeInfoKHRBuilder<'a> {
        VideoEncodeInfoKHRBuilder(self, std::marker::PhantomData)
    }
}
#[derive(Copy, Clone)]
///[Vulkan Manual Page](https://www.khronos.org/registry/vulkan/specs/1.3-extensions/man/html/VkVideoEncodeInfoKHR.html) · Builder of [`VideoEncodeInfoKHR`]
#[repr(transparent)]
pub struct VideoEncodeInfoKHRBuilder<'a>(
    VideoEncodeInfoKHR,
    std::marker::PhantomData<&'a ()>,
);
impl<'a> VideoEncodeInfoKHRBuilder<'a> {
    #[inline]
    pub fn new() -> VideoEncodeInfoKHRBuilder<'a> {
        VideoEncodeInfoKHRBuilder(Default::default(), std::marker::PhantomData)
    }
    #[inline]
    #[must_use]
    pub fn flags(
        mut self,
        flags: crate::extensions::khr_video_encode_queue::VideoEncodeFlagsKHR,
    ) -> Self {
        self.0.flags = flags as _;
        self
    }
    #[inline]
    #[must_use]
    pub fn quality_level(mut self, quality_level: u32) -> Self {
        self.0.quality_level = quality_level as _;
        self
    }
    #[inline]
    #[must_use]
    pub fn dst_bitstream_buffer(
        mut self,
        dst_bitstream_buffer: crate::vk1_0::Buffer,
    ) -> Self {
        self.0.dst_bitstream_buffer = dst_bitstream_buffer as _;
        self
    }
    #[inline]
    #[must_use]
    pub fn dst_bitstream_buffer_offset(
        mut self,
        dst_bitstream_buffer_offset: crate::vk1_0::DeviceSize,
    ) -> Self {
        self.0.dst_bitstream_buffer_offset = dst_bitstream_buffer_offset as _;
        self
    }
    #[inline]
    #[must_use]
    pub fn dst_bitstream_buffer_max_range(
        mut self,
        dst_bitstream_buffer_max_range: crate::vk1_0::DeviceSize,
    ) -> Self {
        self.0.dst_bitstream_buffer_max_range = dst_bitstream_buffer_max_range as _;
        self
    }
    #[inline]
    #[must_use]
    pub fn src_picture_resource(
        mut self,
        src_picture_resource: crate::extensions::khr_video_queue::VideoPictureResourceKHR,
    ) -> Self {
        self.0.src_picture_resource = src_picture_resource as _;
        self
    }
    #[inline]
    #[must_use]
    pub fn setup_reference_slot(
        mut self,
        setup_reference_slot: &'a crate::extensions::khr_video_queue::VideoReferenceSlotKHR,
    ) -> Self {
        self.0.p_setup_reference_slot = setup_reference_slot as _;
        self
    }
    #[inline]
    #[must_use]
    pub fn reference_slots(
        mut self,
        reference_slots: &'a [crate::extensions::khr_video_queue::VideoReferenceSlotKHRBuilder],
    ) -> Self {
        self.0.p_reference_slots = reference_slots.as_ptr() as _;
        self.0.reference_slot_count = reference_slots.len() as _;
        self
    }
    #[inline]
    #[must_use]
    pub fn preceding_externally_encoded_bytes(
        mut self,
        preceding_externally_encoded_bytes: u32,
    ) -> Self {
        self
            .0
            .preceding_externally_encoded_bytes = preceding_externally_encoded_bytes
            as _;
        self
    }
    #[inline]
    /// Discards all lifetime information.
    /// Use the `Deref` and `DerefMut` implementations if possible.
    pub fn build_dangling(self) -> VideoEncodeInfoKHR {
        self.0
    }
}
impl<'a> std::default::Default for VideoEncodeInfoKHRBuilder<'a> {
    fn default() -> VideoEncodeInfoKHRBuilder<'a> {
        Self::new()
    }
}
impl<'a> std::fmt::Debug for VideoEncodeInfoKHRBuilder<'a> {
    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
        std::fmt::Debug::fmt(&self.0, f)
    }
}
impl<'a> std::ops::Deref for VideoEncodeInfoKHRBuilder<'a> {
    type Target = VideoEncodeInfoKHR;
    fn deref(&self) -> &Self::Target {
        &self.0
    }
}
impl<'a> std::ops::DerefMut for VideoEncodeInfoKHRBuilder<'a> {
    fn deref_mut(&mut self) -> &mut Self::Target {
        &mut self.0
    }
}
///[Vulkan Manual Page](https://www.khronos.org/registry/vulkan/specs/1.3-extensions/man/html/VkVideoEncodeRateControlInfoKHR.html) · Structure
#[doc(alias = "VkVideoEncodeRateControlInfoKHR")]
#[derive(Copy, Clone)]
#[repr(C)]
pub struct VideoEncodeRateControlInfoKHR {
    pub s_type: crate::vk1_0::StructureType,
    pub p_next: *const std::ffi::c_void,
    pub flags: crate::extensions::khr_video_encode_queue::VideoEncodeRateControlFlagsKHR,
    pub rate_control_mode: crate::extensions::khr_video_encode_queue::VideoEncodeRateControlModeFlagBitsKHR,
    pub layer_count: u8,
    pub p_layer_configs: *const crate::extensions::khr_video_encode_queue::VideoEncodeRateControlLayerInfoKHR,
}
impl VideoEncodeRateControlInfoKHR {
    pub const STRUCTURE_TYPE: crate::vk1_0::StructureType = crate::vk1_0::StructureType::VIDEO_ENCODE_RATE_CONTROL_INFO_KHR;
}
impl Default for VideoEncodeRateControlInfoKHR {
    fn default() -> Self {
        Self {
            s_type: Self::STRUCTURE_TYPE,
            p_next: std::ptr::null(),
            flags: Default::default(),
            rate_control_mode: Default::default(),
            layer_count: Default::default(),
            p_layer_configs: std::ptr::null(),
        }
    }
}
impl std::fmt::Debug for VideoEncodeRateControlInfoKHR {
    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
        f.debug_struct("VideoEncodeRateControlInfoKHR")
            .field("s_type", &self.s_type)
            .field("p_next", &self.p_next)
            .field("flags", &self.flags)
            .field("rate_control_mode", &self.rate_control_mode)
            .field("layer_count", &self.layer_count)
            .field("p_layer_configs", &self.p_layer_configs)
            .finish()
    }
}
impl VideoEncodeRateControlInfoKHR {
    #[inline]
    pub fn into_builder<'a>(self) -> VideoEncodeRateControlInfoKHRBuilder<'a> {
        VideoEncodeRateControlInfoKHRBuilder(self, std::marker::PhantomData)
    }
}
#[derive(Copy, Clone)]
///[Vulkan Manual Page](https://www.khronos.org/registry/vulkan/specs/1.3-extensions/man/html/VkVideoEncodeRateControlInfoKHR.html) · Builder of [`VideoEncodeRateControlInfoKHR`]
#[repr(transparent)]
pub struct VideoEncodeRateControlInfoKHRBuilder<'a>(
    VideoEncodeRateControlInfoKHR,
    std::marker::PhantomData<&'a ()>,
);
impl<'a> VideoEncodeRateControlInfoKHRBuilder<'a> {
    #[inline]
    pub fn new() -> VideoEncodeRateControlInfoKHRBuilder<'a> {
        VideoEncodeRateControlInfoKHRBuilder(
            Default::default(),
            std::marker::PhantomData,
        )
    }
    #[inline]
    #[must_use]
    pub fn flags(
        mut self,
        flags: crate::extensions::khr_video_encode_queue::VideoEncodeRateControlFlagsKHR,
    ) -> Self {
        self.0.flags = flags as _;
        self
    }
    #[inline]
    #[must_use]
    pub fn rate_control_mode(
        mut self,
        rate_control_mode: crate::extensions::khr_video_encode_queue::VideoEncodeRateControlModeFlagBitsKHR,
    ) -> Self {
        self.0.rate_control_mode = rate_control_mode as _;
        self
    }
    #[inline]
    #[must_use]
    pub fn layer_configs(
        mut self,
        layer_configs: &'a [crate::extensions::khr_video_encode_queue::VideoEncodeRateControlLayerInfoKHRBuilder],
    ) -> Self {
        self.0.p_layer_configs = layer_configs.as_ptr() as _;
        self.0.layer_count = layer_configs.len() as _;
        self
    }
    #[inline]
    /// Discards all lifetime information.
    /// Use the `Deref` and `DerefMut` implementations if possible.
    pub fn build_dangling(self) -> VideoEncodeRateControlInfoKHR {
        self.0
    }
}
impl<'a> std::default::Default for VideoEncodeRateControlInfoKHRBuilder<'a> {
    fn default() -> VideoEncodeRateControlInfoKHRBuilder<'a> {
        Self::new()
    }
}
impl<'a> std::fmt::Debug for VideoEncodeRateControlInfoKHRBuilder<'a> {
    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
        std::fmt::Debug::fmt(&self.0, f)
    }
}
impl<'a> std::ops::Deref for VideoEncodeRateControlInfoKHRBuilder<'a> {
    type Target = VideoEncodeRateControlInfoKHR;
    fn deref(&self) -> &Self::Target {
        &self.0
    }
}
impl<'a> std::ops::DerefMut for VideoEncodeRateControlInfoKHRBuilder<'a> {
    fn deref_mut(&mut self) -> &mut Self::Target {
        &mut self.0
    }
}
///[Vulkan Manual Page](https://www.khronos.org/registry/vulkan/specs/1.3-extensions/man/html/VkVideoEncodeRateControlLayerInfoKHR.html) · Structure
#[doc(alias = "VkVideoEncodeRateControlLayerInfoKHR")]
#[derive(Copy, Clone)]
#[repr(C)]
pub struct VideoEncodeRateControlLayerInfoKHR {
    pub s_type: crate::vk1_0::StructureType,
    pub p_next: *const std::ffi::c_void,
    pub average_bitrate: u32,
    pub max_bitrate: u32,
    pub frame_rate_numerator: u32,
    pub frame_rate_denominator: u32,
    pub virtual_buffer_size_in_ms: u32,
    pub initial_virtual_buffer_size_in_ms: u32,
}
impl VideoEncodeRateControlLayerInfoKHR {
    pub const STRUCTURE_TYPE: crate::vk1_0::StructureType = crate::vk1_0::StructureType::VIDEO_ENCODE_RATE_CONTROL_LAYER_INFO_KHR;
}
impl Default for VideoEncodeRateControlLayerInfoKHR {
    fn default() -> Self {
        Self {
            s_type: Self::STRUCTURE_TYPE,
            p_next: std::ptr::null(),
            average_bitrate: Default::default(),
            max_bitrate: Default::default(),
            frame_rate_numerator: Default::default(),
            frame_rate_denominator: Default::default(),
            virtual_buffer_size_in_ms: Default::default(),
            initial_virtual_buffer_size_in_ms: Default::default(),
        }
    }
}
impl std::fmt::Debug for VideoEncodeRateControlLayerInfoKHR {
    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
        f.debug_struct("VideoEncodeRateControlLayerInfoKHR")
            .field("s_type", &self.s_type)
            .field("p_next", &self.p_next)
            .field("average_bitrate", &self.average_bitrate)
            .field("max_bitrate", &self.max_bitrate)
            .field("frame_rate_numerator", &self.frame_rate_numerator)
            .field("frame_rate_denominator", &self.frame_rate_denominator)
            .field("virtual_buffer_size_in_ms", &self.virtual_buffer_size_in_ms)
            .field(
                "initial_virtual_buffer_size_in_ms",
                &self.initial_virtual_buffer_size_in_ms,
            )
            .finish()
    }
}
impl VideoEncodeRateControlLayerInfoKHR {
    #[inline]
    pub fn into_builder<'a>(self) -> VideoEncodeRateControlLayerInfoKHRBuilder<'a> {
        VideoEncodeRateControlLayerInfoKHRBuilder(self, std::marker::PhantomData)
    }
}
#[derive(Copy, Clone)]
///[Vulkan Manual Page](https://www.khronos.org/registry/vulkan/specs/1.3-extensions/man/html/VkVideoEncodeRateControlLayerInfoKHR.html) · Builder of [`VideoEncodeRateControlLayerInfoKHR`]
#[repr(transparent)]
pub struct VideoEncodeRateControlLayerInfoKHRBuilder<'a>(
    VideoEncodeRateControlLayerInfoKHR,
    std::marker::PhantomData<&'a ()>,
);
impl<'a> VideoEncodeRateControlLayerInfoKHRBuilder<'a> {
    #[inline]
    pub fn new() -> VideoEncodeRateControlLayerInfoKHRBuilder<'a> {
        VideoEncodeRateControlLayerInfoKHRBuilder(
            Default::default(),
            std::marker::PhantomData,
        )
    }
    #[inline]
    #[must_use]
    pub fn average_bitrate(mut self, average_bitrate: u32) -> Self {
        self.0.average_bitrate = average_bitrate as _;
        self
    }
    #[inline]
    #[must_use]
    pub fn max_bitrate(mut self, max_bitrate: u32) -> Self {
        self.0.max_bitrate = max_bitrate as _;
        self
    }
    #[inline]
    #[must_use]
    pub fn frame_rate_numerator(mut self, frame_rate_numerator: u32) -> Self {
        self.0.frame_rate_numerator = frame_rate_numerator as _;
        self
    }
    #[inline]
    #[must_use]
    pub fn frame_rate_denominator(mut self, frame_rate_denominator: u32) -> Self {
        self.0.frame_rate_denominator = frame_rate_denominator as _;
        self
    }
    #[inline]
    #[must_use]
    pub fn virtual_buffer_size_in_ms(mut self, virtual_buffer_size_in_ms: u32) -> Self {
        self.0.virtual_buffer_size_in_ms = virtual_buffer_size_in_ms as _;
        self
    }
    #[inline]
    #[must_use]
    pub fn initial_virtual_buffer_size_in_ms(
        mut self,
        initial_virtual_buffer_size_in_ms: u32,
    ) -> Self {
        self
            .0
            .initial_virtual_buffer_size_in_ms = initial_virtual_buffer_size_in_ms as _;
        self
    }
    #[inline]
    /// Discards all lifetime information.
    /// Use the `Deref` and `DerefMut` implementations if possible.
    pub fn build_dangling(self) -> VideoEncodeRateControlLayerInfoKHR {
        self.0
    }
}
impl<'a> std::default::Default for VideoEncodeRateControlLayerInfoKHRBuilder<'a> {
    fn default() -> VideoEncodeRateControlLayerInfoKHRBuilder<'a> {
        Self::new()
    }
}
impl<'a> std::fmt::Debug for VideoEncodeRateControlLayerInfoKHRBuilder<'a> {
    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
        std::fmt::Debug::fmt(&self.0, f)
    }
}
impl<'a> std::ops::Deref for VideoEncodeRateControlLayerInfoKHRBuilder<'a> {
    type Target = VideoEncodeRateControlLayerInfoKHR;
    fn deref(&self) -> &Self::Target {
        &self.0
    }
}
impl<'a> std::ops::DerefMut for VideoEncodeRateControlLayerInfoKHRBuilder<'a> {
    fn deref_mut(&mut self) -> &mut Self::Target {
        &mut self.0
    }
}
///[Vulkan Manual Page](https://www.khronos.org/registry/vulkan/specs/1.3-extensions/man/html/VkVideoEncodeCapabilitiesKHR.html) · Structure
#[doc(alias = "VkVideoEncodeCapabilitiesKHR")]
#[derive(Copy, Clone)]
#[repr(C)]
pub struct VideoEncodeCapabilitiesKHR {
    pub s_type: crate::vk1_0::StructureType,
    pub p_next: *mut std::ffi::c_void,
    pub flags: crate::extensions::khr_video_encode_queue::VideoEncodeCapabilityFlagsKHR,
    pub rate_control_modes: crate::extensions::khr_video_encode_queue::VideoEncodeRateControlModeFlagsKHR,
    pub rate_control_layer_count: u8,
    pub quality_level_count: u8,
    pub input_image_data_fill_alignment: crate::vk1_0::Extent2D,
}
impl VideoEncodeCapabilitiesKHR {
    pub const STRUCTURE_TYPE: crate::vk1_0::StructureType = crate::vk1_0::StructureType::VIDEO_ENCODE_CAPABILITIES_KHR;
}
impl Default for VideoEncodeCapabilitiesKHR {
    fn default() -> Self {
        Self {
            s_type: Self::STRUCTURE_TYPE,
            p_next: std::ptr::null_mut(),
            flags: Default::default(),
            rate_control_modes: Default::default(),
            rate_control_layer_count: Default::default(),
            quality_level_count: Default::default(),
            input_image_data_fill_alignment: Default::default(),
        }
    }
}
impl std::fmt::Debug for VideoEncodeCapabilitiesKHR {
    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
        f.debug_struct("VideoEncodeCapabilitiesKHR")
            .field("s_type", &self.s_type)
            .field("p_next", &self.p_next)
            .field("flags", &self.flags)
            .field("rate_control_modes", &self.rate_control_modes)
            .field("rate_control_layer_count", &self.rate_control_layer_count)
            .field("quality_level_count", &self.quality_level_count)
            .field(
                "input_image_data_fill_alignment",
                &self.input_image_data_fill_alignment,
            )
            .finish()
    }
}
impl VideoEncodeCapabilitiesKHR {
    #[inline]
    pub fn into_builder<'a>(self) -> VideoEncodeCapabilitiesKHRBuilder<'a> {
        VideoEncodeCapabilitiesKHRBuilder(self, std::marker::PhantomData)
    }
}
#[derive(Copy, Clone)]
///[Vulkan Manual Page](https://www.khronos.org/registry/vulkan/specs/1.3-extensions/man/html/VkVideoEncodeCapabilitiesKHR.html) · Builder of [`VideoEncodeCapabilitiesKHR`]
#[repr(transparent)]
pub struct VideoEncodeCapabilitiesKHRBuilder<'a>(
    VideoEncodeCapabilitiesKHR,
    std::marker::PhantomData<&'a ()>,
);
impl<'a> VideoEncodeCapabilitiesKHRBuilder<'a> {
    #[inline]
    pub fn new() -> VideoEncodeCapabilitiesKHRBuilder<'a> {
        VideoEncodeCapabilitiesKHRBuilder(Default::default(), std::marker::PhantomData)
    }
    #[inline]
    #[must_use]
    pub fn flags(
        mut self,
        flags: crate::extensions::khr_video_encode_queue::VideoEncodeCapabilityFlagsKHR,
    ) -> Self {
        self.0.flags = flags as _;
        self
    }
    #[inline]
    #[must_use]
    pub fn rate_control_modes(
        mut self,
        rate_control_modes: crate::extensions::khr_video_encode_queue::VideoEncodeRateControlModeFlagsKHR,
    ) -> Self {
        self.0.rate_control_modes = rate_control_modes as _;
        self
    }
    #[inline]
    #[must_use]
    pub fn rate_control_layer_count(mut self, rate_control_layer_count: u8) -> Self {
        self.0.rate_control_layer_count = rate_control_layer_count as _;
        self
    }
    #[inline]
    #[must_use]
    pub fn quality_level_count(mut self, quality_level_count: u8) -> Self {
        self.0.quality_level_count = quality_level_count as _;
        self
    }
    #[inline]
    #[must_use]
    pub fn input_image_data_fill_alignment(
        mut self,
        input_image_data_fill_alignment: crate::vk1_0::Extent2D,
    ) -> Self {
        self.0.input_image_data_fill_alignment = input_image_data_fill_alignment as _;
        self
    }
    #[inline]
    /// Discards all lifetime information.
    /// Use the `Deref` and `DerefMut` implementations if possible.
    pub fn build_dangling(self) -> VideoEncodeCapabilitiesKHR {
        self.0
    }
}
impl<'a> std::default::Default for VideoEncodeCapabilitiesKHRBuilder<'a> {
    fn default() -> VideoEncodeCapabilitiesKHRBuilder<'a> {
        Self::new()
    }
}
impl<'a> std::fmt::Debug for VideoEncodeCapabilitiesKHRBuilder<'a> {
    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
        std::fmt::Debug::fmt(&self.0, f)
    }
}
impl<'a> std::ops::Deref for VideoEncodeCapabilitiesKHRBuilder<'a> {
    type Target = VideoEncodeCapabilitiesKHR;
    fn deref(&self) -> &Self::Target {
        &self.0
    }
}
impl<'a> std::ops::DerefMut for VideoEncodeCapabilitiesKHRBuilder<'a> {
    fn deref_mut(&mut self) -> &mut Self::Target {
        &mut self.0
    }
}
///Provided by [`crate::extensions::khr_video_encode_queue`]
impl crate::DeviceLoader {
    #[inline]
    #[track_caller]
    ///[Vulkan Manual Page](https://www.khronos.org/registry/vulkan/specs/1.3-extensions/man/html/vkCmdEncodeVideoKHR.html) · Function
    #[doc(alias = "vkCmdEncodeVideoKHR")]
    pub unsafe fn cmd_encode_video_khr(
        &self,
        command_buffer: crate::vk1_0::CommandBuffer,
        encode_info: &crate::extensions::khr_video_encode_queue::VideoEncodeInfoKHR,
    ) -> () {
        let _function = self.cmd_encode_video_khr.expect(crate::NOT_LOADED_MESSAGE);
        let _return = _function(command_buffer as _, encode_info as _);
        ()
    }
}