Files
ryujinx/src/Ryujinx.Graphics.GAL/BufferHandle.cs
2025-11-11 12:55:36 -06:00

18 lines
495 B
C#

using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
namespace Ryujinx.Graphics.GAL
{
[StructLayout(LayoutKind.Sequential, Size = 8)]
public readonly record struct BufferHandle
{
private readonly ulong _value;
public static BufferHandle Null => new(0);
private BufferHandle(ulong value) => _value = value;
public static implicit operator int(BufferHandle handle) => (int)Unsafe.As<BufferHandle, ulong>(ref handle);
}
}