aboutsummaryrefslogtreecommitdiff
path: root/Ryujinx.Graphics.Gpu/Image/SamplerDescriptor.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Ryujinx.Graphics.Gpu/Image/SamplerDescriptor.cs')
-rw-r--r--Ryujinx.Graphics.Gpu/Image/SamplerDescriptor.cs12
1 files changed, 12 insertions, 0 deletions
diff --git a/Ryujinx.Graphics.Gpu/Image/SamplerDescriptor.cs b/Ryujinx.Graphics.Gpu/Image/SamplerDescriptor.cs
index 2c28b743..64a146fb 100644
--- a/Ryujinx.Graphics.Gpu/Image/SamplerDescriptor.cs
+++ b/Ryujinx.Graphics.Gpu/Image/SamplerDescriptor.cs
@@ -1,4 +1,6 @@
using Ryujinx.Graphics.GAL;
+using System.Runtime.CompilerServices;
+using System.Runtime.Intrinsics;
namespace Ryujinx.Graphics.Gpu.Image
{
@@ -244,5 +246,15 @@ namespace Ryujinx.Graphics.Gpu.Image
{
return ((Word2 >> 12) & 0xfff) * Frac8ToF32;
}
+
+ /// <summary>
+ /// Check if two descriptors are equal.
+ /// </summary>
+ /// <param name="other">The descriptor to compare against</param>
+ /// <returns>True if they are equal, false otherwise</returns>
+ public bool Equals(ref SamplerDescriptor other)
+ {
+ return Unsafe.As<SamplerDescriptor, Vector256<byte>>(ref this).Equals(Unsafe.As<SamplerDescriptor, Vector256<byte>>(ref other));
+ }
}
}