pub struct GpuBreakdown {
pub scene_ms: f32,
pub shadow_ms: f32,
pub oit_ms: f32,
pub post_ms: f32,
pub cull_ms: f32,
}Expand description
Per-pass split of GPU frame time, measured with TIMESTAMP_QUERY.
Each field is the GPU duration of one render pass in milliseconds, captured
with timestamp queries around the pass. A field is 0.0 when that pass did
not run this frame (for example shadow_ms when shadows are off or
oit_ms when nothing transparent is drawn) or when the backend does not
support TIMESTAMP_QUERY (the same condition that leaves
FrameStats::gpu_frame_ms at None).
These passes are submitted in separate command buffers but resolved
together, so the values are comparable. Like gpu_frame_ms, they lag one
frame behind due to async readback. The passes measured here do not cover
every GPU pass (decals, scatter, bloom, depth of field, and the final
overlays are not split out), so the fields do not sum to the full frame GPU
time; treat the remainder as those un-instrumented passes plus present.
Fields§
§scene_ms: f32Main opaque HDR scene pass. This is the same span as
FrameStats::gpu_frame_ms.
shadow_ms: f32Directional shadow depth pass (all cascades rendered into the atlas).
oit_ms: f32Order-independent transparency accumulation pass.
post_ms: f32Tone-map and resolve pass that writes the final LDR image.
cull_ms: f32Main-camera GPU cull dispatch: the cull_instances + write_indirect_args
compute passes that produce the indirect draw args. 0.0 when GPU culling
is off or the scene has no instanced batches. Shadow-cascade culls are not
included here. Useful for checking whether the cull pass costs more than it
saves on a given scene.
Trait Implementations§
Source§impl Clone for GpuBreakdown
impl Clone for GpuBreakdown
Source§fn clone(&self) -> GpuBreakdown
fn clone(&self) -> GpuBreakdown
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for GpuBreakdown
Source§impl Debug for GpuBreakdown
impl Debug for GpuBreakdown
Source§impl Default for GpuBreakdown
impl Default for GpuBreakdown
Source§fn default() -> GpuBreakdown
fn default() -> GpuBreakdown
Auto Trait Implementations§
impl Freeze for GpuBreakdown
impl RefUnwindSafe for GpuBreakdown
impl Send for GpuBreakdown
impl Sync for GpuBreakdown
impl Unpin for GpuBreakdown
impl UnsafeUnpin for GpuBreakdown
impl UnwindSafe for GpuBreakdown
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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§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>, which can then be
downcast into Box<dyn ConcreteType> where ConcreteType implements Trait.Source§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>, which can then be further
downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§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.Source§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.Source§impl<T> DowncastSend for T
impl<T> DowncastSend for T
Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§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 moreSource§impl<T> Pointable for T
impl<T> Pointable for T
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.