pub struct FrameBudget { /* private fields */ }Expand description
Explicit upper bounds for one heterogeneous presentation frame.
The default is deliberately finite. Production hosts should select limits from their frame-time and memory budgets instead of treating it as a device capability query.
Implementations§
Source§impl FrameBudget
impl FrameBudget
Sourcepub const fn new(
max_passes: usize,
max_commands: usize,
max_vertices: usize,
max_upload_bytes: usize,
max_texture_bytes: usize,
max_draw_calls: usize,
) -> Self
pub const fn new( max_passes: usize, max_commands: usize, max_vertices: usize, max_upload_bytes: usize, max_texture_bytes: usize, max_draw_calls: usize, ) -> Self
Creates an exact set of frame-work limits.
Sourcepub const fn max_passes(self) -> usize
pub const fn max_passes(self) -> usize
Returns the maximum number of ordered sources.
Sourcepub const fn max_commands(self) -> usize
pub const fn max_commands(self) -> usize
Returns the maximum referenced scene-command count.
Sourcepub const fn max_vertices(self) -> usize
pub const fn max_vertices(self) -> usize
Returns the maximum referenced or generated vertex count.
Sourcepub const fn max_upload_bytes(self) -> usize
pub const fn max_upload_bytes(self) -> usize
Returns the maximum bytes uploaded while presenting the frame.
Sourcepub const fn max_texture_bytes(self) -> usize
pub const fn max_texture_bytes(self) -> usize
Returns the maximum referenced nominal texel-storage bytes.
Sourcepub const fn max_draw_calls(self) -> usize
pub const fn max_draw_calls(self) -> usize
Returns the maximum conservative draw-call count.
Trait Implementations§
Source§impl Clone for FrameBudget
impl Clone for FrameBudget
Source§fn clone(&self) -> FrameBudget
fn clone(&self) -> FrameBudget
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for FrameBudget
Source§impl Debug for FrameBudget
impl Debug for FrameBudget
Source§impl Default for FrameBudget
impl Default for FrameBudget
impl Eq for FrameBudget
Source§impl PartialEq for FrameBudget
impl PartialEq for FrameBudget
impl StructuralPartialEq for FrameBudget
Auto Trait Implementations§
impl Freeze for FrameBudget
impl RefUnwindSafe for FrameBudget
impl Send for FrameBudget
impl Sync for FrameBudget
impl Unpin for FrameBudget
impl UnsafeUnpin for FrameBudget
impl UnwindSafe for FrameBudget
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
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.