LogicOps
This commit is contained in:
parent
49494b5b2d
commit
1a43536092
1 changed files with 14 additions and 11 deletions
|
@ -168,7 +168,6 @@ namespace Ryujinx.Graphics.Vulkan
|
||||||
pipeline.DepthMode = state.DepthMode == DepthMode.MinusOneToOne;
|
pipeline.DepthMode = state.DepthMode == DepthMode.MinusOneToOne;
|
||||||
|
|
||||||
pipeline.HasDepthStencil = state.DepthStencilEnable;
|
pipeline.HasDepthStencil = state.DepthStencilEnable;
|
||||||
pipeline.LogicOpEnable = state.LogicOpEnable;
|
|
||||||
|
|
||||||
pipeline.PolygonMode = PolygonMode.Fill; // Not implemented.
|
pipeline.PolygonMode = PolygonMode.Fill; // Not implemented.
|
||||||
|
|
||||||
|
@ -176,16 +175,6 @@ namespace Ryujinx.Graphics.Vulkan
|
||||||
pipeline.RasterizerDiscardEnable = extendedDynamicState2.ExtendedDynamicState2 ? false : state.RasterizerDiscard;
|
pipeline.RasterizerDiscardEnable = extendedDynamicState2.ExtendedDynamicState2 ? false : state.RasterizerDiscard;
|
||||||
pipeline.DepthBiasEnable = extendedDynamicState2.ExtendedDynamicState2 ? false : state.BiasEnable != 0;
|
pipeline.DepthBiasEnable = extendedDynamicState2.ExtendedDynamicState2 ? false : state.BiasEnable != 0;
|
||||||
|
|
||||||
|
|
||||||
if (!extendedDynamicState2.ExtendedDynamicState2LogicOp)
|
|
||||||
{
|
|
||||||
pipeline.LogicOp = state.LogicOpEnable ? state.LogicOp.Convert() : default;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
pipeline.LogicOp = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
pipeline.PatchControlPoints = extendedDynamicState2.ExtendedDynamicState2PatchControlPoints ? 0 : state.PatchControlPoints;
|
pipeline.PatchControlPoints = extendedDynamicState2.ExtendedDynamicState2PatchControlPoints ? 0 : state.PatchControlPoints;
|
||||||
|
|
||||||
pipeline.SamplesCount = (uint)state.SamplesCount;
|
pipeline.SamplesCount = (uint)state.SamplesCount;
|
||||||
|
@ -339,6 +328,20 @@ namespace Ryujinx.Graphics.Vulkan
|
||||||
pipeline.Internal.AttachmentIntegerFormatMask = attachmentIntegerFormatMask;
|
pipeline.Internal.AttachmentIntegerFormatMask = attachmentIntegerFormatMask;
|
||||||
pipeline.Internal.LogicOpsAllowed = attachmentCount == 0 || !allFormatsFloatOrSrgb;
|
pipeline.Internal.LogicOpsAllowed = attachmentCount == 0 || !allFormatsFloatOrSrgb;
|
||||||
|
|
||||||
|
bool logicOpEnable = state.LogicOpEnable &&
|
||||||
|
(gd.Vendor == Vendor.Nvidia || (attachmentCount == 0 || !allFormatsFloatOrSrgb));
|
||||||
|
|
||||||
|
pipeline.LogicOpEnable = logicOpEnable;
|
||||||
|
|
||||||
|
if (!extendedDynamicState2.ExtendedDynamicState2LogicOp)
|
||||||
|
{
|
||||||
|
pipeline.LogicOp = logicOpEnable ? state.LogicOp.Convert() : default;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
pipeline.LogicOp = 0;
|
||||||
|
}
|
||||||
|
|
||||||
return pipeline;
|
return pipeline;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue