diff --git a/Ryujinx.Graphics.Gpu/Image/TextureManager.cs b/Ryujinx.Graphics.Gpu/Image/TextureManager.cs
index 7c953f46ac..0095ccc7bb 100644
--- a/Ryujinx.Graphics.Gpu/Image/TextureManager.cs
+++ b/Ryujinx.Graphics.Gpu/Image/TextureManager.cs
@@ -600,10 +600,7 @@ namespace Ryujinx.Graphics.Gpu.Image
/// The texture that was modified.
private void CacheTextureModified(Texture texture)
{
- lock (_modified)
- {
- _modified.Add(texture);
- }
+ _modified.Add(texture);
}
///
@@ -740,16 +737,12 @@ namespace Ryujinx.Graphics.Gpu.Image
///
public void Flush()
{
- lock (_modified)
+ foreach (Texture texture in _modified)
{
- foreach (Texture texture in _modified)
+ if (texture.Info.IsLinear)
{
- if (texture.Info.IsLinear)
- {
- texture.Flush();
- }
+ texture.Flush();
}
- _modified.Clear();
}
}
@@ -760,17 +753,14 @@ namespace Ryujinx.Graphics.Gpu.Image
/// The range size
public void Flush(ulong address, ulong size)
{
- lock (_modified)
+ foreach (Texture texture in _modified)
{
- foreach (Texture texture in _modified)
+ if (texture.OverlapsWith(address, size))
{
- if (texture.OverlapsWith(address, size))
- {
- texture.Flush();
- }
+ texture.Flush();
}
- _modified.Clear();
}
+ _modified.Clear();
}
///