From 9eb5b7a10de596f9817859b6f383968a54899924 Mon Sep 17 00:00:00 2001 From: gdkchan Date: Sun, 1 May 2022 11:12:34 -0300 Subject: [PATCH] Restrict cases where vertex buffer size from index buffer type is used (#3304) --- Ryujinx.Graphics.Gpu/Engine/Threed/StateUpdater.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Ryujinx.Graphics.Gpu/Engine/Threed/StateUpdater.cs b/Ryujinx.Graphics.Gpu/Engine/Threed/StateUpdater.cs index c9a18f14..3bc15a31 100644 --- a/Ryujinx.Graphics.Gpu/Engine/Threed/StateUpdater.cs +++ b/Ryujinx.Graphics.Gpu/Engine/Threed/StateUpdater.cs @@ -928,7 +928,7 @@ namespace Ryujinx.Graphics.Gpu.Engine.Threed size = endAddress.Pack() - address + 1; - if (stride > 0 && indexTypeSmall) + if (stride > 0 && indexTypeSmall && _drawState.DrawIndexed && !instanced) { // If the index type is a small integer type, then we might be still able // to reduce the vertex buffer size based on the maximum possible index value.