Struct wgpu_core::track::ray_tracing::AccelerationStructureTracker
source · pub(crate) struct AccelerationStructureTracker<T: AccelerationStructure> {
start: Vec<AccelerationStructureUses>,
end: Vec<AccelerationStructureUses>,
metadata: ResourceMetadata<Arc<T>>,
}
Fields§
§start: Vec<AccelerationStructureUses>
§end: Vec<AccelerationStructureUses>
§metadata: ResourceMetadata<Arc<T>>
Implementations§
source§impl<T: AccelerationStructure> AccelerationStructureTracker<T>
impl<T: AccelerationStructure> AccelerationStructureTracker<T>
pub fn new() -> Self
fn tracker_assert_in_bounds(&self, index: usize)
sourcepub fn set_size(&mut self, size: usize)
pub fn set_size(&mut self, size: usize)
Sets the size of all the vectors inside the tracker.
Must be called with the highest possible Buffer ID before all unsafe functions are called.
sourcefn allow_index(&mut self, index: usize)
fn allow_index(&mut self, index: usize)
Extend the vectors to let the given index be valid.
sourcepub fn contains(&self, acceleration_structure: &T) -> bool
pub fn contains(&self, acceleration_structure: &T) -> bool
Returns true if the given buffer is tracked.
sourcepub fn set_single(&mut self, resource: Arc<T>)
pub fn set_single(&mut self, resource: Arc<T>)
Inserts a single resource into the resource tracker.
Auto Trait Implementations§
impl<T> Freeze for AccelerationStructureTracker<T>
impl<T> RefUnwindSafe for AccelerationStructureTracker<T>where
T: RefUnwindSafe,
impl<T> Send for AccelerationStructureTracker<T>
impl<T> Sync for AccelerationStructureTracker<T>
impl<T> Unpin for AccelerationStructureTracker<T>
impl<T> UnwindSafe for AccelerationStructureTracker<T>where
T: RefUnwindSafe,
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