Avoid some redundant GL calls (#1958)
This commit is contained in:
parent
d6bd0470fb
commit
caf049ed15
6 changed files with 115 additions and 51 deletions
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue