MmeShadowScratch.cs 513 B

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