GpuAccessorState.cs 2.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. namespace Ryujinx.Graphics.Gpu.Shader
  2. {
  3. /// <summary>
  4. /// State used by the <see cref="GpuAccessor"/>.
  5. /// </summary>
  6. class GpuAccessorState
  7. {
  8. /// <summary>
  9. /// GPU texture pool state.
  10. /// </summary>
  11. public readonly GpuChannelPoolState PoolState;
  12. /// <summary>
  13. /// GPU compute state, for compute shaders.
  14. /// </summary>
  15. public readonly GpuChannelComputeState ComputeState;
  16. /// <summary>
  17. /// GPU graphics state, for vertex, tessellation, geometry and fragment shaders.
  18. /// </summary>
  19. public readonly GpuChannelGraphicsState GraphicsState;
  20. /// <summary>
  21. /// Shader specialization state (shared by all stages).
  22. /// </summary>
  23. public readonly ShaderSpecializationState SpecializationState;
  24. /// <summary>
  25. /// Transform feedback information, if the shader uses transform feedback. Otherwise, should be null.
  26. /// </summary>
  27. public readonly TransformFeedbackDescriptor[] TransformFeedbackDescriptors;
  28. /// <summary>
  29. /// Shader resource counts (shared by all stages).
  30. /// </summary>
  31. public readonly ResourceCounts ResourceCounts;
  32. /// <summary>
  33. /// Creates a new GPU accessor state.
  34. /// </summary>
  35. /// <param name="poolState">GPU texture pool state</param>
  36. /// <param name="computeState">GPU compute state, for compute shaders</param>
  37. /// <param name="graphicsState">GPU graphics state, for vertex, tessellation, geometry and fragment shaders</param>
  38. /// <param name="specializationState">Shader specialization state (shared by all stages)</param>
  39. /// <param name="transformFeedbackDescriptors">Transform feedback information, if the shader uses transform feedback. Otherwise, should be null</param>
  40. public GpuAccessorState(
  41. GpuChannelPoolState poolState,
  42. GpuChannelComputeState computeState,
  43. GpuChannelGraphicsState graphicsState,
  44. ShaderSpecializationState specializationState,
  45. TransformFeedbackDescriptor[] transformFeedbackDescriptors = null)
  46. {
  47. PoolState = poolState;
  48. GraphicsState = graphicsState;
  49. ComputeState = computeState;
  50. SpecializationState = specializationState;
  51. TransformFeedbackDescriptors = transformFeedbackDescriptors;
  52. ResourceCounts = new ResourceCounts();
  53. }
  54. }
  55. }