mirror of
https://github.com/Ryujinx/Ryujinx.git
synced 2025-06-28 23:30:47 -07:00
Avoid some redundant GL calls (#1958)
This commit is contained in:
@ -1,6 +1,8 @@
|
||||
using System;
|
||||
|
||||
namespace Ryujinx.Graphics.GAL
|
||||
{
|
||||
public struct VertexAttribDescriptor
|
||||
public struct VertexAttribDescriptor : IEquatable<VertexAttribDescriptor>
|
||||
{
|
||||
public int BufferIndex { get; }
|
||||
public int Offset { get; }
|
||||
@ -16,5 +18,23 @@ namespace Ryujinx.Graphics.GAL
|
||||
IsZero = isZero;
|
||||
Format = format;
|
||||
}
|
||||
|
||||
public override bool Equals(object obj)
|
||||
{
|
||||
return obj is VertexAttribDescriptor other && Equals(other);
|
||||
}
|
||||
|
||||
public bool Equals(VertexAttribDescriptor other)
|
||||
{
|
||||
return BufferIndex == other.BufferIndex &&
|
||||
Offset == other.Offset &&
|
||||
IsZero == other.IsZero &&
|
||||
Format == other.Format;
|
||||
}
|
||||
|
||||
public override int GetHashCode()
|
||||
{
|
||||
return HashCode.Combine(BufferIndex, Offset, IsZero, Format);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user