Unravel Engine C++ Reference
Loading...
Searching...
No Matches
eviction_settings.h
Go to the documentation of this file.
1#pragma once
2#include <engine/engine_export.h>
3
4namespace unravel
5{
6
11{
13 bool enabled = true;
16 bool auto_budget = true;
18 float budget_fraction = 0.85f;
20 float target_fraction = 0.75f;
22 int manual_budget_mb = 1024;
24 int strategy = 0;
28 int max_evictions = 64;
29
30 friend auto operator==(const eviction_settings& lhs, const eviction_settings& rhs) -> bool = default;
31};
32
38ENGINE_EXPORT void update_eviction(const eviction_settings& settings);
39
40} // namespace unravel
void update_eviction(const eviction_settings &settings)
float target_fraction
Evict down to this fraction of the reported maximum (hysteresis; should be < budget).
int manual_budget_mb
Manual budget (MiB) compared against the evictable resident bytes when not using auto budget.
int min_age_frames
Resources used within this many frames are protected from eviction.
float budget_fraction
Start evicting once GPU usage exceeds this fraction of the reported maximum.
int strategy
Selected gfx::eviction::strategy (index).
int max_evictions
Maximum resources evicted per frame (0 = unlimited).
friend auto operator==(const eviction_settings &lhs, const eviction_settings &rhs) -> bool=default
bool enabled
Master toggle: when true the per-frame driver evicts to keep usage under the budget.