mirror of
https://git.743378673.xyz/MeloNX/MeloNX.git
synced 2025-06-29 20:06:25 +02:00
Do not set modified flag again if texture was not modified (#5909)
* Do not set modified flag again if texture was not modified * Formatting * Fix copy dep regression
This commit is contained in:
parent
51065d9129
commit
e6e5838916
3 changed files with 29 additions and 19 deletions
|
@ -413,21 +413,35 @@ namespace Ryujinx.Graphics.Gpu.Image
|
|||
{
|
||||
bool anyChanged = false;
|
||||
|
||||
if (_rtHostDs != _rtDepthStencil?.HostTexture)
|
||||
{
|
||||
_rtHostDs = _rtDepthStencil?.HostTexture;
|
||||
Texture dsTexture = _rtDepthStencil;
|
||||
ITexture hostDsTexture = null;
|
||||
|
||||
if (dsTexture != null)
|
||||
{
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue