#[doc(alias = "VK_KHR_VIDEO_DECODE_QUEUE_SPEC_VERSION")]
pub const KHR_VIDEO_DECODE_QUEUE_SPEC_VERSION: u32 = 4;
#[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"
);
pub const FN_CMD_DECODE_VIDEO_KHR: *const std::os::raw::c_char = crate::cstr!(
"vkCmdDecodeVideoKHR"
);
impl crate::vk1_3::AccessFlagBits2 {
pub const VIDEO_DECODE_READ_KHR: Self = Self(34359738368);
pub const VIDEO_DECODE_WRITE_KHR: Self = Self(68719476736);
}
impl crate::vk1_3::PipelineStageFlagBits2 {
pub const VIDEO_DECODE_KHR: Self = Self(67108864);
}
impl crate::vk1_3::FormatFeatureFlagBits2 {
pub const VIDEO_DECODE_OUTPUT_KHR: Self = Self(33554432);
pub const VIDEO_DECODE_DPB_KHR: Self = Self(67108864);
}
impl crate::vk1_0::BufferUsageFlagBits {
pub const VIDEO_DECODE_SRC_KHR: Self = Self(8192);
pub const VIDEO_DECODE_DST_KHR: Self = Self(16384);
}
impl crate::vk1_0::FormatFeatureFlagBits {
pub const VIDEO_DECODE_OUTPUT_KHR: Self = Self(33554432);
pub const VIDEO_DECODE_DPB_KHR: Self = Self(67108864);
}
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);
}
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);
}
impl crate::vk1_0::QueueFlagBits {
pub const VIDEO_DECODE_KHR: Self = Self(32);
}
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; }
}
#[doc(alias = "VkVideoDecodeCapabilityFlagBitsKHR")]
#[derive(Copy, Clone, PartialEq, Eq, Hash, Default, Ord, PartialOrd)]
#[repr(transparent)]
pub struct VideoDecodeCapabilityFlagBitsKHR(pub u32);
impl VideoDecodeCapabilityFlagBitsKHR {
#[inline]
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)",
},
)
}
}
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; }
}
#[doc(alias = "VkVideoDecodeFlagBitsKHR")]
#[derive(Copy, Clone, PartialEq, Eq, Hash, Default, Ord, PartialOrd)]
#[repr(transparent)]
pub struct VideoDecodeFlagBitsKHR(pub u32);
impl VideoDecodeFlagBitsKHR {
#[inline]
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)",
},
)
}
}
impl crate::extensions::khr_video_decode_queue::VideoDecodeFlagBitsKHR {
pub const DEFAULT_KHR: Self = Self(0);
pub const RESERVED_0_KHR: Self = Self(1);
}
#[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> {}
#[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)]
#[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]
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
}
}
#[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)]
#[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]
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
}
}
impl crate::DeviceLoader {
#[inline]
#[track_caller]
#[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 _);
()
}
}