diff options
Diffstat (limited to 'Ryujinx.Graphics.Shader/CodeGen/Spirv/TextureMeta.cs')
-rw-r--r-- | Ryujinx.Graphics.Shader/CodeGen/Spirv/TextureMeta.cs | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/Ryujinx.Graphics.Shader/CodeGen/Spirv/TextureMeta.cs b/Ryujinx.Graphics.Shader/CodeGen/Spirv/TextureMeta.cs new file mode 100644 index 00000000..686259ad --- /dev/null +++ b/Ryujinx.Graphics.Shader/CodeGen/Spirv/TextureMeta.cs @@ -0,0 +1,33 @@ +using System; + +namespace Ryujinx.Graphics.Shader.CodeGen.Spirv +{ + struct TextureMeta : IEquatable<TextureMeta> + { + public int CbufSlot { get; } + public int Handle { get; } + public TextureFormat Format { get; } + + public TextureMeta(int cbufSlot, int handle, TextureFormat format) + { + CbufSlot = cbufSlot; + Handle = handle; + Format = format; + } + + public override bool Equals(object obj) + { + return obj is TextureMeta other && Equals(other); + } + + public bool Equals(TextureMeta other) + { + return CbufSlot == other.CbufSlot && Handle == other.Handle && Format == other.Format; + } + + public override int GetHashCode() + { + return HashCode.Combine(CbufSlot, Handle, Format); + } + } +}
\ No newline at end of file |