diff options
Diffstat (limited to 'Ryujinx.Graphics.GAL/TextureCreateInfo.cs')
| -rw-r--r-- | Ryujinx.Graphics.GAL/TextureCreateInfo.cs | 26 |
1 files changed, 25 insertions, 1 deletions
diff --git a/Ryujinx.Graphics.GAL/TextureCreateInfo.cs b/Ryujinx.Graphics.GAL/TextureCreateInfo.cs index d74ac62d..eedf58a0 100644 --- a/Ryujinx.Graphics.GAL/TextureCreateInfo.cs +++ b/Ryujinx.Graphics.GAL/TextureCreateInfo.cs @@ -3,7 +3,7 @@ using System; namespace Ryujinx.Graphics.GAL { - public struct TextureCreateInfo + public struct TextureCreateInfo : IEquatable<TextureCreateInfo> { public int Width { get; } public int Height { get; } @@ -116,5 +116,29 @@ namespace Ryujinx.Graphics.GAL { return Math.Max(1, size >> level); } + + public override int GetHashCode() + { + return HashCode.Combine(Width, Height); + } + + bool IEquatable<TextureCreateInfo>.Equals(TextureCreateInfo other) + { + return Width == other.Width && + Height == other.Height && + Depth == other.Depth && + Levels == other.Levels && + Samples == other.Samples && + BlockWidth == other.BlockWidth && + BlockHeight == other.BlockHeight && + BytesPerPixel == other.BytesPerPixel && + Format == other.Format && + DepthStencilMode == other.DepthStencilMode && + Target == other.Target && + SwizzleR == other.SwizzleR && + SwizzleG == other.SwizzleG && + SwizzleB == other.SwizzleB && + SwizzleA == other.SwizzleA; + } } } |
