Struct re_renderer::context::ActiveFrameContext
source · pub struct ActiveFrameContext {
pub before_view_builder_encoder: Mutex<FrameGlobalCommandEncoder>,
pub frame_index: u64,
top_level_error_scope: Option<WgpuErrorScope>,
}
Fields§
§before_view_builder_encoder: Mutex<FrameGlobalCommandEncoder>
Command encoder for all commands that should go in before view builder are submitted.
This should be used for any gpu copy operation outside of a renderer or view builder.
(i.e. typically in crate::renderer::DrawData
creation!)
frame_index: u64
Index of this frame. Is incremented for every render frame.
Keep in mind that all operations on WebGPU are asynchronous:
This counter is part of the content timeline
and may be arbitrarily
behind both of the device timeline
and queue timeline
.
See https://www.w3.org/TR/webgpu/#programming-model-timelines
top_level_error_scope: Option<WgpuErrorScope>
Top level device error scope, created at startup and closed & reopened on every frame.
According to documentation, not all errors may be caught by [wgpu::Device::on_uncaptured_error
].
https://www.w3.org/TR/webgpu/#eventdef-gpudevice-uncapturederror
Therefore, we should make sure that we always have an error scope open!
Additionally, we use this to update RenderContext::frame_index_for_uncaptured_errors
.
The only time this is allowed to be None
is during shutdown and when closing an old and opening a new scope.
Auto Trait Implementations§
impl !Freeze for ActiveFrameContext
impl !RefUnwindSafe for ActiveFrameContext
impl Send for ActiveFrameContext
impl Sync for ActiveFrameContext
impl Unpin for ActiveFrameContext
impl !UnwindSafe for ActiveFrameContext
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
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s.§impl<T> DowncastSync for T
impl<T> DowncastSync for T
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more