Struct wgpu_profiler::scope::ManualOwningScope [−][src]
pub struct ManualOwningScope<'a, W: ProfilerCommandRecorder> { /* fields omitted */ }
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
impl<'a, W: ProfilerCommandRecorder> ManualOwningScope<'a, W>
[src]
impl<'a, W: ProfilerCommandRecorder> ManualOwningScope<'a, W>
[src]#[must_use]pub fn start(
label: &str,
profiler: &'a mut GpuProfiler,
recorder: W,
device: &Device
) -> Self
[src]
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
#[must_use]pub fn scope(&mut self, label: &str, device: &Device) -> Scope<'_, W>
[src]
Starts a scope nested within this one
#[must_use]pub fn end_scope(self) -> (W, &'a mut GpuProfiler)
[src]
Ends the scope allowing the extraction of owned the ProfilerCommandRecorder and the mutable reference to the GpuProfiler.
impl<'a> ManualOwningScope<'a, CommandEncoder>
[src]
impl<'a> ManualOwningScope<'a, CommandEncoder>
[src]pub fn scoped_render_pass<'b>(
&'b mut self,
label: &str,
device: &Device,
pass_descriptor: &RenderPassDescriptor<'b, '_>
) -> OwningScope<'b, RenderPass<'b>>
[src]
&'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<'_>>
[src]
&mut self,
label: &str,
device: &Device,
pass_descriptor: &ComputePassDescriptor<'_>
) -> OwningScope<'_, ComputePass<'_>>
Start a compute pass wrapped in an OwningScope.
Trait Implementations
impl<'a, W: ProfilerCommandRecorder> Deref for ManualOwningScope<'a, W>
[src]
impl<'a, W: ProfilerCommandRecorder> Deref for ManualOwningScope<'a, W>
[src]impl<'a, W: ProfilerCommandRecorder> DerefMut for ManualOwningScope<'a, W>
[src]
impl<'a, W: ProfilerCommandRecorder> DerefMut for ManualOwningScope<'a, W>
[src]Auto Trait Implementations
impl<'a, W> !RefUnwindSafe for ManualOwningScope<'a, W>
impl<'a, W> !RefUnwindSafe for ManualOwningScope<'a, W>
impl<'a, W> !Send for ManualOwningScope<'a, W>
impl<'a, W> !Send for ManualOwningScope<'a, W>
impl<'a, W> !Sync for ManualOwningScope<'a, W>
impl<'a, W> !Sync for ManualOwningScope<'a, W>
impl<'a, W> Unpin for ManualOwningScope<'a, W> where
W: Unpin,
impl<'a, W> Unpin for ManualOwningScope<'a, W> where
W: Unpin,
impl<'a, W> !UnwindSafe for ManualOwningScope<'a, W>
impl<'a, W> !UnwindSafe for ManualOwningScope<'a, W>