mirror of
https://github.com/Ryujinx/Ryujinx.git
synced 2024-11-10 10:11:45 +00:00
Fix draw indexed flag not being cleared for instanced draws, also avoid state updates in the middle of a indexed draw
This commit is contained in:
parent
23b8a86d35
commit
375ee0ba96
1 changed files with 18 additions and 12 deletions
|
@ -26,13 +26,18 @@ namespace Ryujinx.Graphics.Gpu.Engine
|
||||||
|
|
||||||
private void DrawEnd(GpuState state, int argument)
|
private void DrawEnd(GpuState state, int argument)
|
||||||
{
|
{
|
||||||
|
if (_instancedDrawPending)
|
||||||
|
{
|
||||||
|
_drawIndexed = false;
|
||||||
|
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
UpdateState(state);
|
UpdateState(state);
|
||||||
|
|
||||||
bool instanced = _vsUsesInstanceId || _isAnyVbInstanced;
|
bool instanced = _vsUsesInstanceId || _isAnyVbInstanced;
|
||||||
|
|
||||||
if (instanced)
|
if (instanced)
|
||||||
{
|
|
||||||
if (!_instancedDrawPending)
|
|
||||||
{
|
{
|
||||||
_instancedDrawPending = true;
|
_instancedDrawPending = true;
|
||||||
|
|
||||||
|
@ -48,7 +53,8 @@ namespace Ryujinx.Graphics.Gpu.Engine
|
||||||
|
|
||||||
_instancedDrawStateFirst = drawState.First;
|
_instancedDrawStateFirst = drawState.First;
|
||||||
_instancedDrawStateCount = drawState.Count;
|
_instancedDrawStateCount = drawState.Count;
|
||||||
}
|
|
||||||
|
_drawIndexed = false;
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue