/ src / Ryujinx.Graphics.Gpu / Shader / GpuAccessorState.cs
GpuAccessorState.cs
 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          /// Maximum ID that a sampler pool entry may have.
10          /// </summary>
11          public readonly int SamplerPoolMaximumId;
12  
13          /// <summary>
14          /// GPU texture pool state.
15          /// </summary>
16          public readonly GpuChannelPoolState PoolState;
17  
18          /// <summary>
19          /// GPU compute state, for compute shaders.
20          /// </summary>
21          public readonly GpuChannelComputeState ComputeState;
22  
23          /// <summary>
24          /// GPU graphics state, for vertex, tessellation, geometry and fragment shaders.
25          /// </summary>
26          public readonly GpuChannelGraphicsState GraphicsState;
27  
28          /// <summary>
29          /// Shader specialization state (shared by all stages).
30          /// </summary>
31          public readonly ShaderSpecializationState SpecializationState;
32  
33          /// <summary>
34          /// Transform feedback information, if the shader uses transform feedback. Otherwise, should be null.
35          /// </summary>
36          public readonly TransformFeedbackDescriptor[] TransformFeedbackDescriptors;
37  
38          /// <summary>
39          /// Shader resource counts (shared by all stages).
40          /// </summary>
41          public readonly ResourceCounts ResourceCounts;
42  
43          /// <summary>
44          /// Creates a new GPU accessor state.
45          /// </summary>
46          /// <param name="samplerPoolMaximumId">Maximum ID that a sampler pool entry may have</param>
47          /// <param name="poolState">GPU texture pool state</param>
48          /// <param name="computeState">GPU compute state, for compute shaders</param>
49          /// <param name="graphicsState">GPU graphics state, for vertex, tessellation, geometry and fragment shaders</param>
50          /// <param name="specializationState">Shader specialization state (shared by all stages)</param>
51          /// <param name="transformFeedbackDescriptors">Transform feedback information, if the shader uses transform feedback. Otherwise, should be null</param>
52          public GpuAccessorState(
53              int samplerPoolMaximumId,
54              GpuChannelPoolState poolState,
55              GpuChannelComputeState computeState,
56              GpuChannelGraphicsState graphicsState,
57              ShaderSpecializationState specializationState,
58              TransformFeedbackDescriptor[] transformFeedbackDescriptors = null)
59          {
60              SamplerPoolMaximumId = samplerPoolMaximumId;
61              PoolState = poolState;
62              GraphicsState = graphicsState;
63              ComputeState = computeState;
64              SpecializationState = specializationState;
65              TransformFeedbackDescriptors = transformFeedbackDescriptors;
66              ResourceCounts = new ResourceCounts();
67          }
68      }
69  }