pub struct GpuStageProfiler { /* private fields */ }Expand description
Bounded profiler shared by GPU image chains and point-cloud frames.
Requires a runtime created with timestamp queries enabled. Recording adds
pass-boundary queries only; native collect explicitly synchronizes and
reads them back. Timings exclude uploads, copies, CPU setup, readbacks and
gaps between passes, and must not be interpreted as total frame latency.
Timestamp precision is backend-dependent and samples may be zero.
Implementations§
Source§impl GpuStageProfiler
impl GpuStageProfiler
Sourcepub fn new(runtime: &WgpuRuntime, max_stages: u32) -> SpatialResult<Self>
pub fn new(runtime: &WgpuRuntime, max_stages: u32) -> SpatialResult<Self>
Allocates at most max_stages compute-pass samples (1..=2048).
Sourcepub fn collect(self, runtime: &WgpuRuntime) -> SpatialResult<GpuTimingReport>
pub fn collect(self, runtime: &WgpuRuntime) -> SpatialResult<GpuTimingReport>
Consumes the recording and explicitly reads back timestamps on native hosts.
Call only after the profiled operations have returned successfully. The profiler can accumulate several operations on its original runtime.
Auto Trait Implementations§
impl !RefUnwindSafe for GpuStageProfiler
impl !UnwindSafe for GpuStageProfiler
impl Freeze for GpuStageProfiler
impl Send for GpuStageProfiler
impl Sync for GpuStageProfiler
impl Unpin for GpuStageProfiler
impl UnsafeUnpin for GpuStageProfiler
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