0
0
Fork 0
mirror of https://github.com/GreemDev/Ryujinx.git synced 2024-12-23 08:05:47 +00:00

Force index buffer update for games using Vulkan (#2726)

This commit is contained in:
gdkchan 2021-10-12 18:46:42 -03:00 committed by GitHub
parent a2c6cd5132
commit 464a92d8a7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 0 deletions

View file

@ -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);

View file

@ -143,6 +143,15 @@ namespace Ryujinx.Graphics.Gpu.Engine.Threed
_stateUpdater.SetAllDirty();
}
/// <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>