diff options
Diffstat (limited to 'Ryujinx.Graphics.OpenGL/VertexArray.cs')
-rw-r--r-- | Ryujinx.Graphics.OpenGL/VertexArray.cs | 40 |
1 files changed, 0 insertions, 40 deletions
diff --git a/Ryujinx.Graphics.OpenGL/VertexArray.cs b/Ryujinx.Graphics.OpenGL/VertexArray.cs index d466199d..7d22033e 100644 --- a/Ryujinx.Graphics.OpenGL/VertexArray.cs +++ b/Ryujinx.Graphics.OpenGL/VertexArray.cs @@ -10,13 +10,9 @@ namespace Ryujinx.Graphics.OpenGL { public int Handle { get; private set; } - private bool _needsAttribsUpdate; - private readonly VertexAttribDescriptor[] _vertexAttribs; private readonly VertexBufferDescriptor[] _vertexBuffers; - private int _vertexAttribsCount; - private int _vertexBuffersCount; private int _minVertexCount; private uint _vertexAttribsInUse; @@ -76,9 +72,7 @@ namespace Ryujinx.Graphics.OpenGL _vertexBuffers[bindingIndex] = vb; } - _vertexBuffersCount = bindingIndex; _minVertexCount = minVertexCount; - _needsAttribsUpdate = true; } public void SetVertexAttributes(ReadOnlySpan<VertexAttribDescriptor> vertexAttribs) @@ -131,8 +125,6 @@ namespace Ryujinx.Graphics.OpenGL _vertexAttribs[index] = attrib; } - _vertexAttribsCount = index; - for (; index < Constants.MaxVertexAttribs; index++) { DisableVertexAttrib(index); @@ -160,13 +152,11 @@ namespace Ryujinx.Graphics.OpenGL public void PreDraw(int vertexCount) { LimitVertexBuffers(vertexCount); - Validate(); } public void PreDrawVbUnbounded() { UnlimitVertexBuffers(); - Validate(); } public void LimitVertexBuffers(int vertexCount) @@ -252,36 +242,6 @@ namespace Ryujinx.Graphics.OpenGL _vertexBuffersLimited = 0; } - public void Validate() - { - for (int attribIndex = 0; attribIndex < _vertexAttribsCount; attribIndex++) - { - VertexAttribDescriptor attrib = _vertexAttribs[attribIndex]; - - if (!attrib.IsZero) - { - if ((uint)attrib.BufferIndex >= _vertexBuffersCount) - { - DisableVertexAttrib(attribIndex); - continue; - } - - if (_vertexBuffers[attrib.BufferIndex].Buffer.Handle == BufferHandle.Null) - { - DisableVertexAttrib(attribIndex); - continue; - } - - if (_needsAttribsUpdate) - { - EnableVertexAttrib(attribIndex); - } - } - } - - _needsAttribsUpdate = false; - } - [MethodImpl(MethodImplOptions.AggressiveInlining)] private void EnableVertexAttrib(int index) { |