pub struct AccelerationStructureBuildGeometryInfoKHR<'a> {
pub ty: AccelerationStructureTypeKHR,
pub flags: BuildAccelerationStructureFlagsKHR,
pub mode: BuildAccelerationStructureModeKHR,
pub src_acceleration_structure: Option<BorrowedHandle<'a, AccelerationStructureKHR>>,
pub dst_acceleration_structure: Option<BorrowedHandle<'a, AccelerationStructureKHR>>,
pub geometry_count: u32,
pub scratch_data: DeviceOrHostAddressKHR,
/* private fields */
}Expand description
Fields§
§ty: AccelerationStructureTypeKHR§flags: BuildAccelerationStructureFlagsKHR§mode: BuildAccelerationStructureModeKHR§src_acceleration_structure: Option<BorrowedHandle<'a, AccelerationStructureKHR>>§dst_acceleration_structure: Option<BorrowedHandle<'a, AccelerationStructureKHR>>§geometry_count: u32§scratch_data: DeviceOrHostAddressKHRImplementations§
Source§impl<'a> AccelerationStructureBuildGeometryInfoKHR<'a>
impl<'a> AccelerationStructureBuildGeometryInfoKHR<'a>
pub fn ty(self, value: AccelerationStructureTypeKHR) -> Self
pub fn flags(self, value: BuildAccelerationStructureFlagsKHR) -> Self
pub fn mode(self, value: BuildAccelerationStructureModeKHR) -> Self
pub fn src_acceleration_structure( self, value: Option<&'a AccelerationStructureKHR>, ) -> Self
pub fn dst_acceleration_structure( self, value: Option<&'a AccelerationStructureKHR>, ) -> Self
pub fn geometry_count(self, value: u32) -> Self
pub fn scratch_data(self, value: DeviceOrHostAddressKHR) -> Self
pub fn geometry<'b: 'a>( self, p_geometries: Option<impl AsSlice<'a, AccelerationStructureGeometryKHR<'b>>>, pp_geometries: Option<impl AsSlice<'a, &'a AccelerationStructureGeometryKHR<'b>>>, ) -> Self
pub fn get_geometries(&self) -> &'a [AccelerationStructureGeometryKHR<'a>]
pub fn get_pp_geometries( &self, ) -> &'a [&'a AccelerationStructureGeometryKHR<'a>]
pub fn push_next<T: ExtendingStructure<Self>>(self, ext: &'a mut T) -> Self
Trait Implementations§
Source§impl<'a> Default for AccelerationStructureBuildGeometryInfoKHR<'a>
Available on crate feature ext_acceleration_structure only.
impl<'a> Default for AccelerationStructureBuildGeometryInfoKHR<'a>
Available on crate feature
ext_acceleration_structure only.Source§impl<'a> ExtendableStructure for AccelerationStructureBuildGeometryInfoKHR<'a>
Available on crate feature ext_acceleration_structure only.
impl<'a> ExtendableStructure for AccelerationStructureBuildGeometryInfoKHR<'a>
Available on crate feature
ext_acceleration_structure only.const STRUCTURE_TYPE: StructureType = StructureType::AccelerationStructureBuildGeometryInfoKHR
Source§unsafe fn retrieve_next(&self) -> &Cell<*const Header>
unsafe fn retrieve_next(&self) -> &Cell<*const Header>
SAFETY: Same as ExtendableStructureBase::header
Source§unsafe fn push_next_unchecked<T: ExtendableStructure>(&self, ext: &T)
unsafe fn push_next_unchecked<T: ExtendableStructure>(&self, ext: &T)
Assuming the current structure chain is the following:
Self -> Ext1 -> Ext2 -> Ext3
calling this function with Ext4 will result in:
Self -> Ext4 -> Ext1 -> Ext2 -> Ext3
This function will never cause cycles in the structure chain
This function is unsafe because it discards the lifetime (ExtendableStructure does not have a lifetime parameter)
Also it does not check that T is a valid extension to be added to Self and only requires references (and not mutable references)
Source§fn new_uninit() -> MaybeUninit<Self>
fn new_uninit() -> MaybeUninit<Self>
Return a unitialized structure except the structure type being correctly set
and the p_next pointer being set to null
Source§impl<'a> ExtendableStructureBase for AccelerationStructureBuildGeometryInfoKHR<'a>
Available on crate feature ext_acceleration_structure only.
impl<'a> ExtendableStructureBase for AccelerationStructureBuildGeometryInfoKHR<'a>
Available on crate feature
ext_acceleration_structure only.impl<'a> Send for AccelerationStructureBuildGeometryInfoKHR<'a>
Available on crate feature
ext_acceleration_structure only.impl<'a> Sync for AccelerationStructureBuildGeometryInfoKHR<'a>
Available on crate feature
ext_acceleration_structure only.Auto Trait Implementations§
impl<'a> !Freeze for AccelerationStructureBuildGeometryInfoKHR<'a>
impl<'a> !RefUnwindSafe for AccelerationStructureBuildGeometryInfoKHR<'a>
impl<'a> !UnwindSafe for AccelerationStructureBuildGeometryInfoKHR<'a>
impl<'a> Unpin for AccelerationStructureBuildGeometryInfoKHR<'a>
impl<'a> UnsafeUnpin for AccelerationStructureBuildGeometryInfoKHR<'a>
Blanket Implementations§
impl<T> Alias<T> for T
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<T> ExtendingStructure<T> for Twhere
T: ExtendableStructure,
Source§impl<H> StructureChainOut<H> for Hwhere
H: ExtendableStructure,
impl<H> StructureChainOut<H> for Hwhere
H: ExtendableStructure,
Source§fn setup_uninit(chain: &mut MaybeUninit<H>)
fn setup_uninit(chain: &mut MaybeUninit<H>)
Setup an uninitialized structure chain
After this call, for the structure chain to be initialized, each structure field (with the exception of the structure type
and the p_next pointer) must be initialized (usually by calling the appropriate vulkan command)
The structure type and p_next pointer of each struct are set so that a vulkan commands sees a pointer to the head
as a valid chain containing all structures
Calling setup_uninit should be enough to then call a vulkan command filling this structure chain, moreover after
the call to this vulkan command, the whole structure chain should be considered initialized
Source§fn get_uninit_head_ptr(chain: *mut H) -> *mut H
fn get_uninit_head_ptr(chain: *mut H) -> *mut H
Return a mutable pointer to the head structure, which can then be passed to vulkan commands
Source§fn setup_cleanup(_: *mut H)
fn setup_cleanup(_: *mut H)
Function to call after a vulkan function initialized this structure to make sure there is no dangling pointer
or anything which could cause undefined behavior