GpuAccessorState.cs 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  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 GpuAccessorState
  9. {
  10. /// <summary>
  11. /// GPU virtual address of the texture pool.
  12. /// </summary>
  13. public ulong TexturePoolGpuVa { get; }
  14. /// <summary>
  15. /// Maximum ID of the texture pool.
  16. /// </summary>
  17. public int TexturePoolMaximumId { get; }
  18. /// <summary>
  19. /// Constant buffer slot where the texture handles are located.
  20. /// </summary>
  21. public int TextureBufferIndex { get; }
  22. /// <summary>
  23. /// Early Z force enable.
  24. /// </summary>
  25. public bool EarlyZForce { get; }
  26. /// <summary>
  27. /// Primitive topology of current draw.
  28. /// </summary>
  29. public PrimitiveTopology Topology { get; }
  30. /// <summary>
  31. /// Tessellation mode.
  32. /// </summary>
  33. public TessMode TessellationMode { get; }
  34. /// <summary>
  35. /// Creates a new instance of the GPU accessor state.
  36. /// </summary>
  37. /// <param name="texturePoolGpuVa">GPU virtual address of the texture pool</param>
  38. /// <param name="texturePoolMaximumId">Maximum ID of the texture pool</param>
  39. /// <param name="textureBufferIndex">Constant buffer slot where the texture handles are located</param>
  40. /// <param name="earlyZForce">Early Z force enable</param>
  41. /// <param name="topology">Primitive topology</param>
  42. /// <param name="tessellationMode">Tessellation mode</param>
  43. public GpuAccessorState(
  44. ulong texturePoolGpuVa,
  45. int texturePoolMaximumId,
  46. int textureBufferIndex,
  47. bool earlyZForce,
  48. PrimitiveTopology topology,
  49. TessMode tessellationMode)
  50. {
  51. TexturePoolGpuVa = texturePoolGpuVa;
  52. TexturePoolMaximumId = texturePoolMaximumId;
  53. TextureBufferIndex = textureBufferIndex;
  54. EarlyZForce = earlyZForce;
  55. Topology = topology;
  56. TessellationMode = tessellationMode;
  57. }
  58. }
  59. }