From 6db16b411031b17ac171dac3899ce0488a1b40df Mon Sep 17 00:00:00 2001 From: riperiperi Date: Thu, 6 Feb 2020 21:49:26 +0000 Subject: Only enumerate cached textures that are modified when flushing. (#918) * Only enumarate cached textures that are modified when flushing, rather than all of them. * Remove locking. * Add missing clear. * Remove texture from modified list when data is disposed. In case the game does not call either flush method at any point. * Add ReferenceEqualityComparer from jD for the HashSet --- Ryujinx.Graphics.Gpu/Engine/MethodCopyTexture.cs | 2 +- Ryujinx.Graphics.Gpu/Engine/Methods.cs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'Ryujinx.Graphics.Gpu/Engine') diff --git a/Ryujinx.Graphics.Gpu/Engine/MethodCopyTexture.cs b/Ryujinx.Graphics.Gpu/Engine/MethodCopyTexture.cs index 8d1b2b71..4900db1b 100644 --- a/Ryujinx.Graphics.Gpu/Engine/MethodCopyTexture.cs +++ b/Ryujinx.Graphics.Gpu/Engine/MethodCopyTexture.cs @@ -94,7 +94,7 @@ namespace Ryujinx.Graphics.Gpu.Engine srcTexture.HostTexture.CopyTo(dstTexture.HostTexture, srcRegion, dstRegion, linearFilter); } - dstTexture.Modified = true; + dstTexture.SignalModified(); } } } \ No newline at end of file diff --git a/Ryujinx.Graphics.Gpu/Engine/Methods.cs b/Ryujinx.Graphics.Gpu/Engine/Methods.cs index d9e7582b..a2c9876e 100644 --- a/Ryujinx.Graphics.Gpu/Engine/Methods.cs +++ b/Ryujinx.Graphics.Gpu/Engine/Methods.cs @@ -286,7 +286,7 @@ namespace Ryujinx.Graphics.Gpu.Engine if (color != null) { - color.Modified = true; + color.SignalModified(); } } @@ -306,7 +306,7 @@ namespace Ryujinx.Graphics.Gpu.Engine if (depthStencil != null) { - depthStencil.Modified = true; + depthStencil.SignalModified(); } } -- cgit v1.2.3