Constants.cs 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. namespace Ryujinx.Graphics.Gpu
  2. {
  3. /// <summary>
  4. /// Common Maxwell GPU constants.
  5. /// </summary>
  6. static class Constants
  7. {
  8. /// <summary>
  9. /// Maximum number of compute uniform buffers.
  10. /// </summary>
  11. /// <remarks>
  12. /// This does not reflect the hardware count, the API will emulate some constant buffers using
  13. /// global memory to make up for the low amount of compute constant buffers supported by hardware (only 8).
  14. /// </remarks>
  15. public const int TotalCpUniformBuffers = 17; // 8 hardware constant buffers + 9 emulated (14 available to the user).
  16. /// <summary>
  17. /// Maximum number of compute storage buffers.
  18. /// </summary>
  19. /// <remarks>
  20. /// The maximum number of storage buffers is API limited, the hardware supports a unlimited amount.
  21. /// </remarks>
  22. public const int TotalCpStorageBuffers = 16;
  23. /// <summary>
  24. /// Maximum number of graphics uniform buffers.
  25. /// </summary>
  26. public const int TotalGpUniformBuffers = 18;
  27. /// <summary>
  28. /// Maximum number of graphics storage buffers.
  29. /// </summary>
  30. /// <remarks>
  31. /// The maximum number of storage buffers is API limited, the hardware supports a unlimited amount.
  32. /// </remarks>
  33. public const int TotalGpStorageBuffers = 16;
  34. /// <summary>
  35. /// Maximum number of render target color buffers.
  36. /// </summary>
  37. public const int TotalRenderTargets = 8;
  38. /// <summary>
  39. /// Number of shader stages.
  40. /// </summary>
  41. public const int ShaderStages = 5;
  42. /// <summary>
  43. /// Maximum number of vertex attributes.
  44. /// </summary>
  45. public const int TotalVertexAttribs = 16;
  46. /// <summary>
  47. /// Maximum number of vertex buffers.
  48. /// </summary>
  49. public const int TotalVertexBuffers = 16;
  50. /// <summary>
  51. /// Maximum number of viewports.
  52. /// </summary>
  53. public const int TotalViewports = 16;
  54. /// <summary>
  55. /// Maximum size of gl_ClipDistance array in shaders.
  56. /// </summary>
  57. public const int TotalClipDistances = 8;
  58. }
  59. }