diff options
Diffstat (limited to 'Ryujinx.Graphics.Gpu/Image/TextureDescriptor.cs')
-rw-r--r-- | Ryujinx.Graphics.Gpu/Image/TextureDescriptor.cs | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/Ryujinx.Graphics.Gpu/Image/TextureDescriptor.cs b/Ryujinx.Graphics.Gpu/Image/TextureDescriptor.cs index 76d97bf8..e85df136 100644 --- a/Ryujinx.Graphics.Gpu/Image/TextureDescriptor.cs +++ b/Ryujinx.Graphics.Gpu/Image/TextureDescriptor.cs @@ -1,4 +1,6 @@ using Ryujinx.Graphics.Gpu.Shader.Cache.Definition; +using System.Runtime.CompilerServices; +using System.Runtime.Intrinsics; namespace Ryujinx.Graphics.Gpu.Image { @@ -248,5 +250,15 @@ namespace Ryujinx.Graphics.Gpu.Image return result; } + + /// <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 TextureDescriptor other) + { + return Unsafe.As<TextureDescriptor, Vector256<byte>>(ref this).Equals(Unsafe.As<TextureDescriptor, Vector256<byte>>(ref other)); + } } } |