diff options
Diffstat (limited to 'src/Ryujinx.Graphics.Gpu/Image/TextureManager.cs')
-rw-r--r-- | src/Ryujinx.Graphics.Gpu/Image/TextureManager.cs | 22 |
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; } } |