mirror of
https://github.com/RPCS3/rpcs3.git
synced 2026-06-06 15:15:00 -06:00
vk: Don't erase texture cache images directly. Use gc instead.
This commit is contained in:
parent
4e6231a321
commit
142d25c0d7
@ -1259,11 +1259,21 @@ namespace vk
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Nuke temporary resources. They will still be visible to the GPU.
|
// Nuke temporary resources. They will still be visible to the GPU.
|
||||||
|
auto gc = vk::get_resource_manager();
|
||||||
any_released |= !m_cached_images.empty();
|
any_released |= !m_cached_images.empty();
|
||||||
|
for (auto& img : m_cached_images)
|
||||||
|
{
|
||||||
|
gc->dispose(img.data);
|
||||||
|
}
|
||||||
m_cached_images.clear();
|
m_cached_images.clear();
|
||||||
m_cached_memory_size = 0;
|
m_cached_memory_size = 0;
|
||||||
|
|
||||||
any_released |= !m_temporary_subresource_cache.empty();
|
any_released |= !m_temporary_subresource_cache.empty();
|
||||||
|
for (auto& e : m_temporary_subresource_cache)
|
||||||
|
{
|
||||||
|
ensure(e.second.second);
|
||||||
|
release_temporary_subresource(e.second.second);
|
||||||
|
}
|
||||||
m_temporary_subresource_cache.clear();
|
m_temporary_subresource_cache.clear();
|
||||||
|
|
||||||
return any_released;
|
return any_released;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user