aboutsummaryrefslogtreecommitdiff
path: root/src/Ryujinx.Graphics.Gpu/Image/TextureManager.cs
diff options
context:
space:
mode:
authorgdkchan <gab.dark.100@gmail.com>2023-11-13 18:07:05 -0300
committerGitHub <noreply@github.com>2023-11-13 18:07:05 -0300
commite6e58389164fe7cb6894dfd6e8ac1cc7d9ec7d11 (patch)
treed94d20a46102d83afff1ba1a0114aab76f8c5462 /src/Ryujinx.Graphics.Gpu/Image/TextureManager.cs
parent51065d91290e41a9d2518f44c9bdf83a9b0017ab (diff)
Do not set modified flag again if texture was not modified (#5909)1.1.1080
* Do not set modified flag again if texture was not modified * Formatting * Fix copy dep regression
Diffstat (limited to 'src/Ryujinx.Graphics.Gpu/Image/TextureManager.cs')
-rw-r--r--src/Ryujinx.Graphics.Gpu/Image/TextureManager.cs22
1 files changed, 18 insertions, 4 deletions
diff --git a/src/Ryujinx.Graphics.Gpu/Image/TextureManager.cs b/src/Ryujinx.Graphics.Gpu/Image/TextureManager.cs
index ed181640..e9f58314 100644
--- a/src/Ryujinx.Graphics.Gpu/Image/TextureManager.cs
+++ b/src/Ryujinx.Graphics.Gpu/Image/TextureManager.cs
@@ -413,21 +413,35 @@ namespace Ryujinx.Graphics.Gpu.Image
{
bool anyChanged = false;
- if (_rtHostDs != _rtDepthStencil?.HostTexture)
+ Texture dsTexture = _rtDepthStencil;
+ ITexture hostDsTexture = null;
+
+ if (dsTexture != null)
{
- _rtHostDs = _rtDepthStencil?.HostTexture;
+ hostDsTexture = dsTexture.HostTexture;
+ dsTexture.ModifiedSinceLastFlush = true;
+ }
+ if (_rtHostDs != hostDsTexture)
+ {
+ _rtHostDs = hostDsTexture;
anyChanged = true;
}
for (int index = 0; index < _rtColors.Length; index++)
{
- ITexture hostTexture = _rtColors[index]?.HostTexture;
+ Texture texture = _rtColors[index];
+ ITexture hostTexture = null;
+
+ if (texture != null)
+ {
+ hostTexture = texture.HostTexture;
+ texture.ModifiedSinceLastFlush = true;
+ }
if (_rtHostColors[index] != hostTexture)
{
_rtHostColors[index] = hostTexture;
-
anyChanged = true;
}
}