GpuAccessorState.cs 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. using Ryujinx.Graphics.GAL;
  2. namespace Ryujinx.Graphics.Gpu.Shader
  3. {
  4. /// <summary>
  5. /// State used by the <see cref="GpuAccessor"/>.
  6. /// </summary>
  7. struct GpuAccessorState
  8. {
  9. /// <summary>
  10. /// GPU virtual address of the texture pool.
  11. /// </summary>
  12. public ulong TexturePoolGpuVa { get; }
  13. /// <summary>
  14. /// Maximum ID of the texture pool.
  15. /// </summary>
  16. public int TexturePoolMaximumId { get; }
  17. /// <summary>
  18. /// Constant buffer slot where the texture handles are located.
  19. /// </summary>
  20. public int TextureBufferIndex { get; }
  21. /// <summary>
  22. /// Early Z force enable.
  23. /// </summary>
  24. public bool EarlyZForce { get; }
  25. /// <summary>
  26. /// Primitive topology of current draw.
  27. /// </summary>
  28. public PrimitiveTopology Topology { get; }
  29. /// <summary>
  30. /// Creates a new instance of the GPU accessor state.
  31. /// </summary>
  32. /// <param name="texturePoolGpuVa">GPU virtual address of the texture pool</param>
  33. /// <param name="texturePoolMaximumId">Maximum ID of the texture pool</param>
  34. /// <param name="textureBufferIndex">Constant buffer slot where the texture handles are located</param>
  35. /// <param name="earlyZForce">Early Z force enable</param>
  36. /// <param name="topology">Primitive topology</param>
  37. public GpuAccessorState(
  38. ulong texturePoolGpuVa,
  39. int texturePoolMaximumId,
  40. int textureBufferIndex,
  41. bool earlyZForce,
  42. PrimitiveTopology topology)
  43. {
  44. TexturePoolGpuVa = texturePoolGpuVa;
  45. TexturePoolMaximumId = texturePoolMaximumId;
  46. TextureBufferIndex = textureBufferIndex;
  47. EarlyZForce = earlyZForce;
  48. Topology = topology;
  49. }
  50. }
  51. }