Avoid changing feedback loop aspect if extension is not supported prevents failed pipeline compiles (or seemingly incompatible)

This commit is contained in:
sunshineinabox 2024-09-01 19:21:44 -07:00
parent 3f900e6fa0
commit 09b8095584
3 changed files with 10 additions and 1 deletions

View File

@ -1721,6 +1721,11 @@ namespace Ryujinx.Graphics.Vulkan
[MethodImpl(MethodImplOptions.AggressiveInlining)]
private bool UpdateFeedbackLoop()
{
if (!Gd.Capabilities.SupportsAttachmentFeedbackLoop)
{
return false;
}
List<TextureView> hazards = _descriptorSetUpdater.FeedbackLoopHazards;
if ((hazards?.Count ?? 0) > 0)
@ -1765,7 +1770,7 @@ namespace Ryujinx.Graphics.Vulkan
}
// Stencil test being enabled doesn't necessarily mean a write, but it's not critical to check.
_passWritesDepthStencil |= (_newState.DepthTestEnable && _newState.DepthWriteEnable) || _newState.StencilTestEnable;
_passWritesDepthStencil |= _supportExtDynamic ? (DynamicState.DepthTestEnable && DynamicState.DepthWriteEnable) || _newState.StencilTestEnable : (_newState.DepthTestEnable && _newState.DepthWriteEnable) || _newState.StencilTestEnable;
}
private bool RecreateGraphicsPipelineIfNeeded()

View File

@ -166,6 +166,8 @@ namespace Ryujinx.Graphics.Vulkan
pipeline.DepthClampEnable = state.DepthClampEnable;
pipeline.FeedbackLoopAspects = FeedbackLoopAspects.None;
pipeline.DepthMode = state.DepthMode == DepthMode.MinusOneToOne;
pipeline.HasDepthStencil = state.DepthStencilEnable;

View File

@ -273,6 +273,8 @@ namespace Ryujinx.Graphics.Vulkan
PolygonMode = PolygonMode.Fill;
DepthBoundsTestEnable = false;
FeedbackLoopAspects = FeedbackLoopAspects.None;
_supportsExtDynamicState = supportsExtDynamicState;
_supportsExtDynamicState2 = extendedDynamicState2;