From 92f8d211c6f724617f1769da483b1fd5ce1e2766 Mon Sep 17 00:00:00 2001 From: sunshineinabox Date: Sun, 22 Sep 2024 17:25:34 -0700 Subject: [PATCH] As SetPrimitiveTopology will call SignalStateChange so no need to call it again. --- src/Ryujinx.Graphics.Vulkan/PipelineBase.cs | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/Ryujinx.Graphics.Vulkan/PipelineBase.cs b/src/Ryujinx.Graphics.Vulkan/PipelineBase.cs index 5f3158a342..28c37af40e 100644 --- a/src/Ryujinx.Graphics.Vulkan/PipelineBase.cs +++ b/src/Ryujinx.Graphics.Vulkan/PipelineBase.cs @@ -658,7 +658,7 @@ namespace Ryujinx.Graphics.Vulkan bool oldStencilTestEnable; bool oldDepthTestEnable; bool oldDepthWriteEnable; - Silk.NET.Vulkan.PrimitiveTopology oldTopology; + PrimitiveTopology oldTopology; Array16 oldViewports = DynamicState.Viewports; uint oldViewportsCount; @@ -668,7 +668,7 @@ namespace Ryujinx.Graphics.Vulkan oldStencilTestEnable = DynamicState.StencilTestEnable; oldDepthTestEnable = DynamicState.DepthTestEnable; oldDepthWriteEnable = DynamicState.DepthWriteEnable; - oldTopology = DynamicState.Topology; + oldTopology = _topology; oldViewportsCount = DynamicState.ViewportsCount; } else @@ -705,8 +705,6 @@ namespace Ryujinx.Graphics.Vulkan srcRegion, dstRegion); - SetPrimitiveTopology(oldTopology); - if (_supportExtDynamic) { DynamicState.SetCullMode(oldCullMode); @@ -722,9 +720,9 @@ namespace Ryujinx.Graphics.Vulkan _newState.ViewportsCount = oldViewportsCount; } - DynamicState.SetViewports(ref oldViewports, oldViewportsCount); + SetPrimitiveTopology(oldTopology); - SignalStateChange(); + DynamicState.SetViewports(ref oldViewports, oldViewportsCount); } }