Skip to main content

wgpu_core/command/
ray_tracing_pass_commands.rs

1#[cfg(feature = "serde")]
2use crate::command::serde_object_reference_struct;
3use crate::command::{ArcReferences, ReferenceType};
4use alloc::vec::Vec;
5
6#[cfg(feature = "serde")]
7use macro_rules_attribute::apply;
8
9/// cbindgen:ignore
10#[derive(Clone, Debug)]
11#[cfg_attr(feature = "serde", apply(serde_object_reference_struct))]
12pub enum RayTracingCommand<R: ReferenceType> {
13    SetBindGroup {
14        index: u32,
15        num_dynamic_offsets: usize,
16        bind_group: Option<R::BindGroup>,
17    },
18
19    SetPipeline(R::RayTracingPipeline),
20
21    /// Set a range of immediates to values stored in `immediates_data`.
22    SetImmediate {
23        /// The byte offset within the immediate data storage to write to.  This
24        /// must be a multiple of four.
25        offset: u32,
26
27        /// The immediate data to be written.
28        data: Vec<u32>,
29    },
30
31    TraceRays([u32; 3]),
32
33    PushDebugGroup {
34        color: u32,
35        len: usize,
36    },
37
38    PopDebugGroup,
39
40    InsertDebugMarker {
41        color: u32,
42        len: usize,
43    },
44}
45
46/// cbindgen:ignore
47pub type ArcRayTracingCommand = RayTracingCommand<ArcReferences>;