Skipping flush is no longer needed
This commit is contained in:
parent
edfc13d771
commit
cc963ae5bb
10 changed files with 9 additions and 21 deletions
|
@ -349,7 +349,8 @@ namespace Ryujinx.Cpu.Jit
|
||||||
{
|
{
|
||||||
_baseMemory.Reprotect(Size, _hostPageSize, _lastPageProtection, false);
|
_baseMemory.Reprotect(Size, _hostPageSize, _lastPageProtection, false);
|
||||||
|
|
||||||
ptPtr = _baseMemory.GetPointer(Size, _hostPageSize);;
|
ptPtr = _baseMemory.GetPointer(Size, _hostPageSize);
|
||||||
|
;
|
||||||
}
|
}
|
||||||
|
|
||||||
updatePtCallback(EndAddress - GuestPageSize, ptPtr + (IntPtr)(_hostPageSize - GuestPageSize), GuestPageSize);
|
updatePtCallback(EndAddress - GuestPageSize, ptPtr + (IntPtr)(_hostPageSize - GuestPageSize), GuestPageSize);
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
using ARMeilleure.Memory;
|
using ARMeilleure.Memory;
|
||||||
using Ryujinx.Memory;
|
using Ryujinx.Memory;
|
||||||
using Ryujinx.Memory.Range;
|
using Ryujinx.Memory.Range;
|
||||||
using Ryujinx.Memory.Tracking;
|
using Ryujinx.Memory.Tracking;
|
||||||
|
|
|
@ -1622,14 +1622,6 @@ namespace Ryujinx.Graphics.Gpu.Image
|
||||||
/// <param name="size">The size of the flushing memory access</param>
|
/// <param name="size">The size of the flushing memory access</param>
|
||||||
public void FlushAction(TextureGroupHandle handle, ulong address, ulong size)
|
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.
|
// 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,
|
// 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.
|
// so there shouldn't be any issue as it's the same handler for all actions.
|
||||||
|
|
|
@ -23,11 +23,6 @@ namespace Ryujinx.Graphics.Gpu.Memory
|
||||||
private readonly IVirtualMemoryManagerTracked _cpuMemory;
|
private readonly IVirtualMemoryManagerTracked _cpuMemory;
|
||||||
private int _referenceCount;
|
private int _referenceCount;
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Indicates whenever the memory manager supports 4KB pages.
|
|
||||||
/// </summary>
|
|
||||||
public bool Supports4KBPages => _cpuMemory.Supports4KBPages;
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// In-memory shader cache.
|
/// In-memory shader cache.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
using Ryujinx.Common.Configuration;
|
using Ryujinx.Common.Configuration;
|
||||||
using Ryujinx.Common.Logging;
|
using Ryujinx.Common.Logging;
|
||||||
using Ryujinx.Cpu;
|
using Ryujinx.Cpu;
|
||||||
using Ryujinx.Cpu.AppleHv;
|
using Ryujinx.Cpu.AppleHv;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
using Ryujinx.Common.Pools;
|
using Ryujinx.Common.Pools;
|
||||||
using Ryujinx.Memory.Range;
|
using Ryujinx.Memory.Range;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue