Resolve validation error

This commit is contained in:
sunshineinabox 2024-09-14 01:12:35 -07:00
parent 6e132e9fd7
commit 72e57e4c6e
2 changed files with 8 additions and 5 deletions

View file

@ -1704,6 +1704,7 @@ namespace Ryujinx.Graphics.Vulkan
{ {
if (Gd.Capabilities.SupportsDynamicAttachmentFeedbackLoop) if (Gd.Capabilities.SupportsDynamicAttachmentFeedbackLoop)
{ {
_newState.FeedbackLoopDynamicState = true;
DynamicState.SetFeedbackLoop(aspects); DynamicState.SetFeedbackLoop(aspects);
} }
else if (Gd.Capabilities.SupportsAttachmentFeedbackLoop) else if (Gd.Capabilities.SupportsAttachmentFeedbackLoop)

View file

@ -246,6 +246,7 @@ namespace Ryujinx.Graphics.Vulkan
} }
public bool HasTessellationControlShader; public bool HasTessellationControlShader;
public bool FeedbackLoopDynamicState;
public NativeArray<PipelineShaderStageCreateInfo> Stages; public NativeArray<PipelineShaderStageCreateInfo> Stages;
public PipelineLayout PipelineLayout; public PipelineLayout PipelineLayout;
public SpecData SpecializationData; public SpecData SpecializationData;
@ -659,7 +660,7 @@ namespace Ryujinx.Graphics.Vulkan
PipelineCreateFlags pipelineCreateFlags = 0; PipelineCreateFlags pipelineCreateFlags = 0;
if (gd.Capabilities.SupportsAttachmentFeedbackLoop) if (gd.Capabilities.SupportsAttachmentFeedbackLoop && !_supportsFeedBackLoopDynamicState)
{ {
FeedbackLoopAspects aspects = FeedbackLoopAspects; FeedbackLoopAspects aspects = FeedbackLoopAspects;
@ -672,11 +673,12 @@ namespace Ryujinx.Graphics.Vulkan
{ {
pipelineCreateFlags |= PipelineCreateFlags.CreateDepthStencilAttachmentFeedbackLoopBitExt; pipelineCreateFlags |= PipelineCreateFlags.CreateDepthStencilAttachmentFeedbackLoopBitExt;
} }
}
if (_supportsFeedBackLoopDynamicState && pipelineCreateFlags != 0) if (_supportsFeedBackLoopDynamicState && FeedbackLoopDynamicState)
{ {
dynamicStates[dynamicStatesCount++] = DynamicState.AttachmentFeedbackLoopEnableExt; dynamicStates[dynamicStatesCount++] = DynamicState.AttachmentFeedbackLoopEnableExt;
} FeedbackLoopDynamicState = false;
} }
var pipelineDynamicStateCreateInfo = new PipelineDynamicStateCreateInfo var pipelineDynamicStateCreateInfo = new PipelineDynamicStateCreateInfo