TextureMeta.cs 857 B

123456789101112131415161718192021222324252627282930313233
  1. using System;
  2. namespace Ryujinx.Graphics.Shader.CodeGen.Spirv
  3. {
  4. struct TextureMeta : IEquatable<TextureMeta>
  5. {
  6. public int CbufSlot { get; }
  7. public int Handle { get; }
  8. public TextureFormat Format { get; }
  9. public TextureMeta(int cbufSlot, int handle, TextureFormat format)
  10. {
  11. CbufSlot = cbufSlot;
  12. Handle = handle;
  13. Format = format;
  14. }
  15. public override bool Equals(object obj)
  16. {
  17. return obj is TextureMeta other && Equals(other);
  18. }
  19. public bool Equals(TextureMeta other)
  20. {
  21. return CbufSlot == other.CbufSlot && Handle == other.Handle && Format == other.Format;
  22. }
  23. public override int GetHashCode()
  24. {
  25. return HashCode.Combine(CbufSlot, Handle, Format);
  26. }
  27. }
  28. }