diff options
author | gdkchan <gab.dark.100@gmail.com> | 2021-10-12 18:46:42 -0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-10-12 23:46:42 +0200 |
commit | 464a92d8a7082a86552d8776256fa763ded227f4 (patch) | |
tree | 247d369575bc98d723e866507d5c6a27263c46ae | |
parent | a2c6cd51329a4b8fe4eba0d47cb4d4ce2084876d (diff) |
Force index buffer update for games using Vulkan (#2726)
-rw-r--r-- | Ryujinx.Graphics.Gpu/Engine/Threed/DrawManager.cs | 1 | ||||
-rw-r--r-- | Ryujinx.Graphics.Gpu/Engine/Threed/ThreedClass.cs | 9 |
2 files changed, 10 insertions, 0 deletions
diff --git a/Ryujinx.Graphics.Gpu/Engine/Threed/DrawManager.cs b/Ryujinx.Graphics.Gpu/Engine/Threed/DrawManager.cs index 82aff204..a060c6c9 100644 --- a/Ryujinx.Graphics.Gpu/Engine/Threed/DrawManager.cs +++ b/Ryujinx.Graphics.Gpu/Engine/Threed/DrawManager.cs @@ -312,6 +312,7 @@ namespace Ryujinx.Graphics.Gpu.Engine.Threed bool oldDrawIndexed = _drawState.DrawIndexed; _drawState.DrawIndexed = true; + engine.ForceStateDirty(IndexBufferCountMethodOffset * 4); DrawEnd(engine, firstIndex, indexCount); diff --git a/Ryujinx.Graphics.Gpu/Engine/Threed/ThreedClass.cs b/Ryujinx.Graphics.Gpu/Engine/Threed/ThreedClass.cs index 52637c20..5478704a 100644 --- a/Ryujinx.Graphics.Gpu/Engine/Threed/ThreedClass.cs +++ b/Ryujinx.Graphics.Gpu/Engine/Threed/ThreedClass.cs @@ -144,6 +144,15 @@ namespace Ryujinx.Graphics.Gpu.Engine.Threed } /// <summary> + /// Marks the specified register offset as dirty, forcing the associated state to update on the next draw. + /// </summary> + /// <param name="offset">Register offset</param> + public void ForceStateDirty(int offset) + { + _stateUpdater.SetDirty(offset); + } + + /// <summary> /// Forces the shaders to be rebound on the next draw. /// </summary> public void ForceShaderUpdate() |