GpuChannelGraphicsState.cs 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. using Ryujinx.Graphics.GAL;
  2. using Ryujinx.Graphics.Gpu.Engine.Threed;
  3. namespace Ryujinx.Graphics.Gpu.Shader
  4. {
  5. /// <summary>
  6. /// State used by the <see cref="GpuAccessor"/>.
  7. /// </summary>
  8. struct GpuChannelGraphicsState
  9. {
  10. // New fields should be added to the end of the struct to keep disk shader cache compatibility.
  11. /// <summary>
  12. /// Early Z force enable.
  13. /// </summary>
  14. public readonly bool EarlyZForce;
  15. /// <summary>
  16. /// Primitive topology of current draw.
  17. /// </summary>
  18. public readonly PrimitiveTopology Topology;
  19. /// <summary>
  20. /// Tessellation mode.
  21. /// </summary>
  22. public readonly TessMode TessellationMode;
  23. /// <summary>
  24. /// Creates a new GPU graphics state.
  25. /// </summary>
  26. /// <param name="earlyZForce">Early Z force enable</param>
  27. /// <param name="topology">Primitive topology</param>
  28. /// <param name="tessellationMode">Tessellation mode</param>
  29. public GpuChannelGraphicsState(bool earlyZForce, PrimitiveTopology topology, TessMode tessellationMode)
  30. {
  31. EarlyZForce = earlyZForce;
  32. Topology = topology;
  33. TessellationMode = tessellationMode;
  34. }
  35. }
  36. }