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