1
0
Fork 0
mirror of https://github.com/Ryujinx/Ryujinx.git synced 2024-12-25 18:56:01 +00:00

Set logicOp and DepthCompareOp only if enabled

This commit is contained in:
sunshineinabox 2024-07-23 22:03:47 -07:00
parent 2cba50a9ed
commit ea44670330

View file

@ -178,7 +178,7 @@ namespace Ryujinx.Graphics.Vulkan
if (!gd.ExtendedDynamicState2Features.ExtendedDynamicState2LogicOp)
{
pipeline.LogicOp = state.LogicOp.Convert();
pipeline.LogicOp = state.LogicOpEnable ? state.LogicOp.Convert() : default;
}
if (!gd.ExtendedDynamicState2Features.ExtendedDynamicState2PatchControlPoints)
@ -192,13 +192,9 @@ namespace Ryujinx.Graphics.Vulkan
if (!gd.Capabilities.SupportsExtendedDynamicState)
{
pipeline.DepthTestEnable = state.DepthTest.TestEnable;
pipeline.DepthWriteEnable = state.DepthTest.WriteEnable && state.DepthTest.TestEnable;
if (pipeline.DepthTestEnable)
{
pipeline.DepthWriteEnable = state.DepthTest.WriteEnable;
}
pipeline.DepthCompareOp = state.DepthTest.Func.Convert();
pipeline.DepthCompareOp = state.DepthTest.TestEnable ? state.DepthTest.Func.Convert() : default;
pipeline.CullMode = state.CullEnable ? state.CullMode.Convert() : CullModeFlags.None;