forked from MeloNX/MeloNX
16k external flush workaround
This commit is contained in:
parent
6334c3f90c
commit
7ac6b8e742
@ -561,6 +561,18 @@ namespace Ryujinx.Graphics.Gpu.Memory
|
|||||||
/// <param name="size">Size in bytes</param>
|
/// <param name="size">Size in bytes</param>
|
||||||
public void ExternalFlush(ulong address, ulong size)
|
public void ExternalFlush(ulong address, ulong size)
|
||||||
{
|
{
|
||||||
|
ulong maxAddress = Math.Max(address, Address);
|
||||||
|
ulong minEndAddress = Math.Min(address + size, Address + Size);
|
||||||
|
|
||||||
|
if (maxAddress >= minEndAddress)
|
||||||
|
{
|
||||||
|
// Access doesn't overlap.
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
address = maxAddress;
|
||||||
|
size = minEndAddress - address;
|
||||||
|
|
||||||
_context.Renderer.BackgroundContextAction(() =>
|
_context.Renderer.BackgroundContextAction(() =>
|
||||||
{
|
{
|
||||||
var ranges = _modifiedRanges;
|
var ranges = _modifiedRanges;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user