Remove textures from cache on unmap if not mapped and modified (#4211)
This commit is contained in:
parent
2355c2af62
commit
94a64f2aea
4 changed files with 72 additions and 0 deletions
|
@ -1676,6 +1676,13 @@ namespace Ryujinx.Graphics.Gpu.Image
|
|||
}
|
||||
|
||||
RemoveFromPools(true);
|
||||
|
||||
// We only want to remove if there's no mapped region of the texture that was modified by the GPU,
|
||||
// otherwise we could lose data.
|
||||
if (!Group.AnyModified(this))
|
||||
{
|
||||
_physicalMemory.TextureCache.QueueAutoDeleteCacheRemoval(this);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue