From ab9025286dad99900ec885a9436b0635fe93b8d5 Mon Sep 17 00:00:00 2001 From: sunshineinabox Date: Sun, 21 Jul 2024 15:59:04 -0700 Subject: [PATCH] Partially revert previous commit as no need to set depthbias dynamically if depthbias is not enabled. --- src/Ryujinx.Graphics.Vulkan/PipelineBase.cs | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/Ryujinx.Graphics.Vulkan/PipelineBase.cs b/src/Ryujinx.Graphics.Vulkan/PipelineBase.cs index 795a1f2ea3..275ec92285 100644 --- a/src/Ryujinx.Graphics.Vulkan/PipelineBase.cs +++ b/src/Ryujinx.Graphics.Vulkan/PipelineBase.cs @@ -793,22 +793,24 @@ namespace Ryujinx.Graphics.Vulkan } bool depthBiasEnable = (enables != PolygonModeMask.None) && (factor != 0 && units != 0); + bool changed = false; if (_newState.DepthBiasEnable != depthBiasEnable) { _newState.DepthBiasEnable = depthBiasEnable; + changed = true; } if (depthBiasEnable) { DynamicState.SetDepthBias(factor, units, clamp); - } - else - { - DynamicState.SetDepthBias(0, 0, 0); + changed = true; } - SignalStateChange(); + if (changed) + { + SignalStateChange(); + } } public void SetDepthClamp(bool clamp)