pub struct ShaderBindingData {
pub(crate) raw: ManuallyDrop<Box<dyn DynBuffer>>,
pub(crate) device: Arc<Device>,
pub(crate) num_intersection_groups: u32,
pub(crate) miss_offset: BufferAddress,
pub(crate) intersection_offset: BufferAddress,
}Expand description
Metal’s shader binding data is opaque, but Vulkan’s and DX12’s has opaque data but a non-opaque storage mechanism, so each require separate codepaths. Therefore, this is a semi-opaque structure because if metal gets ray tracing pipelines, this will need to turn into an enum so it shouldn’t have other code tangled with it.
Fields§
§raw: ManuallyDrop<Box<dyn DynBuffer>>§device: Arc<Device>§num_intersection_groups: u32§miss_offset: BufferAddress§intersection_offset: BufferAddressImplementations§
Source§impl ShaderBindingData
impl ShaderBindingData
Sourcepub(crate) fn from_raw_pipeline(
device: Arc<Device>,
pipeline: &dyn DynRayTracingPipeline,
num_intersection_groups: usize,
) -> Result<Arc<Self>, CreatePipelineError>
pub(crate) fn from_raw_pipeline( device: Arc<Device>, pipeline: &dyn DynRayTracingPipeline, num_intersection_groups: usize, ) -> Result<Arc<Self>, CreatePipelineError>
Panics if num_intersection_groups is above u32::MAX
Trait Implementations§
Source§impl Debug for ShaderBindingData
impl Debug for ShaderBindingData
Source§impl Drop for ShaderBindingData
impl Drop for ShaderBindingData
Auto Trait Implementations§
impl Freeze for ShaderBindingData
impl !RefUnwindSafe for ShaderBindingData
impl Send for ShaderBindingData
impl Sync for ShaderBindingData
impl Unpin for ShaderBindingData
impl UnsafeUnpin for ShaderBindingData
impl !UnwindSafe for ShaderBindingData
Blanket Implementations§
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more