From 72e57e4c6e178cffaf8b1b2ddabfb7938c22f396 Mon Sep 17 00:00:00 2001 From: sunshineinabox Date: Sat, 14 Sep 2024 01:12:35 -0700 Subject: [PATCH] Resolve validation error --- src/Ryujinx.Graphics.Vulkan/PipelineBase.cs | 1 + src/Ryujinx.Graphics.Vulkan/PipelineState.cs | 12 +++++++----- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/src/Ryujinx.Graphics.Vulkan/PipelineBase.cs b/src/Ryujinx.Graphics.Vulkan/PipelineBase.cs index 1716469179..1bf9d31f87 100644 --- a/src/Ryujinx.Graphics.Vulkan/PipelineBase.cs +++ b/src/Ryujinx.Graphics.Vulkan/PipelineBase.cs @@ -1704,6 +1704,7 @@ namespace Ryujinx.Graphics.Vulkan { if (Gd.Capabilities.SupportsDynamicAttachmentFeedbackLoop) { + _newState.FeedbackLoopDynamicState = true; DynamicState.SetFeedbackLoop(aspects); } else if (Gd.Capabilities.SupportsAttachmentFeedbackLoop) diff --git a/src/Ryujinx.Graphics.Vulkan/PipelineState.cs b/src/Ryujinx.Graphics.Vulkan/PipelineState.cs index 1e12dead6e..50f24f7d25 100644 --- a/src/Ryujinx.Graphics.Vulkan/PipelineState.cs +++ b/src/Ryujinx.Graphics.Vulkan/PipelineState.cs @@ -246,6 +246,7 @@ namespace Ryujinx.Graphics.Vulkan } public bool HasTessellationControlShader; + public bool FeedbackLoopDynamicState; public NativeArray Stages; public PipelineLayout PipelineLayout; public SpecData SpecializationData; @@ -659,7 +660,7 @@ namespace Ryujinx.Graphics.Vulkan PipelineCreateFlags pipelineCreateFlags = 0; - if (gd.Capabilities.SupportsAttachmentFeedbackLoop) + if (gd.Capabilities.SupportsAttachmentFeedbackLoop && !_supportsFeedBackLoopDynamicState) { FeedbackLoopAspects aspects = FeedbackLoopAspects; @@ -672,11 +673,12 @@ namespace Ryujinx.Graphics.Vulkan { pipelineCreateFlags |= PipelineCreateFlags.CreateDepthStencilAttachmentFeedbackLoopBitExt; } + } - if (_supportsFeedBackLoopDynamicState && pipelineCreateFlags != 0) - { - dynamicStates[dynamicStatesCount++] = DynamicState.AttachmentFeedbackLoopEnableExt; - } + if (_supportsFeedBackLoopDynamicState && FeedbackLoopDynamicState) + { + dynamicStates[dynamicStatesCount++] = DynamicState.AttachmentFeedbackLoopEnableExt; + FeedbackLoopDynamicState = false; } var pipelineDynamicStateCreateInfo = new PipelineDynamicStateCreateInfo