From ce450dc08eda23a5419fb7ac157326ca1d0246e3 Mon Sep 17 00:00:00 2001 From: sunshineinabox Date: Fri, 2 Aug 2024 07:27:44 -0700 Subject: [PATCH] Invert logic to only set flags dirty if those are supported. --- .../PipelineDynamicState.cs | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/Ryujinx.Graphics.Vulkan/PipelineDynamicState.cs b/src/Ryujinx.Graphics.Vulkan/PipelineDynamicState.cs index dbcd3814d..623c47fac 100644 --- a/src/Ryujinx.Graphics.Vulkan/PipelineDynamicState.cs +++ b/src/Ryujinx.Graphics.Vulkan/PipelineDynamicState.cs @@ -80,7 +80,7 @@ namespace Ryujinx.Graphics.Vulkan DepthBiasEnable = 1 << 16, Standard = Blend | DepthBias | Scissor | Stencil | Viewport | LineWidth, Extended = CullMode | FrontFace | DepthTestBool | DepthTestCompareOp | StencilTestEnableandStencilOp | PrimitiveTopology, - Extended2 = RasterDiscard | LogicOp | PatchControlPoints | PrimitiveRestart | DepthBiasEnable, + Extended2 = RasterDiscard | PrimitiveRestart | DepthBiasEnable, } private DirtyFlags _dirty; @@ -247,19 +247,19 @@ namespace Ryujinx.Graphics.Vulkan _dirty |= DirtyFlags.Extended2; } - if (gd.IsMoltenVk) + if (!gd.IsMoltenVk) { - _dirty &= ~DirtyFlags.LineWidth; + _dirty |= DirtyFlags.LineWidth; } - if (!gd.Capabilities.SupportsExtendedDynamicState2.ExtendedDynamicState2LogicOp) + if (gd.Capabilities.SupportsExtendedDynamicState2.ExtendedDynamicState2LogicOp) { - _dirty &= ~DirtyFlags.LogicOp; + _dirty |= DirtyFlags.LogicOp; } - if (!gd.Capabilities.SupportsExtendedDynamicState2.ExtendedDynamicState2PatchControlPoints) + if (gd.Capabilities.SupportsExtendedDynamicState2.ExtendedDynamicState2PatchControlPoints) { - _dirty &= ~DirtyFlags.PatchControlPoints; + _dirty |= DirtyFlags.PatchControlPoints; } }