pub struct RayTracingPipelineDescriptor<'a> {
pub label: Label<'a>,
pub layout: Option<&'a PipelineLayout>,
pub ray_generation: RayTracingStage<'a>,
pub miss: RayTracingStage<'a>,
pub intersections: &'a [RayTracingIntersectionDescriptor<'a>],
pub max_recursion_depth: u32,
pub cache: Option<&'a PipelineCache>,
}Expand description
Describes a ray tracing pipeline.
For use with Device::create_ray_tracing_pipeline.
Fields§
§label: Label<'a>Debug label of the pipeline. This will show up in graphics debuggers for easy identification.
layout: Option<&'a PipelineLayout>The layout of bind groups for this pipeline.
If this is set, then Device::create_ray_tracing_pipeline will raise a validation error if
the layout doesn’t match what the shader module(s) expect.
Using the same PipelineLayout for many RayTracingPipeline or RenderPipeline or ComputePipeline
pipelines guarantees that you don’t have to rebind any resources when switching between
those pipelines.
§Default pipeline layout
If layout is None, then the pipeline has a default layout created and used instead.
The default layout is deduced from the shader modules.
You can use RayTracingPipeline::get_bind_group_layout to create bind groups for use with the
default layout. However, these bind groups cannot be used with any other pipelines. This is
convenient for simple pipelines, but using an explicit layout is recommended in most cases.
Keep phrasing in sync. with RenderPipelineDescriptor and ComputePipelineDescriptor.
ray_generation: RayTracingStage<'a>The ray generation stage. The shader stage invoked by command encoder trace rays.
miss: RayTracingStage<'a>The miss stage. Called if a ray does not hit any object.
intersections: &'a [RayTracingIntersectionDescriptor<'a>]The list of intersection descriptors
max_recursion_depth: u32The maximum number of nested traceRay calls. The ray generation stage is at depth 0,
so it can call traceRay only if this is at least 1. Calling traceRay at a depth
equal to or greater than this value is undefined behavior.
cache: Option<&'a PipelineCache>The pipeline cache to use when creating this pipeline.
Trait Implementations§
Source§impl<'a> Clone for RayTracingPipelineDescriptor<'a>
impl<'a> Clone for RayTracingPipelineDescriptor<'a>
Source§fn clone(&self) -> RayTracingPipelineDescriptor<'a>
fn clone(&self) -> RayTracingPipelineDescriptor<'a>
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl<'a> Freeze for RayTracingPipelineDescriptor<'a>
impl<'a> !RefUnwindSafe for RayTracingPipelineDescriptor<'a>
impl<'a> Send for RayTracingPipelineDescriptor<'a>
impl<'a> Sync for RayTracingPipelineDescriptor<'a>
impl<'a> Unpin for RayTracingPipelineDescriptor<'a>
impl<'a> UnsafeUnpin for RayTracingPipelineDescriptor<'a>
impl<'a> !UnwindSafe for RayTracingPipelineDescriptor<'a>
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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>
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>
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