GpuChannelGraphicsState.cs 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  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. /// Indicates whenever the viewport transform is disabled.
  25. /// </summary>
  26. public readonly bool ViewportTransformDisable;
  27. /// <summary>
  28. /// Creates a new GPU graphics state.
  29. /// </summary>
  30. /// <param name="earlyZForce">Early Z force enable</param>
  31. /// <param name="topology">Primitive topology</param>
  32. /// <param name="tessellationMode">Tessellation mode</param>
  33. /// <param name="viewportTransformDisable">Indicates whenever the viewport transform is disabled</param>
  34. public GpuChannelGraphicsState(bool earlyZForce, PrimitiveTopology topology, TessMode tessellationMode, bool viewportTransformDisable)
  35. {
  36. EarlyZForce = earlyZForce;
  37. Topology = topology;
  38. TessellationMode = tessellationMode;
  39. ViewportTransformDisable = viewportTransformDisable;
  40. }
  41. }
  42. }