MmeShadowScratch.cs
1 using System; 2 using System.Runtime.InteropServices; 3 4 namespace Ryujinx.Graphics.Gpu.Engine 5 { 6 /// <summary> 7 /// Represents temporary storage used by macros. 8 /// </summary> 9 [StructLayout(LayoutKind.Sequential, Size = 1024)] 10 struct MmeShadowScratch 11 { 12 #pragma warning disable CS0169 // The private field is never used 13 private uint _e0; 14 #pragma warning restore CS0169 15 public ref uint this[int index] => ref AsSpan()[index]; 16 public Span<uint> AsSpan() => MemoryMarshal.CreateSpan(ref _e0, 256); 17 } 18 }