[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:
2026-07-27 22:05:25 -04:00
parent c540fb88ee
commit 34685b4bb0
13 changed files with 417 additions and 7 deletions
@@ -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;