[Fix] (MG_Backend/DirectVulkan): fix 26.2 texture bug.

- Fix texture object / buffer lifecycle issues
This commit is contained in:
2026-05-10 10:03:03 +08:00
parent d7e768096e
commit 4a36d63c1b
6 changed files with 72 additions and 19 deletions
@@ -142,11 +142,12 @@ namespace MobileGL::MG_Backend::DirectVulkan {
}
SizeT count = 0;
for (const auto& [raw, weak]: m_aliveObjects) {
if (weak.expired()) {
count++;
m_pendingClears.erase(raw);
m_aliveObjects.erase(raw);
for (auto it = m_aliveObjects.begin(); it != m_aliveObjects.end();) {
auto current = it++;
if (current->second.expired()) {
m_pendingClears.erase(current->first);
m_aliveObjects.erase(current);
++count;
}
}
return count;