mirror of
https://git.ryujinx.app/ryubing/ryujinx.git
synced 2025-07-26 21:17:12 +02:00
Add a separate device memory manager (#6153)
* Add a separate device memory manager * Still need this * Device writes are always tracked * Device writes are always tracked (2) * Rename more instances of gmm to mm
This commit is contained in:
parent
90455a05e6
commit
f241f88558
33 changed files with 555 additions and 157 deletions
|
@ -454,7 +454,7 @@ namespace Ryujinx.Graphics.Vic.Image
|
|||
int srcStride = GetPitch(width, bytesPerPixel);
|
||||
int inSize = srcStride * height;
|
||||
|
||||
ReadOnlySpan<byte> src = rm.Gmm.GetSpan(ExtendOffset(offset), inSize);
|
||||
ReadOnlySpan<byte> src = rm.MemoryManager.GetSpan(ExtendOffset(offset), inSize);
|
||||
|
||||
int outSize = dstStride * height;
|
||||
int bufferIndex = rm.BufferPool.RentMinimum(outSize, out byte[] buffer);
|
||||
|
@ -481,7 +481,7 @@ namespace Ryujinx.Graphics.Vic.Image
|
|||
{
|
||||
int inSize = GetBlockLinearSize(width, height, bytesPerPixel, gobBlocksInY);
|
||||
|
||||
ReadOnlySpan<byte> src = rm.Gmm.GetSpan(ExtendOffset(offset), inSize);
|
||||
ReadOnlySpan<byte> src = rm.MemoryManager.GetSpan(ExtendOffset(offset), inSize);
|
||||
|
||||
int outSize = dstStride * height;
|
||||
int bufferIndex = rm.BufferPool.RentMinimum(outSize, out byte[] buffer);
|
||||
|
|
|
@ -636,7 +636,7 @@ namespace Ryujinx.Graphics.Vic.Image
|
|||
{
|
||||
if (linear)
|
||||
{
|
||||
rm.Gmm.WriteMapped(ExtendOffset(offset), src);
|
||||
rm.MemoryManager.Write(ExtendOffset(offset), src);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -659,7 +659,7 @@ namespace Ryujinx.Graphics.Vic.Image
|
|||
|
||||
LayoutConverter.ConvertLinearToBlockLinear(dst, width, height, dstStride, bytesPerPixel, gobBlocksInY, src);
|
||||
|
||||
rm.Gmm.WriteMapped(ExtendOffset(offset), dst);
|
||||
rm.MemoryManager.Write(ExtendOffset(offset), dst);
|
||||
|
||||
rm.BufferPool.Return(dstIndex);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue