1
0
Fork 0
mirror of https://github.com/Ryujinx/Ryujinx.git synced 2024-11-18 12:16:39 +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) if (!gd.ExtendedDynamicState2Features.ExtendedDynamicState2LogicOp)
{ {
pipeline.LogicOp = state.LogicOp.Convert(); pipeline.LogicOp = state.LogicOpEnable ? state.LogicOp.Convert() : default;
} }
if (!gd.ExtendedDynamicState2Features.ExtendedDynamicState2PatchControlPoints) if (!gd.ExtendedDynamicState2Features.ExtendedDynamicState2PatchControlPoints)
@ -192,13 +192,9 @@ namespace Ryujinx.Graphics.Vulkan
if (!gd.Capabilities.SupportsExtendedDynamicState) if (!gd.Capabilities.SupportsExtendedDynamicState)
{ {
pipeline.DepthTestEnable = state.DepthTest.TestEnable; pipeline.DepthTestEnable = state.DepthTest.TestEnable;
pipeline.DepthWriteEnable = state.DepthTest.WriteEnable && state.DepthTest.TestEnable;
if (pipeline.DepthTestEnable) pipeline.DepthCompareOp = state.DepthTest.TestEnable ? state.DepthTest.Func.Convert() : default;
{
pipeline.DepthWriteEnable = state.DepthTest.WriteEnable;
}
pipeline.DepthCompareOp = state.DepthTest.Func.Convert();
pipeline.CullMode = state.CullEnable ? state.CullMode.Convert() : CullModeFlags.None; pipeline.CullMode = state.CullEnable ? state.CullMode.Convert() : CullModeFlags.None;