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
// 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_DECODE_QUEUE_SPEC_VERSION")]
pub const KHR_VIDEO_DECODE_QUEUE_SPEC_VERSION: u32 = 4;
///<s>Vulkan Manual Page</s> · Constant
#[doc(alias = "VK_KHR_VIDEO_DECODE_QUEUE_EXTENSION_NAME")]
pub const KHR_VIDEO_DECODE_QUEUE_EXTENSION_NAME: *const std::os::raw::c_char = crate::cstr!(
    "VK_KHR_video_decode_queue"
);
///<s>Vulkan Manual Page</s> · Constant
pub const FN_CMD_DECODE_VIDEO_KHR: *const std::os::raw::c_char = crate::cstr!(
    "vkCmdDecodeVideoKHR"
);
///Provided by [`crate::extensions::khr_video_decode_queue`]
impl crate::vk1_3::AccessFlagBits2 {
    pub const VIDEO_DECODE_READ_KHR: Self = Self(34359738368);
    pub const VIDEO_DECODE_WRITE_KHR: Self = Self(68719476736);
}
///Provided by [`crate::extensions::khr_video_decode_queue`]
impl crate::vk1_3::PipelineStageFlagBits2 {
    pub const VIDEO_DECODE_KHR: Self = Self(67108864);
}
///Provided by [`crate::extensions::khr_video_decode_queue`]
impl crate::vk1_3::FormatFeatureFlagBits2 {
    pub const VIDEO_DECODE_OUTPUT_KHR: Self = Self(33554432);
    pub const VIDEO_DECODE_DPB_KHR: Self = Self(67108864);
}
///Provided by [`crate::extensions::khr_video_decode_queue`]
impl crate::vk1_0::BufferUsageFlagBits {
    pub const VIDEO_DECODE_SRC_KHR: Self = Self(8192);
    pub const VIDEO_DECODE_DST_KHR: Self = Self(16384);
}
///Provided by [`crate::extensions::khr_video_decode_queue`]
impl crate::vk1_0::FormatFeatureFlagBits {
    pub const VIDEO_DECODE_OUTPUT_KHR: Self = Self(33554432);
    pub const VIDEO_DECODE_DPB_KHR: Self = Self(67108864);
}
///Provided by [`crate::extensions::khr_video_decode_queue`]
impl crate::vk1_0::ImageLayout {
    pub const VIDEO_DECODE_DST_KHR: Self = Self(1000024000);
    pub const VIDEO_DECODE_SRC_KHR: Self = Self(1000024001);
    pub const VIDEO_DECODE_DPB_KHR: Self = Self(1000024002);
}
///Provided by [`crate::extensions::khr_video_decode_queue`]
impl crate::vk1_0::ImageUsageFlagBits {
    pub const VIDEO_DECODE_DST_KHR: Self = Self(1024);
    pub const VIDEO_DECODE_SRC_KHR: Self = Self(2048);
    pub const VIDEO_DECODE_DPB_KHR: Self = Self(4096);
}
///Provided by [`crate::extensions::khr_video_decode_queue`]
impl crate::vk1_0::QueueFlagBits {
    pub const VIDEO_DECODE_KHR: Self = Self(32);
}
///Provided by [`crate::extensions::khr_video_decode_queue`]
impl crate::vk1_0::StructureType {
    pub const VIDEO_DECODE_INFO_KHR: Self = Self(1000024000);
    pub const VIDEO_DECODE_CAPABILITIES_KHR: Self = Self(1000024001);
}
bitflags::bitflags! {
    #[doc =
    "[Vulkan Manual Page](https://www.khronos.org/registry/vulkan/specs/1.3-extensions/man/html/VkVideoDecodeCapabilityFlagsKHR.html) · Bitmask of [`VideoDecodeCapabilityFlagBitsKHR`]"]
    #[doc(alias = "VkVideoDecodeCapabilityFlagsKHR")] #[derive(Default)]
    #[repr(transparent)] pub struct VideoDecodeCapabilityFlagsKHR : u32 { const
    DEFAULT_KHR = VideoDecodeCapabilityFlagBitsKHR::DEFAULT_KHR.0; const
    DPB_AND_OUTPUT_COINCIDE_KHR =
    VideoDecodeCapabilityFlagBitsKHR::DPB_AND_OUTPUT_COINCIDE_KHR.0; const
    DPB_AND_OUTPUT_DISTINCT_KHR =
    VideoDecodeCapabilityFlagBitsKHR::DPB_AND_OUTPUT_DISTINCT_KHR.0; }
}
///[Vulkan Manual Page](https://www.khronos.org/registry/vulkan/specs/1.3-extensions/man/html/VkVideoDecodeCapabilityFlagBitsKHR.html) · Bits enum of [`VideoDecodeCapabilityFlagsKHR`]
#[doc(alias = "VkVideoDecodeCapabilityFlagBitsKHR")]
#[derive(Copy, Clone, PartialEq, Eq, Hash, Default, Ord, PartialOrd)]
#[repr(transparent)]
pub struct VideoDecodeCapabilityFlagBitsKHR(pub u32);
impl VideoDecodeCapabilityFlagBitsKHR {
    #[inline]
    ///Converts this enum variant to the corresponding bitmask
    pub const fn bitmask(&self) -> VideoDecodeCapabilityFlagsKHR {
        VideoDecodeCapabilityFlagsKHR::from_bits_truncate(self.0)
    }
}
impl std::fmt::Debug for VideoDecodeCapabilityFlagBitsKHR {
    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
        f.write_str(
            match self {
                &Self::DEFAULT_KHR => "DEFAULT_KHR",
                &Self::DPB_AND_OUTPUT_COINCIDE_KHR => "DPB_AND_OUTPUT_COINCIDE_KHR",
                &Self::DPB_AND_OUTPUT_DISTINCT_KHR => "DPB_AND_OUTPUT_DISTINCT_KHR",
                _ => "(unknown variant)",
            },
        )
    }
}
///Provided by [`crate::extensions::khr_video_decode_queue`]
impl crate::extensions::khr_video_decode_queue::VideoDecodeCapabilityFlagBitsKHR {
    pub const DEFAULT_KHR: Self = Self(0);
    pub const DPB_AND_OUTPUT_COINCIDE_KHR: Self = Self(1);
    pub const DPB_AND_OUTPUT_DISTINCT_KHR: Self = Self(2);
}
bitflags::bitflags! {
    #[doc =
    "[Vulkan Manual Page](https://www.khronos.org/registry/vulkan/specs/1.3-extensions/man/html/VkVideoDecodeFlagsKHR.html) · Bitmask of [`VideoDecodeFlagBitsKHR`]"]
    #[doc(alias = "VkVideoDecodeFlagsKHR")] #[derive(Default)] #[repr(transparent)] pub
    struct VideoDecodeFlagsKHR : u32 { const DEFAULT_KHR =
    VideoDecodeFlagBitsKHR::DEFAULT_KHR.0; const RESERVED_0_KHR =
    VideoDecodeFlagBitsKHR::RESERVED_0_KHR.0; }
}
///[Vulkan Manual Page](https://www.khronos.org/registry/vulkan/specs/1.3-extensions/man/html/VkVideoDecodeFlagBitsKHR.html) · Bits enum of [`VideoDecodeFlagsKHR`]
#[doc(alias = "VkVideoDecodeFlagBitsKHR")]
#[derive(Copy, Clone, PartialEq, Eq, Hash, Default, Ord, PartialOrd)]
#[repr(transparent)]
pub struct VideoDecodeFlagBitsKHR(pub u32);
impl VideoDecodeFlagBitsKHR {
    #[inline]
    ///Converts this enum variant to the corresponding bitmask
    pub const fn bitmask(&self) -> VideoDecodeFlagsKHR {
        VideoDecodeFlagsKHR::from_bits_truncate(self.0)
    }
}
impl std::fmt::Debug for VideoDecodeFlagBitsKHR {
    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_decode_queue`]
impl crate::extensions::khr_video_decode_queue::VideoDecodeFlagBitsKHR {
    pub const DEFAULT_KHR: Self = Self(0);
    pub const RESERVED_0_KHR: Self = Self(1);
}
///[Vulkan Manual Page](https://www.khronos.org/registry/vulkan/specs/1.3-extensions/man/html/vkCmdDecodeVideoKHR.html) · Function
#[allow(non_camel_case_types)]
pub type PFN_vkCmdDecodeVideoKHR = unsafe extern "system" fn(
    command_buffer: crate::vk1_0::CommandBuffer,
    p_frame_info: *const crate::extensions::khr_video_decode_queue::VideoDecodeInfoKHR,
) -> ();
impl<'a> crate::ExtendableFrom<'a, VideoDecodeCapabilitiesKHR>
for crate::extensions::khr_video_queue::VideoCapabilitiesKHRBuilder<'a> {}
impl<'a> crate::ExtendableFrom<'a, VideoDecodeCapabilitiesKHRBuilder<'_>>
for crate::extensions::khr_video_queue::VideoCapabilitiesKHRBuilder<'a> {}
///[Vulkan Manual Page](https://www.khronos.org/registry/vulkan/specs/1.3-extensions/man/html/VkVideoDecodeCapabilitiesKHR.html) · Structure
#[doc(alias = "VkVideoDecodeCapabilitiesKHR")]
#[derive(Copy, Clone)]
#[repr(C)]
pub struct VideoDecodeCapabilitiesKHR {
    pub s_type: crate::vk1_0::StructureType,
    pub p_next: *mut std::ffi::c_void,
    pub flags: crate::extensions::khr_video_decode_queue::VideoDecodeCapabilityFlagsKHR,
}
impl VideoDecodeCapabilitiesKHR {
    pub const STRUCTURE_TYPE: crate::vk1_0::StructureType = crate::vk1_0::StructureType::VIDEO_DECODE_CAPABILITIES_KHR;
}
impl Default for VideoDecodeCapabilitiesKHR {
    fn default() -> Self {
        Self {
            s_type: Self::STRUCTURE_TYPE,
            p_next: std::ptr::null_mut(),
            flags: Default::default(),
        }
    }
}
impl std::fmt::Debug for VideoDecodeCapabilitiesKHR {
    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
        f.debug_struct("VideoDecodeCapabilitiesKHR")
            .field("s_type", &self.s_type)
            .field("p_next", &self.p_next)
            .field("flags", &self.flags)
            .finish()
    }
}
impl VideoDecodeCapabilitiesKHR {
    #[inline]
    pub fn into_builder<'a>(self) -> VideoDecodeCapabilitiesKHRBuilder<'a> {
        VideoDecodeCapabilitiesKHRBuilder(self, std::marker::PhantomData)
    }
}
#[derive(Copy, Clone)]
///[Vulkan Manual Page](https://www.khronos.org/registry/vulkan/specs/1.3-extensions/man/html/VkVideoDecodeCapabilitiesKHR.html) · Builder of [`VideoDecodeCapabilitiesKHR`]
#[repr(transparent)]
pub struct VideoDecodeCapabilitiesKHRBuilder<'a>(
    VideoDecodeCapabilitiesKHR,
    std::marker::PhantomData<&'a ()>,
);
impl<'a> VideoDecodeCapabilitiesKHRBuilder<'a> {
    #[inline]
    pub fn new() -> VideoDecodeCapabilitiesKHRBuilder<'a> {
        VideoDecodeCapabilitiesKHRBuilder(Default::default(), std::marker::PhantomData)
    }
    #[inline]
    #[must_use]
    pub fn flags(
        mut self,
        flags: crate::extensions::khr_video_decode_queue::VideoDecodeCapabilityFlagsKHR,
    ) -> Self {
        self.0.flags = flags as _;
        self
    }
    #[inline]
    /// Discards all lifetime information.
    /// Use the `Deref` and `DerefMut` implementations if possible.
    pub fn build_dangling(self) -> VideoDecodeCapabilitiesKHR {
        self.0
    }
}
impl<'a> std::default::Default for VideoDecodeCapabilitiesKHRBuilder<'a> {
    fn default() -> VideoDecodeCapabilitiesKHRBuilder<'a> {
        Self::new()
    }
}
impl<'a> std::fmt::Debug for VideoDecodeCapabilitiesKHRBuilder<'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 VideoDecodeCapabilitiesKHRBuilder<'a> {
    type Target = VideoDecodeCapabilitiesKHR;
    fn deref(&self) -> &Self::Target {
        &self.0
    }
}
impl<'a> std::ops::DerefMut for VideoDecodeCapabilitiesKHRBuilder<'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/VkVideoDecodeInfoKHR.html) · Structure
#[doc(alias = "VkVideoDecodeInfoKHR")]
#[derive(Copy, Clone)]
#[repr(C)]
pub struct VideoDecodeInfoKHR {
    pub s_type: crate::vk1_0::StructureType,
    pub p_next: *const std::ffi::c_void,
    pub flags: crate::extensions::khr_video_decode_queue::VideoDecodeFlagsKHR,
    pub src_buffer: crate::vk1_0::Buffer,
    pub src_buffer_offset: crate::vk1_0::DeviceSize,
    pub src_buffer_range: crate::vk1_0::DeviceSize,
    pub dst_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,
}
impl VideoDecodeInfoKHR {
    pub const STRUCTURE_TYPE: crate::vk1_0::StructureType = crate::vk1_0::StructureType::VIDEO_DECODE_INFO_KHR;
}
impl Default for VideoDecodeInfoKHR {
    fn default() -> Self {
        Self {
            s_type: Self::STRUCTURE_TYPE,
            p_next: std::ptr::null(),
            flags: Default::default(),
            src_buffer: Default::default(),
            src_buffer_offset: Default::default(),
            src_buffer_range: Default::default(),
            dst_picture_resource: Default::default(),
            p_setup_reference_slot: std::ptr::null(),
            reference_slot_count: Default::default(),
            p_reference_slots: std::ptr::null(),
        }
    }
}
impl std::fmt::Debug for VideoDecodeInfoKHR {
    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
        f.debug_struct("VideoDecodeInfoKHR")
            .field("s_type", &self.s_type)
            .field("p_next", &self.p_next)
            .field("flags", &self.flags)
            .field("src_buffer", &self.src_buffer)
            .field("src_buffer_offset", &self.src_buffer_offset)
            .field("src_buffer_range", &self.src_buffer_range)
            .field("dst_picture_resource", &self.dst_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)
            .finish()
    }
}
impl VideoDecodeInfoKHR {
    #[inline]
    pub fn into_builder<'a>(self) -> VideoDecodeInfoKHRBuilder<'a> {
        VideoDecodeInfoKHRBuilder(self, std::marker::PhantomData)
    }
}
#[derive(Copy, Clone)]
///[Vulkan Manual Page](https://www.khronos.org/registry/vulkan/specs/1.3-extensions/man/html/VkVideoDecodeInfoKHR.html) · Builder of [`VideoDecodeInfoKHR`]
#[repr(transparent)]
pub struct VideoDecodeInfoKHRBuilder<'a>(
    VideoDecodeInfoKHR,
    std::marker::PhantomData<&'a ()>,
);
impl<'a> VideoDecodeInfoKHRBuilder<'a> {
    #[inline]
    pub fn new() -> VideoDecodeInfoKHRBuilder<'a> {
        VideoDecodeInfoKHRBuilder(Default::default(), std::marker::PhantomData)
    }
    #[inline]
    #[must_use]
    pub fn flags(
        mut self,
        flags: crate::extensions::khr_video_decode_queue::VideoDecodeFlagsKHR,
    ) -> Self {
        self.0.flags = flags as _;
        self
    }
    #[inline]
    #[must_use]
    pub fn src_buffer(mut self, src_buffer: crate::vk1_0::Buffer) -> Self {
        self.0.src_buffer = src_buffer as _;
        self
    }
    #[inline]
    #[must_use]
    pub fn src_buffer_offset(
        mut self,
        src_buffer_offset: crate::vk1_0::DeviceSize,
    ) -> Self {
        self.0.src_buffer_offset = src_buffer_offset as _;
        self
    }
    #[inline]
    #[must_use]
    pub fn src_buffer_range(
        mut self,
        src_buffer_range: crate::vk1_0::DeviceSize,
    ) -> Self {
        self.0.src_buffer_range = src_buffer_range as _;
        self
    }
    #[inline]
    #[must_use]
    pub fn dst_picture_resource(
        mut self,
        dst_picture_resource: crate::extensions::khr_video_queue::VideoPictureResourceKHR,
    ) -> Self {
        self.0.dst_picture_resource = dst_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]
    /// Discards all lifetime information.
    /// Use the `Deref` and `DerefMut` implementations if possible.
    pub fn build_dangling(self) -> VideoDecodeInfoKHR {
        self.0
    }
}
impl<'a> std::default::Default for VideoDecodeInfoKHRBuilder<'a> {
    fn default() -> VideoDecodeInfoKHRBuilder<'a> {
        Self::new()
    }
}
impl<'a> std::fmt::Debug for VideoDecodeInfoKHRBuilder<'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 VideoDecodeInfoKHRBuilder<'a> {
    type Target = VideoDecodeInfoKHR;
    fn deref(&self) -> &Self::Target {
        &self.0
    }
}
impl<'a> std::ops::DerefMut for VideoDecodeInfoKHRBuilder<'a> {
    fn deref_mut(&mut self) -> &mut Self::Target {
        &mut self.0
    }
}
///Provided by [`crate::extensions::khr_video_decode_queue`]
impl crate::DeviceLoader {
    #[inline]
    #[track_caller]
    ///[Vulkan Manual Page](https://www.khronos.org/registry/vulkan/specs/1.3-extensions/man/html/vkCmdDecodeVideoKHR.html) · Function
    #[doc(alias = "vkCmdDecodeVideoKHR")]
    pub unsafe fn cmd_decode_video_khr(
        &self,
        command_buffer: crate::vk1_0::CommandBuffer,
        frame_info: &crate::extensions::khr_video_decode_queue::VideoDecodeInfoKHR,
    ) -> () {
        let _function = self.cmd_decode_video_khr.expect(crate::NOT_LOADED_MESSAGE);
        let _return = _function(command_buffer as _, frame_info as _);
        ()
    }
}