From 7df4fcada702dbc01d09b8f6fa027f5d409e33e3 Mon Sep 17 00:00:00 2001 From: riperiperi Date: Fri, 5 May 2023 22:40:46 +0100 Subject: GPU: Remove CPU region handle containers (#4817) * GPU: Remove CPU region handle containers. Another one for the "I don't know why I didn't do this earlier" pile. This removes the "Cpu" prefixed region handle classes, which each mirror a region handle type from Ryujinx.Memory. Originally, not all projects had a reference to Ryujinx.Memory, so these classes were introduced to bridge the gap. Someone else crossed that bridge since, so these classes don't have much of a purpose anymore. This PR replaces all uses of CpuRegionHandle etc to their direct Ryujinx.Memory versions. RegionHandle methods (specifically QueryModified) are about the hottest path there is in the entire emulator, so there is a nice boost from doing this. * Add docs --- src/Ryujinx.Graphics.Gpu/Memory/GpuRegionHandle.cs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'src/Ryujinx.Graphics.Gpu/Memory/GpuRegionHandle.cs') diff --git a/src/Ryujinx.Graphics.Gpu/Memory/GpuRegionHandle.cs b/src/Ryujinx.Graphics.Gpu/Memory/GpuRegionHandle.cs index bc07bfad..9f73de4e 100644 --- a/src/Ryujinx.Graphics.Gpu/Memory/GpuRegionHandle.cs +++ b/src/Ryujinx.Graphics.Gpu/Memory/GpuRegionHandle.cs @@ -1,5 +1,4 @@ -using Ryujinx.Cpu.Tracking; -using Ryujinx.Memory.Tracking; +using Ryujinx.Memory.Tracking; using System; namespace Ryujinx.Graphics.Gpu.Memory @@ -9,7 +8,7 @@ namespace Ryujinx.Graphics.Gpu.Memory /// class GpuRegionHandle : IRegionHandle { - private readonly CpuRegionHandle[] _cpuRegionHandles; + private readonly RegionHandle[] _cpuRegionHandles; public bool Dirty { @@ -35,7 +34,7 @@ namespace Ryujinx.Graphics.Gpu.Memory /// Create a new GpuRegionHandle, made up of mulitple CpuRegionHandles. /// /// The CpuRegionHandles that make up this handle - public GpuRegionHandle(CpuRegionHandle[] cpuRegionHandles) + public GpuRegionHandle(RegionHandle[] cpuRegionHandles) { _cpuRegionHandles = cpuRegionHandles; } -- cgit v1.2.3