2019-10-12 23:02:07 -07:00
|
|
|
namespace Ryujinx.Graphics.Gpu
|
|
|
|
{
|
2019-12-31 12:08:20 -08:00
|
|
|
/// <summary>
|
|
|
|
/// Common Maxwell GPU constants.
|
|
|
|
/// </summary>
|
2019-10-12 23:02:07 -07:00
|
|
|
static class Constants
|
|
|
|
{
|
2019-12-31 12:08:20 -08:00
|
|
|
/// <summary>
|
|
|
|
/// Maximum number of compute uniform buffers.
|
|
|
|
/// </summary>
|
2020-02-10 16:10:05 -08:00
|
|
|
/// <remarks>
|
|
|
|
/// This does not reflect the hardware count, the API will emulate some constant buffers using
|
|
|
|
/// global memory to make up for the low amount of compute constant buffers supported by hardware (only 8).
|
|
|
|
/// </remarks>
|
|
|
|
public const int TotalCpUniformBuffers = 17; // 8 hardware constant buffers + 9 emulated (14 available to the user).
|
2019-12-31 12:08:20 -08:00
|
|
|
|
|
|
|
/// <summary>
|
2020-02-10 16:10:05 -08:00
|
|
|
/// Maximum number of compute storage buffers.
|
2019-12-31 12:08:20 -08:00
|
|
|
/// </summary>
|
2020-02-10 16:10:05 -08:00
|
|
|
/// <remarks>
|
|
|
|
/// The maximum number of storage buffers is API limited, the hardware supports a unlimited amount.
|
|
|
|
/// </remarks>
|
2019-10-12 23:02:07 -07:00
|
|
|
public const int TotalCpStorageBuffers = 16;
|
2019-12-31 12:08:20 -08:00
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Maximum number of graphics uniform buffers.
|
|
|
|
/// </summary>
|
2019-10-12 23:02:07 -07:00
|
|
|
public const int TotalGpUniformBuffers = 18;
|
2019-12-31 12:08:20 -08:00
|
|
|
|
|
|
|
/// <summary>
|
2020-02-10 16:10:05 -08:00
|
|
|
/// Maximum number of graphics storage buffers.
|
2019-12-31 12:08:20 -08:00
|
|
|
/// </summary>
|
2020-02-10 16:10:05 -08:00
|
|
|
/// <remarks>
|
|
|
|
/// The maximum number of storage buffers is API limited, the hardware supports a unlimited amount.
|
|
|
|
/// </remarks>
|
2019-10-12 23:02:07 -07:00
|
|
|
public const int TotalGpStorageBuffers = 16;
|
2019-12-31 12:08:20 -08:00
|
|
|
|
2020-07-14 20:01:10 -07:00
|
|
|
/// <summary>
|
|
|
|
/// Maximum number of transform feedback buffers.
|
|
|
|
/// </summary>
|
|
|
|
public const int TotalTransformFeedbackBuffers = 4;
|
|
|
|
|
2019-12-31 12:08:20 -08:00
|
|
|
/// <summary>
|
|
|
|
/// Maximum number of render target color buffers.
|
|
|
|
/// </summary>
|
|
|
|
public const int TotalRenderTargets = 8;
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Number of shader stages.
|
|
|
|
/// </summary>
|
2020-01-01 07:39:09 -08:00
|
|
|
public const int ShaderStages = 5;
|
2019-12-31 12:08:20 -08:00
|
|
|
|
2020-05-23 02:46:09 -07:00
|
|
|
/// <summary>
|
|
|
|
/// Maximum number of vertex attributes.
|
|
|
|
/// </summary>
|
|
|
|
public const int TotalVertexAttribs = 16;
|
|
|
|
|
2019-12-31 12:08:20 -08:00
|
|
|
/// <summary>
|
|
|
|
/// Maximum number of vertex buffers.
|
|
|
|
/// </summary>
|
|
|
|
public const int TotalVertexBuffers = 16;
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Maximum number of viewports.
|
|
|
|
/// </summary>
|
2020-04-07 02:19:45 -07:00
|
|
|
public const int TotalViewports = 16;
|
2020-05-03 19:04:49 -07:00
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Maximum size of gl_ClipDistance array in shaders.
|
|
|
|
/// </summary>
|
|
|
|
public const int TotalClipDistances = 8;
|
2021-03-18 18:17:38 -07:00
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Byte alignment for texture stride.
|
|
|
|
/// </summary>
|
|
|
|
public const int StrideAlignment = 32;
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Byte alignment for block linear textures
|
|
|
|
/// </summary>
|
|
|
|
public const int GobAlignment = 64;
|
2019-10-12 23:02:07 -07:00
|
|
|
}
|
|
|
|
}
|