diff --git a/src/Ryujinx.Graphics.Vulkan/PipelineBase.cs b/src/Ryujinx.Graphics.Vulkan/PipelineBase.cs index b9ecbc0fe..c8ae2c359 100644 --- a/src/Ryujinx.Graphics.Vulkan/PipelineBase.cs +++ b/src/Ryujinx.Graphics.Vulkan/PipelineBase.cs @@ -1158,7 +1158,10 @@ namespace Ryujinx.Graphics.Vulkan DynamicState.ScissorsCount = count; - _newState.ScissorsCount = (uint)count; + if (!_supportExtDynamic) + { + _newState.ScissorsCount = (uint)count; + } SignalStateChange(); } diff --git a/src/Ryujinx.Graphics.Vulkan/PipelineConverter.cs b/src/Ryujinx.Graphics.Vulkan/PipelineConverter.cs index c3a7d4a8b..7ccd040e3 100644 --- a/src/Ryujinx.Graphics.Vulkan/PipelineConverter.cs +++ b/src/Ryujinx.Graphics.Vulkan/PipelineConverter.cs @@ -168,7 +168,6 @@ namespace Ryujinx.Graphics.Vulkan pipeline.DepthMode = state.DepthMode == DepthMode.MinusOneToOne; pipeline.HasDepthStencil = state.DepthStencilEnable; - pipeline.LineWidth = state.LineWidth; pipeline.LogicOpEnable = state.LogicOpEnable; pipeline.LogicOp = state.LogicOp.Convert(); @@ -181,17 +180,6 @@ namespace Ryujinx.Graphics.Vulkan pipeline.RasterizerDiscardEnable = state.RasterizerDiscard; pipeline.SamplesCount = (uint)state.SamplesCount; - if (gd.Capabilities.SupportsMultiView) - { - pipeline.ScissorsCount = Constants.MaxViewports; - pipeline.ViewportsCount = Constants.MaxViewports; - } - else - { - pipeline.ScissorsCount = 1; - pipeline.ViewportsCount = 1; - } - pipeline.DepthBiasEnable = state.BiasEnable != 0; // Stencil masks and ref are dynamic, so are 0 in the Vulkan pipeline. @@ -205,6 +193,17 @@ namespace Ryujinx.Graphics.Vulkan pipeline.FrontFace = state.FrontFace.Convert(); + if (gd.Capabilities.SupportsMultiView) + { + pipeline.ScissorsCount = Constants.MaxViewports; + pipeline.ViewportsCount = Constants.MaxViewports; + } + else + { + pipeline.ScissorsCount = 1; + pipeline.ViewportsCount = 1; + } + pipeline.StencilFrontFailOp = state.StencilTest.FrontSFail.Convert(); pipeline.StencilFrontPassOp = state.StencilTest.FrontDpPass.Convert(); pipeline.StencilFrontDepthFailOp = state.StencilTest.FrontDpFail.Convert(); @@ -216,10 +215,10 @@ namespace Ryujinx.Graphics.Vulkan pipeline.StencilBackCompareOp = state.StencilTest.BackFunc.Convert(); pipeline.StencilTestEnable = state.StencilTest.TestEnable; - - pipeline.Topology = gd.TopologyRemap(state.Topology).Convert(); } + pipeline.Topology = gd.TopologyRemap(state.Topology).Convert(); + int vaCount = Math.Min(Constants.MaxVertexAttributes, state.VertexAttribCount); int vbCount = Math.Min(Constants.MaxVertexBuffers, state.VertexBufferCount);