mirror of
https://git.naxdy.org/Mirror/Ryujinx.git
synced 2024-12-26 10:33:05 +00:00
Avoid setting the dynamic state for feedback loop if it is not set avoids validation error. Also linewidth value is ignored if dynamic state is supported.
This commit is contained in:
parent
b557dc805b
commit
bc14efe5f1
1 changed files with 22 additions and 22 deletions
|
@ -495,11 +495,8 @@ namespace Ryujinx.Graphics.Vulkan
|
||||||
DepthClampEnable = DepthClampEnable,
|
DepthClampEnable = DepthClampEnable,
|
||||||
};
|
};
|
||||||
|
|
||||||
if (isMoltenVk)
|
// When widelines feature is not supported it must be 1.0f, this will be ignored if Line Width dynamic state is supported
|
||||||
{
|
rasterizationState.LineWidth = 1.0f;
|
||||||
// When widelines feature is not supported it must be 1.0f.
|
|
||||||
rasterizationState.LineWidth = 1.0f;
|
|
||||||
}
|
|
||||||
|
|
||||||
var viewportState = new PipelineViewportStateCreateInfo
|
var viewportState = new PipelineViewportStateCreateInfo
|
||||||
{
|
{
|
||||||
|
@ -661,9 +658,26 @@ namespace Ryujinx.Graphics.Vulkan
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (_supportsFeedBackLoopDynamicState)
|
PipelineCreateFlags pipelineCreateFlags = 0;
|
||||||
|
|
||||||
|
if (gd.Capabilities.SupportsAttachmentFeedbackLoop)
|
||||||
{
|
{
|
||||||
dynamicStates[dynamicStatesCount++] = DynamicState.AttachmentFeedbackLoopEnableExt;
|
FeedbackLoopAspects aspects = FeedbackLoopAspects;
|
||||||
|
|
||||||
|
if ((aspects & FeedbackLoopAspects.Color) != 0)
|
||||||
|
{
|
||||||
|
pipelineCreateFlags |= PipelineCreateFlags.CreateColorAttachmentFeedbackLoopBitExt;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ((aspects & FeedbackLoopAspects.Depth) != 0)
|
||||||
|
{
|
||||||
|
pipelineCreateFlags |= PipelineCreateFlags.CreateDepthStencilAttachmentFeedbackLoopBitExt;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (_supportsFeedBackLoopDynamicState && pipelineCreateFlags != 0)
|
||||||
|
{
|
||||||
|
dynamicStates[dynamicStatesCount++] = DynamicState.AttachmentFeedbackLoopEnableExt;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
var pipelineDynamicStateCreateInfo = new PipelineDynamicStateCreateInfo
|
var pipelineDynamicStateCreateInfo = new PipelineDynamicStateCreateInfo
|
||||||
|
@ -677,6 +691,7 @@ namespace Ryujinx.Graphics.Vulkan
|
||||||
{
|
{
|
||||||
SType = StructureType.GraphicsPipelineCreateInfo,
|
SType = StructureType.GraphicsPipelineCreateInfo,
|
||||||
StageCount = StagesCount,
|
StageCount = StagesCount,
|
||||||
|
Flags = pipelineCreateFlags,
|
||||||
PStages = Stages.Pointer,
|
PStages = Stages.Pointer,
|
||||||
PVertexInputState = &vertexInputState,
|
PVertexInputState = &vertexInputState,
|
||||||
PInputAssemblyState = &inputAssemblyState,
|
PInputAssemblyState = &inputAssemblyState,
|
||||||
|
@ -690,21 +705,6 @@ namespace Ryujinx.Graphics.Vulkan
|
||||||
RenderPass = renderPass,
|
RenderPass = renderPass,
|
||||||
};
|
};
|
||||||
|
|
||||||
if (gd.Capabilities.SupportsAttachmentFeedbackLoop && !_supportsFeedBackLoopDynamicState)
|
|
||||||
{
|
|
||||||
FeedbackLoopAspects aspects = FeedbackLoopAspects;
|
|
||||||
|
|
||||||
if ((aspects & FeedbackLoopAspects.Color) != 0)
|
|
||||||
{
|
|
||||||
pipelineCreateInfo.Flags |= PipelineCreateFlags.CreateColorAttachmentFeedbackLoopBitExt;
|
|
||||||
}
|
|
||||||
|
|
||||||
if ((aspects & FeedbackLoopAspects.Depth) != 0)
|
|
||||||
{
|
|
||||||
pipelineCreateInfo.Flags |= PipelineCreateFlags.CreateDepthStencilAttachmentFeedbackLoopBitExt;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!gd.Capabilities.SupportsExtendedDynamicState2.ExtendedDynamicState2PatchControlPoints)
|
if (!gd.Capabilities.SupportsExtendedDynamicState2.ExtendedDynamicState2PatchControlPoints)
|
||||||
{
|
{
|
||||||
pipelineCreateInfo.PTessellationState = &tessellationState;
|
pipelineCreateInfo.PTessellationState = &tessellationState;
|
||||||
|
|
Loading…
Reference in a new issue