#[doc(alias = "VK_MAX_GLOBAL_PRIORITY_SIZE_KHR")]
pub const MAX_GLOBAL_PRIORITY_SIZE_KHR: u32 = 16;
#[doc(alias = "VK_KHR_GLOBAL_PRIORITY_SPEC_VERSION")]
pub const KHR_GLOBAL_PRIORITY_SPEC_VERSION: u32 = 1;
#[doc(alias = "VK_KHR_GLOBAL_PRIORITY_EXTENSION_NAME")]
pub const KHR_GLOBAL_PRIORITY_EXTENSION_NAME: *const std::os::raw::c_char = crate::cstr!(
"VK_KHR_global_priority"
);
impl crate::vk1_0::Result {
pub const ERROR_NOT_PERMITTED_KHR: Self = Self(-1000174001);
}
impl crate::vk1_0::StructureType {
pub const DEVICE_QUEUE_GLOBAL_PRIORITY_CREATE_INFO_KHR: Self = Self(1000174000);
pub const PHYSICAL_DEVICE_GLOBAL_PRIORITY_QUERY_FEATURES_KHR: Self = Self(
1000388000,
);
pub const QUEUE_FAMILY_GLOBAL_PRIORITY_PROPERTIES_KHR: Self = Self(1000388001);
}
#[doc(alias = "VkQueueGlobalPriorityKHR")]
#[derive(Copy, Clone, PartialEq, Eq, Hash, Default, Ord, PartialOrd)]
#[repr(transparent)]
pub struct QueueGlobalPriorityKHR(pub i32);
impl std::fmt::Debug for QueueGlobalPriorityKHR {
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
f.write_str(
match self {
&Self::LOW_KHR => "LOW_KHR",
&Self::MEDIUM_KHR => "MEDIUM_KHR",
&Self::HIGH_KHR => "HIGH_KHR",
&Self::REALTIME_KHR => "REALTIME_KHR",
_ => "(unknown variant)",
},
)
}
}
impl crate::extensions::khr_global_priority::QueueGlobalPriorityKHR {
pub const LOW_KHR: Self = Self(128);
pub const MEDIUM_KHR: Self = Self(256);
pub const HIGH_KHR: Self = Self(512);
pub const REALTIME_KHR: Self = Self(1024);
pub const LOW_EXT: Self = Self::LOW_KHR;
pub const MEDIUM_EXT: Self = Self::MEDIUM_KHR;
pub const HIGH_EXT: Self = Self::HIGH_KHR;
pub const REALTIME_EXT: Self = Self::REALTIME_KHR;
}
impl<'a> crate::ExtendableFrom<'a, DeviceQueueGlobalPriorityCreateInfoKHR>
for crate::vk1_0::DeviceQueueCreateInfoBuilder<'a> {}
impl<'a> crate::ExtendableFrom<'a, DeviceQueueGlobalPriorityCreateInfoKHRBuilder<'_>>
for crate::vk1_0::DeviceQueueCreateInfoBuilder<'a> {}
impl<'a> crate::ExtendableFrom<'a, PhysicalDeviceGlobalPriorityQueryFeaturesKHR>
for crate::vk1_0::DeviceCreateInfoBuilder<'a> {}
impl<
'a,
> crate::ExtendableFrom<'a, PhysicalDeviceGlobalPriorityQueryFeaturesKHRBuilder<'_>>
for crate::vk1_0::DeviceCreateInfoBuilder<'a> {}
impl<'a> crate::ExtendableFrom<'a, PhysicalDeviceGlobalPriorityQueryFeaturesKHR>
for crate::vk1_1::PhysicalDeviceFeatures2Builder<'a> {}
impl<
'a,
> crate::ExtendableFrom<'a, PhysicalDeviceGlobalPriorityQueryFeaturesKHRBuilder<'_>>
for crate::vk1_1::PhysicalDeviceFeatures2Builder<'a> {}
impl<'a> crate::ExtendableFrom<'a, QueueFamilyGlobalPriorityPropertiesKHR>
for crate::vk1_1::QueueFamilyProperties2Builder<'a> {}
impl<'a> crate::ExtendableFrom<'a, QueueFamilyGlobalPriorityPropertiesKHRBuilder<'_>>
for crate::vk1_1::QueueFamilyProperties2Builder<'a> {}
#[doc(alias = "VkDeviceQueueGlobalPriorityCreateInfoKHR")]
#[derive(Copy, Clone)]
#[repr(C)]
pub struct DeviceQueueGlobalPriorityCreateInfoKHR {
pub s_type: crate::vk1_0::StructureType,
pub p_next: *const std::ffi::c_void,
pub global_priority: crate::extensions::khr_global_priority::QueueGlobalPriorityKHR,
}
impl DeviceQueueGlobalPriorityCreateInfoKHR {
pub const STRUCTURE_TYPE: crate::vk1_0::StructureType = crate::vk1_0::StructureType::DEVICE_QUEUE_GLOBAL_PRIORITY_CREATE_INFO_KHR;
}
impl Default for DeviceQueueGlobalPriorityCreateInfoKHR {
fn default() -> Self {
Self {
s_type: Self::STRUCTURE_TYPE,
p_next: std::ptr::null(),
global_priority: Default::default(),
}
}
}
impl std::fmt::Debug for DeviceQueueGlobalPriorityCreateInfoKHR {
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
f.debug_struct("DeviceQueueGlobalPriorityCreateInfoKHR")
.field("s_type", &self.s_type)
.field("p_next", &self.p_next)
.field("global_priority", &self.global_priority)
.finish()
}
}
impl DeviceQueueGlobalPriorityCreateInfoKHR {
#[inline]
pub fn into_builder<'a>(self) -> DeviceQueueGlobalPriorityCreateInfoKHRBuilder<'a> {
DeviceQueueGlobalPriorityCreateInfoKHRBuilder(self, std::marker::PhantomData)
}
}
#[derive(Copy, Clone)]
#[repr(transparent)]
pub struct DeviceQueueGlobalPriorityCreateInfoKHRBuilder<'a>(
DeviceQueueGlobalPriorityCreateInfoKHR,
std::marker::PhantomData<&'a ()>,
);
impl<'a> DeviceQueueGlobalPriorityCreateInfoKHRBuilder<'a> {
#[inline]
pub fn new() -> DeviceQueueGlobalPriorityCreateInfoKHRBuilder<'a> {
DeviceQueueGlobalPriorityCreateInfoKHRBuilder(
Default::default(),
std::marker::PhantomData,
)
}
#[inline]
#[must_use]
pub fn global_priority(
mut self,
global_priority: crate::extensions::khr_global_priority::QueueGlobalPriorityKHR,
) -> Self {
self.0.global_priority = global_priority as _;
self
}
#[inline]
pub fn build_dangling(self) -> DeviceQueueGlobalPriorityCreateInfoKHR {
self.0
}
}
impl<'a> std::default::Default for DeviceQueueGlobalPriorityCreateInfoKHRBuilder<'a> {
fn default() -> DeviceQueueGlobalPriorityCreateInfoKHRBuilder<'a> {
Self::new()
}
}
impl<'a> std::fmt::Debug for DeviceQueueGlobalPriorityCreateInfoKHRBuilder<'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 DeviceQueueGlobalPriorityCreateInfoKHRBuilder<'a> {
type Target = DeviceQueueGlobalPriorityCreateInfoKHR;
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl<'a> std::ops::DerefMut for DeviceQueueGlobalPriorityCreateInfoKHRBuilder<'a> {
fn deref_mut(&mut self) -> &mut Self::Target {
&mut self.0
}
}
#[doc(alias = "VkPhysicalDeviceGlobalPriorityQueryFeaturesKHR")]
#[derive(Copy, Clone)]
#[repr(C)]
pub struct PhysicalDeviceGlobalPriorityQueryFeaturesKHR {
pub s_type: crate::vk1_0::StructureType,
pub p_next: *mut std::ffi::c_void,
pub global_priority_query: crate::vk1_0::Bool32,
}
impl PhysicalDeviceGlobalPriorityQueryFeaturesKHR {
pub const STRUCTURE_TYPE: crate::vk1_0::StructureType = crate::vk1_0::StructureType::PHYSICAL_DEVICE_GLOBAL_PRIORITY_QUERY_FEATURES_KHR;
}
impl Default for PhysicalDeviceGlobalPriorityQueryFeaturesKHR {
fn default() -> Self {
Self {
s_type: Self::STRUCTURE_TYPE,
p_next: std::ptr::null_mut(),
global_priority_query: Default::default(),
}
}
}
impl std::fmt::Debug for PhysicalDeviceGlobalPriorityQueryFeaturesKHR {
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
f.debug_struct("PhysicalDeviceGlobalPriorityQueryFeaturesKHR")
.field("s_type", &self.s_type)
.field("p_next", &self.p_next)
.field("global_priority_query", &(self.global_priority_query != 0))
.finish()
}
}
impl PhysicalDeviceGlobalPriorityQueryFeaturesKHR {
#[inline]
pub fn into_builder<'a>(
self,
) -> PhysicalDeviceGlobalPriorityQueryFeaturesKHRBuilder<'a> {
PhysicalDeviceGlobalPriorityQueryFeaturesKHRBuilder(
self,
std::marker::PhantomData,
)
}
}
#[derive(Copy, Clone)]
#[repr(transparent)]
pub struct PhysicalDeviceGlobalPriorityQueryFeaturesKHRBuilder<'a>(
PhysicalDeviceGlobalPriorityQueryFeaturesKHR,
std::marker::PhantomData<&'a ()>,
);
impl<'a> PhysicalDeviceGlobalPriorityQueryFeaturesKHRBuilder<'a> {
#[inline]
pub fn new() -> PhysicalDeviceGlobalPriorityQueryFeaturesKHRBuilder<'a> {
PhysicalDeviceGlobalPriorityQueryFeaturesKHRBuilder(
Default::default(),
std::marker::PhantomData,
)
}
#[inline]
#[must_use]
pub fn global_priority_query(mut self, global_priority_query: bool) -> Self {
self.0.global_priority_query = global_priority_query as _;
self
}
#[inline]
pub fn build_dangling(self) -> PhysicalDeviceGlobalPriorityQueryFeaturesKHR {
self.0
}
}
impl<'a> std::default::Default
for PhysicalDeviceGlobalPriorityQueryFeaturesKHRBuilder<'a> {
fn default() -> PhysicalDeviceGlobalPriorityQueryFeaturesKHRBuilder<'a> {
Self::new()
}
}
impl<'a> std::fmt::Debug for PhysicalDeviceGlobalPriorityQueryFeaturesKHRBuilder<'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 PhysicalDeviceGlobalPriorityQueryFeaturesKHRBuilder<'a> {
type Target = PhysicalDeviceGlobalPriorityQueryFeaturesKHR;
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl<'a> std::ops::DerefMut for PhysicalDeviceGlobalPriorityQueryFeaturesKHRBuilder<'a> {
fn deref_mut(&mut self) -> &mut Self::Target {
&mut self.0
}
}
#[doc(alias = "VkQueueFamilyGlobalPriorityPropertiesKHR")]
#[derive(Copy, Clone)]
#[repr(C)]
pub struct QueueFamilyGlobalPriorityPropertiesKHR {
pub s_type: crate::vk1_0::StructureType,
pub p_next: *mut std::ffi::c_void,
pub priority_count: u32,
pub priorities: [crate::extensions::khr_global_priority::QueueGlobalPriorityKHR; 16],
}
impl QueueFamilyGlobalPriorityPropertiesKHR {
pub const STRUCTURE_TYPE: crate::vk1_0::StructureType = crate::vk1_0::StructureType::QUEUE_FAMILY_GLOBAL_PRIORITY_PROPERTIES_KHR;
}
impl Default for QueueFamilyGlobalPriorityPropertiesKHR {
fn default() -> Self {
Self {
s_type: Self::STRUCTURE_TYPE,
p_next: std::ptr::null_mut(),
priority_count: Default::default(),
priorities: unsafe { std::mem::zeroed() },
}
}
}
impl std::fmt::Debug for QueueFamilyGlobalPriorityPropertiesKHR {
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
f.debug_struct("QueueFamilyGlobalPriorityPropertiesKHR")
.field("s_type", &self.s_type)
.field("p_next", &self.p_next)
.field("priority_count", &self.priority_count)
.field("priorities", &self.priorities)
.finish()
}
}
impl QueueFamilyGlobalPriorityPropertiesKHR {
#[inline]
pub fn into_builder<'a>(self) -> QueueFamilyGlobalPriorityPropertiesKHRBuilder<'a> {
QueueFamilyGlobalPriorityPropertiesKHRBuilder(self, std::marker::PhantomData)
}
}
#[derive(Copy, Clone)]
#[repr(transparent)]
pub struct QueueFamilyGlobalPriorityPropertiesKHRBuilder<'a>(
QueueFamilyGlobalPriorityPropertiesKHR,
std::marker::PhantomData<&'a ()>,
);
impl<'a> QueueFamilyGlobalPriorityPropertiesKHRBuilder<'a> {
#[inline]
pub fn new() -> QueueFamilyGlobalPriorityPropertiesKHRBuilder<'a> {
QueueFamilyGlobalPriorityPropertiesKHRBuilder(
Default::default(),
std::marker::PhantomData,
)
}
#[inline]
#[must_use]
pub fn priority_count(mut self, priority_count: u32) -> Self {
self.0.priority_count = priority_count as _;
self
}
#[inline]
#[must_use]
pub fn priorities(
mut self,
priorities: [crate::extensions::khr_global_priority::QueueGlobalPriorityKHR; 16],
) -> Self {
self.0.priorities = priorities as _;
self
}
#[inline]
pub fn build_dangling(self) -> QueueFamilyGlobalPriorityPropertiesKHR {
self.0
}
}
impl<'a> std::default::Default for QueueFamilyGlobalPriorityPropertiesKHRBuilder<'a> {
fn default() -> QueueFamilyGlobalPriorityPropertiesKHRBuilder<'a> {
Self::new()
}
}
impl<'a> std::fmt::Debug for QueueFamilyGlobalPriorityPropertiesKHRBuilder<'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 QueueFamilyGlobalPriorityPropertiesKHRBuilder<'a> {
type Target = QueueFamilyGlobalPriorityPropertiesKHR;
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl<'a> std::ops::DerefMut for QueueFamilyGlobalPriorityPropertiesKHRBuilder<'a> {
fn deref_mut(&mut self) -> &mut Self::Target {
&mut self.0
}
}