Work around issue apparently caused by 5909 (#5926)

This commit is contained in:
gdkchan 2023-11-14 22:24:54 -03:00 committed by GitHub
parent 6bce46621c
commit 1329c47ea4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 14 additions and 9 deletions

View file

@ -1443,11 +1443,7 @@ namespace Ryujinx.Graphics.Gpu.Image
if (_modifiedStale || Group.HasCopyDependencies || Group.HasFlushBuffer) if (_modifiedStale || Group.HasCopyDependencies || Group.HasFlushBuffer)
{ {
_modifiedStale = false; _modifiedStale = false;
Group.SignalModifying(this, bound, bound || ModifiedSinceLastFlush || Group.HasCopyDependencies || Group.HasFlushBuffer);
if (bound || ModifiedSinceLastFlush || Group.HasCopyDependencies || Group.HasFlushBuffer)
{
Group.SignalModifying(this, bound);
}
} }
_physicalMemory.TextureCache.Lift(this); _physicalMemory.TextureCache.Lift(this);

View file

@ -709,7 +709,8 @@ namespace Ryujinx.Graphics.Gpu.Image
/// </summary> /// </summary>
/// <param name="texture">The texture that has been modified</param> /// <param name="texture">The texture that has been modified</param>
/// <param name="bound">True if this texture is being bound, false if unbound</param> /// <param name="bound">True if this texture is being bound, false if unbound</param>
public void SignalModifying(Texture texture, bool bound) /// <param name="setModified">Indicates if the modified flag should be set</param>
public void SignalModifying(Texture texture, bool bound, bool setModified)
{ {
ModifiedSequence = _context.GetModifiedSequence(); ModifiedSequence = _context.GetModifiedSequence();
@ -721,7 +722,7 @@ namespace Ryujinx.Graphics.Gpu.Image
{ {
TextureGroupHandle group = _handles[baseHandle + i]; TextureGroupHandle group = _handles[baseHandle + i];
group.SignalModifying(bound, _context); group.SignalModifying(bound, _context, setModified);
} }
}); });
} }

View file

@ -304,9 +304,17 @@ namespace Ryujinx.Graphics.Gpu.Image
/// </summary> /// </summary>
/// <param name="bound">True if this handle is being bound, false if unbound</param> /// <param name="bound">True if this handle is being bound, false if unbound</param>
/// <param name="context">The GPU context to register a sync action on</param> /// <param name="context">The GPU context to register a sync action on</param>
public void SignalModifying(bool bound, GpuContext context) /// <param name="setModified">Indicates if the modified flag should be set</param>
public void SignalModifying(bool bound, GpuContext context, bool setModified)
{ {
SignalModified(context); if (setModified)
{
SignalModified(context);
}
else
{
RegisterSync(context);
}
if (!bound && _syncActionRegistered && NextSyncCopies()) if (!bound && _syncActionRegistered && NextSyncCopies())
{ {