mirror of
https://github.com/RPCS3/rpcs3.git
synced 2024-11-17 08:11:51 +00:00
vk: Fix dma resource leak
- Fix broken check; a relic of the past where flush method would reset the fence
This commit is contained in:
parent
9af52d12a8
commit
76bbbe27f1
@ -69,13 +69,7 @@ namespace vk
|
||||
{
|
||||
// Even if we are managing the same vram section, we cannot guarantee contents are static
|
||||
// The create method is only invoked when a new managed session is required
|
||||
if (!flushed)
|
||||
{
|
||||
// Reset fence
|
||||
verify(HERE), m_device, dma_fence;
|
||||
vk::get_resource_manager()->dispose(dma_fence);
|
||||
}
|
||||
|
||||
release_dma_resources();
|
||||
synchronized = false;
|
||||
flushed = false;
|
||||
sync_timestamp = 0ull;
|
||||
@ -176,7 +170,9 @@ namespace vk
|
||||
|
||||
if (dma_fence)
|
||||
{
|
||||
verify(HERE), synchronized;
|
||||
// NOTE: This can be reached if previously synchronized, or a special path happens.
|
||||
// If a hard flush occurred while this surface was flush_always the cache would have reset its protection afterwards.
|
||||
// DMA resource would still be present but already used to flush previously.
|
||||
vk::get_resource_manager()->dispose(dma_fence);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user