Set logicOp and DepthCompareOp only if enabled
This commit is contained in:
parent
2cba50a9ed
commit
ea44670330
1 changed files with 3 additions and 7 deletions
|
@ -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;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue