From cee5ae5551c3142e76a00f0ba73a907fe7764d68 Mon Sep 17 00:00:00 2001 From: sunshineinabox Date: Thu, 16 May 2024 22:59:37 -0700 Subject: [PATCH] Some missed values --- src/Ryujinx.Graphics.Vulkan/PipelineBase.cs | 5 +++- .../PipelineConverter.cs | 27 +++++++++---------- 2 files changed, 17 insertions(+), 15 deletions(-) diff --git a/src/Ryujinx.Graphics.Vulkan/PipelineBase.cs b/src/Ryujinx.Graphics.Vulkan/PipelineBase.cs index 0425d17bdb..0fee64770f 100644 --- a/src/Ryujinx.Graphics.Vulkan/PipelineBase.cs +++ b/src/Ryujinx.Graphics.Vulkan/PipelineBase.cs @@ -1159,7 +1159,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 d0344ee4bb..9bc16b4de8 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);