diff options
| author | gdk <gab.dark.100@gmail.com> | 2019-10-26 14:50:52 -0300 |
|---|---|---|
| committer | Thog <thog@protonmail.com> | 2020-01-09 02:13:00 +0100 |
| commit | 8cba252b238ee6cf6599ad2fc57793e6f76c5e2e (patch) | |
| tree | 5ee98eb374a46e210d4a960f5e1d58b42b3f27eb /Ryujinx.Graphics.Gpu/Engine/MethodDraw.cs | |
| parent | 1b7d95519569639135a68e7ebda5148f3263217c (diff) | |
Add per-source type memory change tracking, simplified state change tracking, other fixes
Diffstat (limited to 'Ryujinx.Graphics.Gpu/Engine/MethodDraw.cs')
| -rw-r--r-- | Ryujinx.Graphics.Gpu/Engine/MethodDraw.cs | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/Ryujinx.Graphics.Gpu/Engine/MethodDraw.cs b/Ryujinx.Graphics.Gpu/Engine/MethodDraw.cs index c340aeb8..ee07ca76 100644 --- a/Ryujinx.Graphics.Gpu/Engine/MethodDraw.cs +++ b/Ryujinx.Graphics.Gpu/Engine/MethodDraw.cs @@ -39,12 +39,12 @@ namespace Ryujinx.Graphics.Gpu.Engine _instancedIndexed = _drawIndexed; _instancedFirstIndex = _firstIndex; - _instancedFirstVertex = _context.State.GetBaseVertex(); - _instancedFirstInstance = _context.State.GetBaseInstance(); + _instancedFirstVertex = _context.State.Get<int>(MethodOffset.FirstVertex); + _instancedFirstInstance = _context.State.Get<int>(MethodOffset.FirstInstance); _instancedIndexCount = _indexCount; - VertexBufferDrawState drawState = _context.State.GetVertexBufferDrawState(); + var drawState = _context.State.Get<VertexBufferDrawState>(MethodOffset.VertexBufferDrawState); _instancedDrawStateFirst = drawState.First; _instancedDrawStateCount = drawState.Count; @@ -53,13 +53,13 @@ namespace Ryujinx.Graphics.Gpu.Engine return; } - int firstInstance = _context.State.GetBaseInstance(); + int firstInstance = _context.State.Get<int>(MethodOffset.FirstInstance); if (_drawIndexed) { _drawIndexed = false; - int firstVertex = _context.State.GetBaseVertex(); + int firstVertex = _context.State.Get<int>(MethodOffset.FirstVertex); _context.Renderer.Pipeline.DrawIndexed( _indexCount, @@ -70,7 +70,7 @@ namespace Ryujinx.Graphics.Gpu.Engine } else { - VertexBufferDrawState drawState = _context.State.GetVertexBufferDrawState(); + var drawState = _context.State.Get<VertexBufferDrawState>(MethodOffset.VertexBufferDrawState); _context.Renderer.Pipeline.Draw( drawState.Count, @@ -98,7 +98,7 @@ namespace Ryujinx.Graphics.Gpu.Engine } } - private void SetIndexCount(int argument) + private void SetIndexBufferCount(int argument) { _drawIndexed = true; } |
