GpuAccessorState.cs 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  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. /// Transform feedback information, if the shader uses transform feedback. Otherwise, should be null.
  36. /// </summary>
  37. public TransformFeedbackDescriptor[] TransformFeedbackDescriptors { get; set; }
  38. /// <summary>
  39. /// Creates a new instance of the GPU accessor state.
  40. /// </summary>
  41. /// <param name="texturePoolGpuVa">GPU virtual address of the texture pool</param>
  42. /// <param name="texturePoolMaximumId">Maximum ID of the texture pool</param>
  43. /// <param name="textureBufferIndex">Constant buffer slot where the texture handles are located</param>
  44. /// <param name="earlyZForce">Early Z force enable</param>
  45. /// <param name="topology">Primitive topology</param>
  46. /// <param name="tessellationMode">Tessellation mode</param>
  47. public GpuAccessorState(
  48. ulong texturePoolGpuVa,
  49. int texturePoolMaximumId,
  50. int textureBufferIndex,
  51. bool earlyZForce,
  52. PrimitiveTopology topology,
  53. TessMode tessellationMode)
  54. {
  55. TexturePoolGpuVa = texturePoolGpuVa;
  56. TexturePoolMaximumId = texturePoolMaximumId;
  57. TextureBufferIndex = textureBufferIndex;
  58. EarlyZForce = earlyZForce;
  59. Topology = topology;
  60. TessellationMode = tessellationMode;
  61. TransformFeedbackDescriptors = null;
  62. }
  63. }
  64. }