mirror of
https://github.com/MobileGL-Dev/MobileGL
synced 2026-09-09 12:48:32 +09:00
[Fix] (DirectVulkan): age-based eviction for the content-addressed cache family - ProgramFactory entries (shader modules/layouts), PipelineFactory graphics pipelines, compute pipelines and per-layout descriptor-set tracking now retire after ~1024 idle frame boundaries (render-pass-manager sweep precedent), render-pass eviction purges pipelines hashed on the dying handle (closes a handle-recycling stale-pipeline hazard), and the program reflection cache is lifetime-id-keyed and cleared at EGL teardown - shader/program churn no longer grows Vulkan objects without bound
This commit is contained in:
@@ -1194,6 +1194,12 @@ namespace MobileGL::MG_Backend::DirectVulkan {
|
||||
if (m_rpFastValid && m_rpFastRenderPassHash == it->first) {
|
||||
m_rpFastValid = false;
|
||||
}
|
||||
// Notify while the handle is still alive: pipelines hashed on it share
|
||||
// the entry's >kRetireAgeFrames idleness (they are only bound by draws
|
||||
// that hit this entry), so the observer may destroy them immediately.
|
||||
if (m_evictionObserver != nullptr) {
|
||||
m_evictionObserver->OnRenderPassDestroyed(it->second.renderPass);
|
||||
}
|
||||
it = m_renderPasses.erase(it);
|
||||
} else {
|
||||
++it;
|
||||
|
||||
Reference in New Issue
Block a user