GpuChannelComputeState.cs 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. namespace Ryujinx.Graphics.Gpu.Shader
  2. {
  3. /// <summary>
  4. /// State used by the <see cref="GpuAccessor"/>.
  5. /// </summary>
  6. struct GpuChannelComputeState
  7. {
  8. // New fields should be added to the end of the struct to keep disk shader cache compatibility.
  9. /// <summary>
  10. /// Local group size X of the compute shader.
  11. /// </summary>
  12. public readonly int LocalSizeX;
  13. /// <summary>
  14. /// Local group size Y of the compute shader.
  15. /// </summary>
  16. public readonly int LocalSizeY;
  17. /// <summary>
  18. /// Local group size Z of the compute shader.
  19. /// </summary>
  20. public readonly int LocalSizeZ;
  21. /// <summary>
  22. /// Local memory size of the compute shader.
  23. /// </summary>
  24. public readonly int LocalMemorySize;
  25. /// <summary>
  26. /// Shared memory size of the compute shader.
  27. /// </summary>
  28. public readonly int SharedMemorySize;
  29. /// <summary>
  30. /// Creates a new GPU compute state.
  31. /// </summary>
  32. /// <param name="localSizeX">Local group size X of the compute shader</param>
  33. /// <param name="localSizeY">Local group size Y of the compute shader</param>
  34. /// <param name="localSizeZ">Local group size Z of the compute shader</param>
  35. /// <param name="localMemorySize">Local memory size of the compute shader</param>
  36. /// <param name="sharedMemorySize">Shared memory size of the compute shader</param>
  37. public GpuChannelComputeState(
  38. int localSizeX,
  39. int localSizeY,
  40. int localSizeZ,
  41. int localMemorySize,
  42. int sharedMemorySize)
  43. {
  44. LocalSizeX = localSizeX;
  45. LocalSizeY = localSizeY;
  46. LocalSizeZ = localSizeZ;
  47. LocalMemorySize = localMemorySize;
  48. SharedMemorySize = sharedMemorySize;
  49. }
  50. }
  51. }