mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-13 02:08:49 +12: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
1 changed files with 4 additions and 8 deletions
|
@ -69,13 +69,7 @@ namespace vk
|
||||||
{
|
{
|
||||||
// Even if we are managing the same vram section, we cannot guarantee contents are static
|
// 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
|
// The create method is only invoked when a new managed session is required
|
||||||
if (!flushed)
|
release_dma_resources();
|
||||||
{
|
|
||||||
// Reset fence
|
|
||||||
verify(HERE), m_device, dma_fence;
|
|
||||||
vk::get_resource_manager()->dispose(dma_fence);
|
|
||||||
}
|
|
||||||
|
|
||||||
synchronized = false;
|
synchronized = false;
|
||||||
flushed = false;
|
flushed = false;
|
||||||
sync_timestamp = 0ull;
|
sync_timestamp = 0ull;
|
||||||
|
@ -176,7 +170,9 @@ namespace vk
|
||||||
|
|
||||||
if (dma_fence)
|
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);
|
vk::get_resource_manager()->dispose(dma_fence);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue