ShaderAddresses.cs 1.0 KB

12345678910111213141516171819202122232425262728293031323334
  1. using System;
  2. namespace Ryujinx.Graphics.Gpu.Engine
  3. {
  4. struct ShaderAddresses : IEquatable<ShaderAddresses>
  5. {
  6. public ulong VertexA;
  7. public ulong Vertex;
  8. public ulong TessControl;
  9. public ulong TessEvaluation;
  10. public ulong Geometry;
  11. public ulong Fragment;
  12. public override bool Equals(object other)
  13. {
  14. return other is ShaderAddresses addresses && Equals(addresses);
  15. }
  16. public bool Equals(ShaderAddresses other)
  17. {
  18. return VertexA == other.VertexA &&
  19. Vertex == other.Vertex &&
  20. TessControl == other.TessControl &&
  21. TessEvaluation == other.TessEvaluation &&
  22. Geometry == other.Geometry &&
  23. Fragment == other.Fragment;
  24. }
  25. public override int GetHashCode()
  26. {
  27. return HashCode.Combine(VertexA, Vertex, TessControl, TessEvaluation, Geometry, Fragment);
  28. }
  29. }
  30. }