0
0
Fork 0
This repository has been archived on 2024-10-12. You can view files and clone it, but cannot push or open issues or pull requests.
ryujinx-final/Ryujinx.Graphics.Texture/Astc/EndPointSet.cs

24 lines
615 B
C#
Raw Normal View History

using System;
using System.Diagnostics;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
namespace Ryujinx.Graphics.Texture.Astc
{
[StructLayout(LayoutKind.Sequential, Size = AstcPixel.StructSize * 8)]
internal struct EndPointSet
{
private AstcPixel _start;
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public Span<AstcPixel> Get(int index)
{
Debug.Assert(index < 4);
ref AstcPixel start = ref Unsafe.Add(ref _start, index * 2);
return MemoryMarshal.CreateSpan(ref start, 2);
}
}
}