Struct MemoryBudgetThresholds
pub struct MemoryBudgetThresholds {
pub for_resource_creation: Option<u8>,
pub for_device_loss: Option<u8>,
}Expand description
Memory budget thresholds used by backends to try to avoid high memory pressure situations.
Currently only the D3D12 and (optionally) Vulkan backends support these options.
Fields§
§for_resource_creation: Option<u8>Threshold at which texture, buffer, query set and acceleration structure creation will start to return OOM errors. This is a percent of the memory budget reported by native APIs.
If not specified, resource creation might still return OOM errors.
for_device_loss: Option<u8>Threshold at which devices will become lost due to memory pressure. This is a percent of the memory budget reported by native APIs.
If not specified, devices might still become lost due to memory pressure.
Implementations§
§impl MemoryBudgetThresholds
impl MemoryBudgetThresholds
pub const fn default() -> MemoryBudgetThresholds
pub const fn default() -> MemoryBudgetThresholds
This function is identical to Default::default() except that it is a const fn.
Trait Implementations§
§impl Clone for MemoryBudgetThresholds
impl Clone for MemoryBudgetThresholds
§fn clone(&self) -> MemoryBudgetThresholds
fn clone(&self) -> MemoryBudgetThresholds
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read more§impl Debug for MemoryBudgetThresholds
impl Debug for MemoryBudgetThresholds
§impl Default for MemoryBudgetThresholds
impl Default for MemoryBudgetThresholds
§fn default() -> MemoryBudgetThresholds
fn default() -> MemoryBudgetThresholds
Returns the “default value” for a type. Read more
§impl PartialEq for MemoryBudgetThresholds
impl PartialEq for MemoryBudgetThresholds
impl Copy for MemoryBudgetThresholds
impl Eq for MemoryBudgetThresholds
impl StructuralPartialEq for MemoryBudgetThresholds
Auto Trait Implementations§
impl Freeze for MemoryBudgetThresholds
impl RefUnwindSafe for MemoryBudgetThresholds
impl Send for MemoryBudgetThresholds
impl Sync for MemoryBudgetThresholds
impl Unpin for MemoryBudgetThresholds
impl UnwindSafe for MemoryBudgetThresholds
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
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>
Converts
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>
Converts
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