mirror of
https://git.ryujinx.app/ryubing/ryujinx.git
synced 2026-05-19 19:55:47 +00:00
@@ -705,7 +705,7 @@ namespace Ryujinx.Graphics.Gpu.Memory
|
||||
{
|
||||
BufferHandle handle = Handle;
|
||||
|
||||
return (ulong address, ulong size, ulong _) =>
|
||||
return (address, size, _) =>
|
||||
{
|
||||
FlushImpl(handle, address, size);
|
||||
};
|
||||
|
||||
@@ -63,7 +63,7 @@ namespace Ryujinx.Graphics.Gpu.Memory
|
||||
|
||||
// Backend managed is always auto, unified memory is always host.
|
||||
_desiredType = BufferBackingType.HostMemory;
|
||||
_canSwap = _systemMemoryType != SystemMemoryType.BackendManaged && _systemMemoryType != SystemMemoryType.UnifiedMemory;
|
||||
_canSwap = _systemMemoryType is not SystemMemoryType.BackendManaged and not SystemMemoryType.UnifiedMemory;
|
||||
|
||||
if (_canSwap)
|
||||
{
|
||||
|
||||
@@ -29,10 +29,7 @@ namespace Ryujinx.Graphics.Gpu.Memory
|
||||
|
||||
StorageRead = 0x40,
|
||||
StorageWrite = 0x80,
|
||||
|
||||
#pragma warning disable CA1069 // Enums values should not be duplicated
|
||||
StorageAtomic = 0xc0
|
||||
#pragma warning restore CA1069 // Enums values should not be duplicated
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -76,7 +76,7 @@ namespace Ryujinx.Graphics.Gpu.Memory
|
||||
BufferRange range = new(_handle, 0, data.Length);
|
||||
_renderer.Pipeline.SetUniformBuffers([new BufferAssignment(0, range)]);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
_renderer.SetBufferData(_handle, _startOffset, data[_startOffset.._endOffset]);
|
||||
|
||||
|
||||
@@ -157,6 +157,7 @@ namespace Ryujinx.Graphics.Gpu.Memory
|
||||
{
|
||||
_cpuMemory.GetSpan(currentRange.Address, size, tracked).CopyTo(data.Slice(offset, size));
|
||||
}
|
||||
|
||||
offset += size;
|
||||
}
|
||||
|
||||
@@ -204,6 +205,7 @@ namespace Ryujinx.Graphics.Gpu.Memory
|
||||
{
|
||||
GetSpan(currentRange.Address, size).CopyTo(memorySpan.Slice(offset, size));
|
||||
}
|
||||
|
||||
offset += size;
|
||||
}
|
||||
|
||||
@@ -339,6 +341,7 @@ namespace Ryujinx.Graphics.Gpu.Memory
|
||||
{
|
||||
writeCallback(currentRange.Address, data.Slice(offset, size));
|
||||
}
|
||||
|
||||
offset += size;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -262,7 +262,7 @@ namespace Ryujinx.Graphics.Gpu.Memory
|
||||
/// <returns>True if pitch, false otherwise</returns>
|
||||
public static bool IsPitch(this PteKind kind)
|
||||
{
|
||||
return kind == PteKind.Pitch || kind == PteKind.PitchNoSwizzle;
|
||||
return kind is PteKind.Pitch or PteKind.PitchNoSwizzle;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user