Struct wgpu_profiler::scope::ManualOwningScope [−][src]
pub struct ManualOwningScope<'a, W: ProfilerCommandRecorder> { /* fields omitted */ }Expand description
Scope that takes ownership of the encoder/pass.
Does NOT call end_scope on drop.
This construct is just for completeness in cases where working with scopes is preferred but one can’t rely on the Drop call in the right place.
This is useful when the owned value needs to be recovered after the end of the scope.
In particular, to submit a CommandEncoder to a queue ownership of the encoder is necessary.
Implementations
pub fn start(
label: &str,
profiler: &'a mut GpuProfiler,
recorder: W,
device: &Device
) -> Self
pub fn start(
label: &str,
profiler: &'a mut GpuProfiler,
recorder: W,
device: &Device
) -> Self
Starts a new profiler scope. Scope is NOT closed on drop and needs to be closed manually with ManualOwningScope::end_scope
Starts a scope nested within this one
Ends the scope allowing the extraction of owned the ProfilerCommandRecorder and the mutable reference to the GpuProfiler.
pub fn scoped_render_pass<'b>(
&'b mut self,
label: &str,
device: &Device,
pass_descriptor: &RenderPassDescriptor<'b, '_>
) -> OwningScope<'b, RenderPass<'b>>
pub fn scoped_render_pass<'b>(
&'b mut self,
label: &str,
device: &Device,
pass_descriptor: &RenderPassDescriptor<'b, '_>
) -> OwningScope<'b, RenderPass<'b>>
Start a render pass wrapped in an OwningScope.
pub fn scoped_compute_pass(
&mut self,
label: &str,
device: &Device,
pass_descriptor: &ComputePassDescriptor<'_>
) -> OwningScope<'_, ComputePass<'_>>
pub fn scoped_compute_pass(
&mut self,
label: &str,
device: &Device,
pass_descriptor: &ComputePassDescriptor<'_>
) -> OwningScope<'_, ComputePass<'_>>
Start a compute pass wrapped in an OwningScope.