mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-04-20 03:25:16 +00:00
vk: Change texture cache memory management for disposed textures
- Use global resource manager instead of using the 2-frame hold behavior. - Fixes high VRAM usage in some games
This commit is contained in:
parent
6bd96a4590
commit
47bbfdd2aa
2 changed files with 6 additions and 2 deletions
|
@ -137,6 +137,11 @@ namespace vk
|
|||
get_current_eid_scope().m_disposed_images.emplace_back(std::move(img));
|
||||
}
|
||||
|
||||
void dispose(std::unique_ptr<vk::viewable_image>& img)
|
||||
{
|
||||
get_current_eid_scope().m_disposed_images.emplace_back(std::move(img));
|
||||
}
|
||||
|
||||
void dispose(std::unique_ptr<vk::event>& event)
|
||||
{
|
||||
get_current_eid_scope().m_disposed_events.emplace_back(std::move(event));
|
||||
|
|
|
@ -485,8 +485,7 @@ namespace vk
|
|||
{
|
||||
if (tex.is_managed())
|
||||
{
|
||||
m_temporary_memory_size += tex.get_section_size();
|
||||
m_temporary_storage.emplace_back(tex);
|
||||
vk::get_resource_manager()->dispose(tex.get_texture());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue