From cee712105850ac3385cd0091a923438167433f9f Mon Sep 17 00:00:00 2001 From: TSR Berry <20988865+TSRBerry@users.noreply.github.com> Date: Sat, 8 Apr 2023 01:22:00 +0200 Subject: Move solution and projects to src --- src/Ryujinx.Graphics.Gpu/Constants.cs | 104 ++++++++++++++++++++++++++++++++++ 1 file changed, 104 insertions(+) create mode 100644 src/Ryujinx.Graphics.Gpu/Constants.cs (limited to 'src/Ryujinx.Graphics.Gpu/Constants.cs') diff --git a/src/Ryujinx.Graphics.Gpu/Constants.cs b/src/Ryujinx.Graphics.Gpu/Constants.cs new file mode 100644 index 00000000..1897f5d0 --- /dev/null +++ b/src/Ryujinx.Graphics.Gpu/Constants.cs @@ -0,0 +1,104 @@ +namespace Ryujinx.Graphics.Gpu +{ + /// + /// Common Maxwell GPU constants. + /// + static class Constants + { + /// + /// Maximum number of compute uniform buffers. + /// + /// + /// 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). + /// + public const int TotalCpUniformBuffers = 17; // 8 hardware constant buffers + 9 emulated (14 available to the user). + + /// + /// Maximum number of compute storage buffers. + /// + /// + /// The maximum number of storage buffers is API limited, the hardware supports an unlimited amount. + /// + public const int TotalCpStorageBuffers = 16; + + /// + /// Maximum number of graphics uniform buffers. + /// + public const int TotalGpUniformBuffers = 18; + + /// + /// Maximum number of graphics storage buffers. + /// + /// + /// The maximum number of storage buffers is API limited, the hardware supports an unlimited amount. + /// + public const int TotalGpStorageBuffers = 16; + + /// + /// Maximum number of transform feedback buffers. + /// + public const int TotalTransformFeedbackBuffers = 4; + + /// + /// Maximum number of textures on a single shader stage. + /// + /// + /// The maximum number of textures is API limited, the hardware supports an unlimited amount. + /// + public const int TotalTextures = 32; + + /// + /// Maximum number of images on a single shader stage. + /// + /// + /// The maximum number of images is API limited, the hardware supports an unlimited amount. + /// + public const int TotalImages = 8; + + /// + /// Maximum number of render target color buffers. + /// + public const int TotalRenderTargets = 8; + + /// + /// Number of shader stages. + /// + public const int ShaderStages = 5; + + /// + /// Maximum number of vertex attributes. + /// + public const int TotalVertexAttribs = 16; // FIXME: Should be 32, but OpenGL only supports 16. + + /// + /// Maximum number of vertex buffers. + /// + public const int TotalVertexBuffers = 16; + + /// + /// Maximum number of viewports. + /// + public const int TotalViewports = 16; + + /// + /// Maximum size of gl_ClipDistance array in shaders. + /// + public const int TotalClipDistances = 8; + + /// + /// Byte alignment for texture stride. + /// + public const int StrideAlignment = 32; + + /// + /// Byte alignment for block linear textures + /// + public const int GobAlignment = 64; + + /// + /// Expected byte alignment for storage buffers + /// + public const int StorageAlignment = 16; + } +} \ No newline at end of file -- cgit v1.2.3