Partially revert previous commit as no need to set depthbias dynamically if depthbias is not enabled.

This commit is contained in:
sunshineinabox 2024-07-21 15:59:04 -07:00
parent 48ad342ee9
commit ab9025286d

View file

@ -793,22 +793,24 @@ namespace Ryujinx.Graphics.Vulkan
} }
bool depthBiasEnable = (enables != PolygonModeMask.None) && (factor != 0 && units != 0); bool depthBiasEnable = (enables != PolygonModeMask.None) && (factor != 0 && units != 0);
bool changed = false;
if (_newState.DepthBiasEnable != depthBiasEnable) if (_newState.DepthBiasEnable != depthBiasEnable)
{ {
_newState.DepthBiasEnable = depthBiasEnable; _newState.DepthBiasEnable = depthBiasEnable;
changed = true;
} }
if (depthBiasEnable) if (depthBiasEnable)
{ {
DynamicState.SetDepthBias(factor, units, clamp); DynamicState.SetDepthBias(factor, units, clamp);
} changed = true;
else
{
DynamicState.SetDepthBias(0, 0, 0);
} }
SignalStateChange(); if (changed)
{
SignalStateChange();
}
} }
public void SetDepthClamp(bool clamp) public void SetDepthClamp(bool clamp)