namespace Ryujinx.Graphics.Gpu.Shader
{
/// <summary>
/// State used by the <see cref="GpuAccessor"/>.
/// </summary>
readonly struct GpuChannelComputeState
// New fields should be added to the end of the struct to keep disk shader cache compatibility.
/// Local group size X of the compute shader.
public readonly int LocalSizeX;
/// Local group size Y of the compute shader.
public readonly int LocalSizeY;
/// Local group size Z of the compute shader.
public readonly int LocalSizeZ;
/// Local memory size of the compute shader.
public readonly int LocalMemorySize;
/// Shared memory size of the compute shader.
public readonly int SharedMemorySize;
/// Indicates that any storage buffer use is unaligned.
public readonly bool HasUnalignedStorageBuffer;
/// Creates a new GPU compute state.
/// <param name="localSizeX">Local group size X of the compute shader</param>
/// <param name="localSizeY">Local group size Y of the compute shader</param>
/// <param name="localSizeZ">Local group size Z of the compute shader</param>
/// <param name="localMemorySize">Local memory size of the compute shader</param>
/// <param name="sharedMemorySize">Shared memory size of the compute shader</param>
/// <param name="hasUnalignedStorageBuffer">Indicates that any storage buffer use is unaligned</param>
public GpuChannelComputeState(
int localSizeX,
int localSizeY,
int localSizeZ,
int localMemorySize,
int sharedMemorySize,
bool hasUnalignedStorageBuffer)
LocalSizeX = localSizeX;
LocalSizeY = localSizeY;
LocalSizeZ = localSizeZ;
LocalMemorySize = localMemorySize;
SharedMemorySize = sharedMemorySize;
HasUnalignedStorageBuffer = hasUnalignedStorageBuffer;
}