#![allow(unused_imports)]
use crate::{vk::Result as VkResult, vk::*, *};
use core::ffi::{CStr, c_char, c_int, c_void};
use core::mem::transmute;
use core::ptr;
pub const EXTENSION_NAME: &CStr = c"VK_EXT_shader_long_vector";
pub(super) mod defs {
#![allow(non_camel_case_types, unused_imports)]
use crate::{vk::*, *};
use core::ffi::{CStr, c_char, c_int, c_void};
use core::fmt;
use core::marker::PhantomData;
use core::ptr;
#[repr(C)]
#[derive(Copy, Clone)]
#[must_use]
pub struct PhysicalDeviceShaderLongVectorFeaturesEXT<'a> {
pub s_type: StructureType,
pub p_next: *mut c_void,
pub long_vector: Bool32,
pub _marker: PhantomData<&'a ()>,
}
#[cfg(feature = "debug")]
impl fmt::Debug for PhysicalDeviceShaderLongVectorFeaturesEXT<'_> {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
f.debug_struct("PhysicalDeviceShaderLongVectorFeaturesEXT")
.field("s_type", &self.s_type)
.field("p_next", &self.p_next)
.field("long_vector", &self.long_vector)
.finish()
}
}
unsafe impl<'a> TaggedStructure<'a> for PhysicalDeviceShaderLongVectorFeaturesEXT<'a> {
const STRUCTURE_TYPE: StructureType =
StructureType::PHYSICAL_DEVICE_SHADER_LONG_VECTOR_FEATURES_EXT;
}
unsafe impl Extends<PhysicalDeviceFeatures2<'_>> for PhysicalDeviceShaderLongVectorFeaturesEXT<'_> {}
unsafe impl Extends<DeviceCreateInfo<'_>> for PhysicalDeviceShaderLongVectorFeaturesEXT<'_> {}
impl Default for PhysicalDeviceShaderLongVectorFeaturesEXT<'_> {
fn default() -> Self {
Self {
s_type: Self::STRUCTURE_TYPE,
p_next: ptr::null_mut(),
long_vector: Default::default(),
_marker: PhantomData,
}
}
}
impl<'a> PhysicalDeviceShaderLongVectorFeaturesEXT<'a> {
#[inline]
pub fn long_vector(mut self, long_vector: bool) -> Self {
self.long_vector = long_vector.into();
self
}
}
#[repr(C)]
#[derive(Copy, Clone)]
#[must_use]
pub struct PhysicalDeviceShaderLongVectorPropertiesEXT<'a> {
pub s_type: StructureType,
pub p_next: *mut c_void,
pub max_vector_components: u32,
pub _marker: PhantomData<&'a ()>,
}
#[cfg(feature = "debug")]
impl fmt::Debug for PhysicalDeviceShaderLongVectorPropertiesEXT<'_> {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
f.debug_struct("PhysicalDeviceShaderLongVectorPropertiesEXT")
.field("s_type", &self.s_type)
.field("p_next", &self.p_next)
.field("max_vector_components", &self.max_vector_components)
.finish()
}
}
unsafe impl<'a> TaggedStructure<'a> for PhysicalDeviceShaderLongVectorPropertiesEXT<'a> {
const STRUCTURE_TYPE: StructureType =
StructureType::PHYSICAL_DEVICE_SHADER_LONG_VECTOR_PROPERTIES_EXT;
}
unsafe impl Extends<PhysicalDeviceProperties2<'_>>
for PhysicalDeviceShaderLongVectorPropertiesEXT<'_>
{
}
impl Default for PhysicalDeviceShaderLongVectorPropertiesEXT<'_> {
fn default() -> Self {
Self {
s_type: Self::STRUCTURE_TYPE,
p_next: ptr::null_mut(),
max_vector_components: Default::default(),
_marker: PhantomData,
}
}
}
impl<'a> PhysicalDeviceShaderLongVectorPropertiesEXT<'a> {
#[inline]
pub fn max_vector_components(mut self, max_vector_components: u32) -> Self {
self.max_vector_components = max_vector_components;
self
}
}
}
#[cfg(feature = "ffi")]
pub(super) mod ffi {
#![allow(non_camel_case_types)]
use super::defs::*;
pub type VkPhysicalDeviceShaderLongVectorFeaturesEXT =
PhysicalDeviceShaderLongVectorFeaturesEXT<'static>;
pub type VkPhysicalDeviceShaderLongVectorPropertiesEXT =
PhysicalDeviceShaderLongVectorPropertiesEXT<'static>;
impl PhysicalDeviceShaderLongVectorFeaturesEXT<'_> {
#[inline]
pub unsafe fn drop_lifetime_for_ffi(&self) -> &VkPhysicalDeviceShaderLongVectorFeaturesEXT {
unsafe { core::mem::transmute(self) }
}
}
impl PhysicalDeviceShaderLongVectorPropertiesEXT<'_> {
#[inline]
pub unsafe fn drop_lifetime_for_ffi(
&self,
) -> &VkPhysicalDeviceShaderLongVectorPropertiesEXT {
unsafe { core::mem::transmute(self) }
}
}
}