#![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_KHR_shader_relaxed_extended_instruction";
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 PhysicalDeviceShaderRelaxedExtendedInstructionFeaturesKHR<'a> {
pub s_type: StructureType,
pub p_next: *mut c_void,
pub shader_relaxed_extended_instruction: Bool32,
pub _marker: PhantomData<&'a ()>,
}
#[cfg(feature = "debug")]
impl fmt::Debug for PhysicalDeviceShaderRelaxedExtendedInstructionFeaturesKHR<'_> {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
f.debug_struct("PhysicalDeviceShaderRelaxedExtendedInstructionFeaturesKHR")
.field("s_type", &self.s_type)
.field("p_next", &self.p_next)
.field(
"shader_relaxed_extended_instruction",
&self.shader_relaxed_extended_instruction,
)
.finish()
}
}
unsafe impl<'a> TaggedStructure<'a>
for PhysicalDeviceShaderRelaxedExtendedInstructionFeaturesKHR<'a>
{
const STRUCTURE_TYPE: StructureType =
StructureType::PHYSICAL_DEVICE_SHADER_RELAXED_EXTENDED_INSTRUCTION_FEATURES_KHR;
}
unsafe impl Extends<PhysicalDeviceFeatures2<'_>>
for PhysicalDeviceShaderRelaxedExtendedInstructionFeaturesKHR<'_>
{
}
unsafe impl Extends<DeviceCreateInfo<'_>>
for PhysicalDeviceShaderRelaxedExtendedInstructionFeaturesKHR<'_>
{
}
impl Default for PhysicalDeviceShaderRelaxedExtendedInstructionFeaturesKHR<'_> {
fn default() -> Self {
Self {
s_type: Self::STRUCTURE_TYPE,
p_next: ptr::null_mut(),
shader_relaxed_extended_instruction: Default::default(),
_marker: PhantomData,
}
}
}
impl<'a> PhysicalDeviceShaderRelaxedExtendedInstructionFeaturesKHR<'a> {
#[inline]
pub fn shader_relaxed_extended_instruction(
mut self,
shader_relaxed_extended_instruction: bool,
) -> Self {
self.shader_relaxed_extended_instruction = shader_relaxed_extended_instruction.into();
self
}
}
}
#[cfg(feature = "ffi")]
pub(super) mod ffi {
#![allow(non_camel_case_types)]
use super::defs::*;
pub type VkPhysicalDeviceShaderRelaxedExtendedInstructionFeaturesKHR =
PhysicalDeviceShaderRelaxedExtendedInstructionFeaturesKHR<'static>;
impl PhysicalDeviceShaderRelaxedExtendedInstructionFeaturesKHR<'_> {
#[inline]
pub unsafe fn drop_lifetime_for_ffi(
&self,
) -> &VkPhysicalDeviceShaderRelaxedExtendedInstructionFeaturesKHR {
unsafe { core::mem::transmute(self) }
}
}
}