misc: Replace references to IntPtr/UIntPtr with nint/nuint + code cleanups.

This commit is contained in:
Evan Husted 2024-10-26 08:46:41 -05:00
parent a09d314817
commit dfb4854d19
172 changed files with 902 additions and 914 deletions

View file

@ -13,13 +13,13 @@ namespace Ryujinx.Graphics.Vulkan
private readonly struct HostMemoryAllocation
{
public readonly Auto<MemoryAllocation> Allocation;
public readonly IntPtr Pointer;
public readonly nint Pointer;
public readonly ulong Size;
public ulong Start => (ulong)Pointer;
public ulong End => (ulong)Pointer + Size;
public HostMemoryAllocation(Auto<MemoryAllocation> allocation, IntPtr pointer, ulong size)
public HostMemoryAllocation(Auto<MemoryAllocation> allocation, nint pointer, ulong size)
{
Allocation = allocation;
Pointer = pointer;
@ -50,7 +50,7 @@ namespace Ryujinx.Graphics.Vulkan
public unsafe bool TryImport(
MemoryRequirements requirements,
MemoryPropertyFlags flags,
IntPtr pointer,
nint pointer,
ulong size)
{
lock (_lock)
@ -139,7 +139,7 @@ namespace Ryujinx.Graphics.Vulkan
return true;
}
public (Auto<MemoryAllocation>, ulong) GetExistingAllocation(IntPtr pointer, ulong size)
public (Auto<MemoryAllocation>, ulong) GetExistingAllocation(nint pointer, ulong size)
{
lock (_lock)
{