mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-07-21 17:09:19 +02:00
Add EU7 PACK v11 UTEX, section unload, and LRU streaming caches
Bake deduplicated section texture lists (UTEX) and read them at runtime so texture warm/prefetch no longer scans every instance. Evict PACK sections outside a 16 km keep ring and cap mesh/nodedata/texture warm caches to stop RAM and apply cost from growing without bound during long fast camera flight. - Bake v11 (format=4): UMES + UTEX + CHNK; mesh/texture ordering by frequency - Runtime: incremental UTEX warm, adaptive apply slices, preempt/catchup tuning - Unload: track instances per section, Region erase, pack pool release - LRU: mesh/nodedata (2000, ref-counted), warmed textures (2048) - Bench/diagnostics: unload and cache eviction counters - Fix pack instance erase in Region; resolve duplicate helper symbols
This commit is contained in:
@@ -442,6 +442,23 @@ particle_manager::insert( std::string const &Sourcetemplate, TAnimModel const *N
|
||||
return true;
|
||||
}
|
||||
|
||||
void
|
||||
particle_manager::erase_bound_node( TAnimModel const *const node ) {
|
||||
if( node == nullptr ) {
|
||||
return;
|
||||
}
|
||||
|
||||
m_sources.erase(
|
||||
std::remove_if(
|
||||
std::begin( m_sources ),
|
||||
std::end( m_sources ),
|
||||
[node]( smoke_source const &source ) {
|
||||
return source.m_ownertype == smoke_source::owner_type::node
|
||||
&& source.m_owner.node == node;
|
||||
} ),
|
||||
std::end( m_sources ) );
|
||||
}
|
||||
|
||||
// updates state of all owned emitters
|
||||
void
|
||||
particle_manager::update() {
|
||||
|
||||
@@ -181,6 +181,8 @@ public:
|
||||
insert( std::string const &Sourcetemplate, TDynamicObject const *Vehicle, glm::dvec3 const Location );
|
||||
bool
|
||||
insert( std::string const &Sourcetemplate, TAnimModel const *Node, glm::dvec3 const Location );
|
||||
void
|
||||
erase_bound_node( TAnimModel const *Node );
|
||||
// updates state of all owned emitters
|
||||
void
|
||||
update();
|
||||
|
||||
Reference in New Issue
Block a user