aboutsummaryrefslogtreecommitdiff
path: root/Ryujinx.Graphics.Gpu/Shader/GpuChannelPoolState.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Ryujinx.Graphics.Gpu/Shader/GpuChannelPoolState.cs')
-rw-r--r--Ryujinx.Graphics.Gpu/Shader/GpuChannelPoolState.cs16
1 files changed, 15 insertions, 1 deletions
diff --git a/Ryujinx.Graphics.Gpu/Shader/GpuChannelPoolState.cs b/Ryujinx.Graphics.Gpu/Shader/GpuChannelPoolState.cs
index 0b36227a..b894c57e 100644
--- a/Ryujinx.Graphics.Gpu/Shader/GpuChannelPoolState.cs
+++ b/Ryujinx.Graphics.Gpu/Shader/GpuChannelPoolState.cs
@@ -1,9 +1,11 @@
+using System;
+
namespace Ryujinx.Graphics.Gpu.Shader
{
/// <summary>
/// State used by the <see cref="GpuAccessor"/>.
/// </summary>
- struct GpuChannelPoolState
+ struct GpuChannelPoolState : IEquatable<GpuChannelPoolState>
{
/// <summary>
/// GPU virtual address of the texture pool.
@@ -32,5 +34,17 @@ namespace Ryujinx.Graphics.Gpu.Shader
TexturePoolMaximumId = texturePoolMaximumId;
TextureBufferIndex = textureBufferIndex;
}
+
+ /// <summary>
+ /// Check if the pool states are equal.
+ /// </summary>
+ /// <param name="other">Pool state to compare with</param>
+ /// <returns>True if they are equal, false otherwise</returns>
+ public bool Equals(GpuChannelPoolState other)
+ {
+ return TexturePoolGpuVa == other.TexturePoolGpuVa &&
+ TexturePoolMaximumId == other.TexturePoolMaximumId &&
+ TextureBufferIndex == other.TextureBufferIndex;
+ }
}
} \ No newline at end of file