using System;
namespace Ryujinx.Graphics.Gpu.Shader
{
///
/// State used by the .
///
readonly struct GpuChannelPoolState : IEquatable
{
///
/// GPU virtual address of the texture pool.
///
public readonly ulong TexturePoolGpuVa;
///
/// Maximum ID of the texture pool.
///
public readonly int TexturePoolMaximumId;
///
/// Constant buffer slot where the texture handles are located.
///
public readonly int TextureBufferIndex;
///
/// Creates a new GPU texture pool state.
///
/// GPU virtual address of the texture pool
/// Maximum ID of the texture pool
/// Constant buffer slot where the texture handles are located
public GpuChannelPoolState(ulong texturePoolGpuVa, int texturePoolMaximumId, int textureBufferIndex)
{
TexturePoolGpuVa = texturePoolGpuVa;
TexturePoolMaximumId = texturePoolMaximumId;
TextureBufferIndex = textureBufferIndex;
}
///
/// Check if the pool states are equal.
///
/// Pool state to compare with
/// True if they are equal, false otherwise
public bool Equals(GpuChannelPoolState other)
{
return TexturePoolGpuVa == other.TexturePoolGpuVa &&
TexturePoolMaximumId == other.TexturePoolMaximumId &&
TextureBufferIndex == other.TextureBufferIndex;
}
}
}