aboutsummaryrefslogtreecommitdiff
path: root/src/Ryujinx.Graphics.Vic
diff options
context:
space:
mode:
Diffstat (limited to 'src/Ryujinx.Graphics.Vic')
-rw-r--r--src/Ryujinx.Graphics.Vic/Image/SurfaceReader.cs4
-rw-r--r--src/Ryujinx.Graphics.Vic/Image/SurfaceWriter.cs4
-rw-r--r--src/Ryujinx.Graphics.Vic/ResourceManager.cs8
-rw-r--r--src/Ryujinx.Graphics.Vic/Ryujinx.Graphics.Vic.csproj1
-rw-r--r--src/Ryujinx.Graphics.Vic/VicDevice.cs11
5 files changed, 13 insertions, 15 deletions
diff --git a/src/Ryujinx.Graphics.Vic/Image/SurfaceReader.cs b/src/Ryujinx.Graphics.Vic/Image/SurfaceReader.cs
index 8a9acd91..83f00f34 100644
--- a/src/Ryujinx.Graphics.Vic/Image/SurfaceReader.cs
+++ b/src/Ryujinx.Graphics.Vic/Image/SurfaceReader.cs
@@ -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);
diff --git a/src/Ryujinx.Graphics.Vic/Image/SurfaceWriter.cs b/src/Ryujinx.Graphics.Vic/Image/SurfaceWriter.cs
index b0664049..b5008b7b 100644
--- a/src/Ryujinx.Graphics.Vic/Image/SurfaceWriter.cs
+++ b/src/Ryujinx.Graphics.Vic/Image/SurfaceWriter.cs
@@ -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);
}
diff --git a/src/Ryujinx.Graphics.Vic/ResourceManager.cs b/src/Ryujinx.Graphics.Vic/ResourceManager.cs
index b0ff8e10..e7d7ef74 100644
--- a/src/Ryujinx.Graphics.Vic/ResourceManager.cs
+++ b/src/Ryujinx.Graphics.Vic/ResourceManager.cs
@@ -1,17 +1,17 @@
-using Ryujinx.Graphics.Gpu.Memory;
+using Ryujinx.Graphics.Device;
using Ryujinx.Graphics.Vic.Image;
namespace Ryujinx.Graphics.Vic
{
readonly struct ResourceManager
{
- public MemoryManager Gmm { get; }
+ public DeviceMemoryManager MemoryManager { get; }
public BufferPool<Pixel> SurfacePool { get; }
public BufferPool<byte> BufferPool { get; }
- public ResourceManager(MemoryManager gmm, BufferPool<Pixel> surfacePool, BufferPool<byte> bufferPool)
+ public ResourceManager(DeviceMemoryManager mm, BufferPool<Pixel> surfacePool, BufferPool<byte> bufferPool)
{
- Gmm = gmm;
+ MemoryManager = mm;
SurfacePool = surfacePool;
BufferPool = bufferPool;
}
diff --git a/src/Ryujinx.Graphics.Vic/Ryujinx.Graphics.Vic.csproj b/src/Ryujinx.Graphics.Vic/Ryujinx.Graphics.Vic.csproj
index cfebcfa2..b3f39f2e 100644
--- a/src/Ryujinx.Graphics.Vic/Ryujinx.Graphics.Vic.csproj
+++ b/src/Ryujinx.Graphics.Vic/Ryujinx.Graphics.Vic.csproj
@@ -8,7 +8,6 @@
<ItemGroup>
<ProjectReference Include="..\Ryujinx.Common\Ryujinx.Common.csproj" />
<ProjectReference Include="..\Ryujinx.Graphics.Device\Ryujinx.Graphics.Device.csproj" />
- <ProjectReference Include="..\Ryujinx.Graphics.Gpu\Ryujinx.Graphics.Gpu.csproj" />
<ProjectReference Include="..\Ryujinx.Graphics.Host1x\Ryujinx.Graphics.Host1x.csproj" />
<ProjectReference Include="..\Ryujinx.Graphics.Texture\Ryujinx.Graphics.Texture.csproj" />
</ItemGroup>
diff --git a/src/Ryujinx.Graphics.Vic/VicDevice.cs b/src/Ryujinx.Graphics.Vic/VicDevice.cs
index 2ddb94a4..2b25a74c 100644
--- a/src/Ryujinx.Graphics.Vic/VicDevice.cs
+++ b/src/Ryujinx.Graphics.Vic/VicDevice.cs
@@ -1,5 +1,4 @@
using Ryujinx.Graphics.Device;
-using Ryujinx.Graphics.Gpu.Memory;
using Ryujinx.Graphics.Vic.Image;
using Ryujinx.Graphics.Vic.Types;
using System;
@@ -9,14 +8,14 @@ namespace Ryujinx.Graphics.Vic
{
public class VicDevice : IDeviceState
{
- private readonly MemoryManager _gmm;
+ private readonly DeviceMemoryManager _mm;
private readonly ResourceManager _rm;
private readonly DeviceState<VicRegisters> _state;
- public VicDevice(MemoryManager gmm)
+ public VicDevice(DeviceMemoryManager mm)
{
- _gmm = gmm;
- _rm = new ResourceManager(gmm, new BufferPool<Pixel>(), new BufferPool<byte>());
+ _mm = mm;
+ _rm = new ResourceManager(mm, new BufferPool<Pixel>(), new BufferPool<byte>());
_state = new DeviceState<VicRegisters>(new Dictionary<string, RwCallback>
{
{ nameof(VicRegisters.Execute), new RwCallback(Execute, null) },
@@ -68,7 +67,7 @@ namespace Ryujinx.Graphics.Vic
private T ReadIndirect<T>(uint offset) where T : unmanaged
{
- return _gmm.Read<T>((ulong)offset << 8);
+ return _mm.Read<T>((ulong)offset << 8);
}
}
}