Skipping flush is no longer needed

This commit is contained in:
Gabriel A 2024-02-23 18:42:33 -03:00
parent edfc13d771
commit cc963ae5bb
10 changed files with 9 additions and 21 deletions

View file

@ -349,7 +349,8 @@ namespace Ryujinx.Cpu.Jit
{
_baseMemory.Reprotect(Size, _hostPageSize, _lastPageProtection, false);
ptPtr = _baseMemory.GetPointer(Size, _hostPageSize);;
ptPtr = _baseMemory.GetPointer(Size, _hostPageSize);
;
}
updatePtCallback(EndAddress - GuestPageSize, ptPtr + (IntPtr)(_hostPageSize - GuestPageSize), GuestPageSize);

View file

@ -198,4 +198,4 @@ namespace Ryujinx.Cpu.Jit
return new Block(_tracking, _readPtCallback, memory, size, _lock);
}
}
}
}

View file

@ -98,4 +98,4 @@ namespace Ryujinx.Cpu.Jit
}
}
}
}
}

View file

@ -385,4 +385,4 @@ namespace Ryujinx.Cpu.Jit
GC.SuppressFinalize(this);
}
}
}
}

View file

@ -1,4 +1,4 @@
using ARMeilleure.Memory;
using ARMeilleure.Memory;
using Ryujinx.Memory;
using Ryujinx.Memory.Range;
using Ryujinx.Memory.Tracking;

View file

@ -220,4 +220,4 @@ namespace Ryujinx.Cpu.Jit
GC.SuppressFinalize(this);
}
}
}
}

View file

@ -1622,14 +1622,6 @@ namespace Ryujinx.Graphics.Gpu.Image
/// <param name="size">The size of the flushing memory access</param>
public void FlushAction(TextureGroupHandle handle, ulong address, ulong size)
{
// If the page size is larger than 4KB, we will have a lot of false positives for flushing.
// Let's avoid flushing textures that are unlikely to be read from CPU to improve performance
// on those platforms.
if (!_physicalMemory.Supports4KBPages && !Storage.Info.IsLinear && !_context.IsGpuThread())
{
return;
}
// There is a small gap here where the action is removed but _actionRegistered is still 1.
// In this case it will skip registering the action, but here we are already handling it,
// so there shouldn't be any issue as it's the same handler for all actions.

View file

@ -23,11 +23,6 @@ namespace Ryujinx.Graphics.Gpu.Memory
private readonly IVirtualMemoryManagerTracked _cpuMemory;
private int _referenceCount;
/// <summary>
/// Indicates whenever the memory manager supports 4KB pages.
/// </summary>
public bool Supports4KBPages => _cpuMemory.Supports4KBPages;
/// <summary>
/// In-memory shader cache.
/// </summary>

View file

@ -1,4 +1,4 @@
using Ryujinx.Common.Configuration;
using Ryujinx.Common.Configuration;
using Ryujinx.Common.Logging;
using Ryujinx.Cpu;
using Ryujinx.Cpu.AppleHv;

View file

@ -1,4 +1,4 @@
using Ryujinx.Common.Pools;
using Ryujinx.Common.Pools;
using Ryujinx.Memory.Range;
using System.Collections.Generic;