Avoid setting depth bias state when not needed.
This commit is contained in:
parent
086656b736
commit
feb67dede6
2 changed files with 30 additions and 15 deletions
|
@ -880,8 +880,17 @@ namespace Ryujinx.Graphics.Vulkan
|
|||
|
||||
public void SetDepthBias(PolygonModeMask enables, float factor, float units, float clamp)
|
||||
{
|
||||
bool enable = enables != 0;
|
||||
DynamicState.SetDepthBias(factor, units, clamp, enable);
|
||||
bool enable = (enables != 0) && (factor > 0.0f || units > 0.0f);
|
||||
|
||||
if (enable)
|
||||
{
|
||||
DynamicState.SetDepthBias(factor, units, clamp);
|
||||
}
|
||||
|
||||
if (Gd.Capabilities.SupportsExtendedDynamicState2)
|
||||
{
|
||||
DynamicState.SetDepthBiasEnable(enable);
|
||||
}
|
||||
|
||||
_newState.DepthBiasEnable = enable;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue