GuestShaderCacheHeader.cs 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. using System.Runtime.InteropServices;
  2. namespace Ryujinx.Graphics.Gpu.Shader.Cache.Definition
  3. {
  4. /// <summary>
  5. /// The header of a shader program in the guest cache.
  6. /// </summary>
  7. [StructLayout(LayoutKind.Sequential, Pack = 0x1, Size = 0x10)]
  8. struct GuestShaderCacheHeader
  9. {
  10. /// <summary>
  11. /// The count of shaders defining this program.
  12. /// </summary>
  13. public byte Count;
  14. /// <summary>
  15. /// The count of transform feedback data used in this program.
  16. /// </summary>
  17. public byte TransformFeedbackCount;
  18. /// <summary>
  19. /// Unused/reserved.
  20. /// </summary>
  21. public ushort Reserved1;
  22. /// <summary>
  23. /// Unused/reserved.
  24. /// </summary>
  25. public ulong Reserved2;
  26. /// <summary>
  27. /// Create a new guest shader cache header.
  28. /// </summary>
  29. /// <param name="count">The count of shaders defining this program</param>
  30. /// <param name="transformFeedbackCount">The count of transform feedback data used in this program</param>
  31. public GuestShaderCacheHeader(byte count, byte transformFeedbackCount) : this()
  32. {
  33. Count = count;
  34. TransformFeedbackCount = transformFeedbackCount;
  35. }
  36. }
  37. }