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.
Trait Implementations§
Source§impl Clone for MemoryBudgetThresholds
impl Clone for MemoryBudgetThresholds
Source§fn clone(&self) -> MemoryBudgetThresholds
fn clone(&self) -> MemoryBudgetThresholds
Returns a copy 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 moreSource§impl Debug for MemoryBudgetThresholds
impl Debug for MemoryBudgetThresholds
Source§impl Default for MemoryBudgetThresholds
impl Default for MemoryBudgetThresholds
Source§fn default() -> MemoryBudgetThresholds
fn default() -> MemoryBudgetThresholds
Returns the “default value” for a type. Read more
impl Copy 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