Unravel Engine C++ Reference
Loading...
Searching...
No Matches
eviction.cpp File Reference
#include "eviction.h"
#include "graphics.h"
#include <algorithm>
#include <atomic>
#include <chrono>
#include <cmath>
#include <mutex>
#include <type_traits>
#include <vector>

Go to the source code of this file.

Classes

class  gfx::eviction_registry
 

Namespaces

namespace  gfx
 
namespace  gfx::detail
 
namespace  gfx::eviction
 

Functions

auto gfx::eviction::init (const config &cfg) -> init_status
 
auto gfx::eviction::is_supported () -> bool
 
void gfx::eviction::shutdown ()
 
auto gfx::eviction::evict (const config &cfg) -> stats
 
auto gfx::eviction::evict () -> stats
 Run a single eviction pass using the config supplied to init.
 
auto gfx::eviction::evict_bytes (std::uint64_t free_bytes, strategy strat, std::uint32_t min_age_frames, std::uint32_t max_evictions) -> stats
 
auto gfx::eviction::evict_all () -> stats
 
auto gfx::eviction::would_allocation_fit (std::uint64_t bytes) -> bool
 
auto gfx::eviction::reclaim_for (std::uint64_t bytes, reclaim_kind kind) -> reclaim_result
 
auto gfx::eviction::peek_queued_bytes () -> std::uint64_t
 
auto gfx::eviction::peek_pending_release_bytes () -> std::uint64_t
 
auto gfx::eviction::peek_external_queued_bytes () -> std::uint64_t
 
void gfx::eviction::note_pending_allocation (std::uint64_t bytes)
 
void gfx::eviction::clear_queued_allocations ()
 
auto gfx::eviction::debug_consume_memory (std::uint64_t bytes) -> std::uint64_t
 
auto gfx::eviction::debug_simulate_budget (std::uint64_t target_free_bytes) -> std::uint64_t
 
void gfx::eviction::debug_release_memory ()
 
auto gfx::eviction::debug_consumed_bytes () -> std::uint64_t
 Total bytes currently reserved by debug_consume_memory.
 
auto gfx::eviction::restore_all () -> stats
 
void gfx::eviction::set_budget (const budget_state &budget, std::uint64_t used_bytes)
 
auto gfx::eviction::current_budget () -> budget_state
 
auto gfx::eviction::get_stats () -> stats
 Snapshot the current statistics.
 
void gfx::eviction::set_frame (std::uint64_t frame)
 Set the global frame counter (call once per presented frame).
 
void gfx::eviction::advance_frame ()
 Advance the global frame counter by one.
 
void gfx::eviction::register_resource (ievictable *resource)
 Begin tracking a resource (assumed resident). Called from handle_impl::make_evictable.
 
void gfx::eviction::register_evicted_resource (ievictable *resource)
 
void gfx::eviction::unregister_resource (ievictable *resource)
 Stop tracking a resource. Called from handle_impl's destructor.
 
void gfx::eviction::restore_resource (ievictable *resource)
 

Variable Documentation

◆ bytes

std::uint64_t bytes = 0

Definition at line 823 of file eviction.cpp.

◆ chunks

std::vector<gfx::texture_handle> chunks

Definition at line 822 of file eviction.cpp.