mirror of
https://git.naxdy.org/Mirror/Ryujinx.git
synced 2024-12-27 02:53:04 +00:00
Only pass Tesselation state create info if dynamic state is not supported
This commit is contained in:
parent
693f268090
commit
da11dc1288
1 changed files with 7 additions and 5 deletions
|
@ -427,13 +427,11 @@ namespace Ryujinx.Graphics.Vulkan
|
||||||
Topology = supportsExtDynamicState ? TopologyClass : Topology,
|
Topology = supportsExtDynamicState ? TopologyClass : Topology,
|
||||||
};
|
};
|
||||||
|
|
||||||
var tessellationState = new PipelineTessellationStateCreateInfo
|
PipelineTessellationStateCreateInfo tessellationState;
|
||||||
{
|
|
||||||
SType = StructureType.PipelineTessellationStateCreateInfo,
|
|
||||||
};
|
|
||||||
|
|
||||||
if (!gd.ExtendedDynamicState2Features.ExtendedDynamicState2PatchControlPoints)
|
if (!gd.ExtendedDynamicState2Features.ExtendedDynamicState2PatchControlPoints)
|
||||||
{
|
{
|
||||||
|
tessellationState.SType = StructureType.PipelineTessellationStateCreateInfo;
|
||||||
tessellationState.PatchControlPoints = PatchControlPoints;
|
tessellationState.PatchControlPoints = PatchControlPoints;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -663,7 +661,6 @@ namespace Ryujinx.Graphics.Vulkan
|
||||||
PStages = Stages.Pointer,
|
PStages = Stages.Pointer,
|
||||||
PVertexInputState = &vertexInputState,
|
PVertexInputState = &vertexInputState,
|
||||||
PInputAssemblyState = &inputAssemblyState,
|
PInputAssemblyState = &inputAssemblyState,
|
||||||
PTessellationState = &tessellationState,
|
|
||||||
PViewportState = &viewportState,
|
PViewportState = &viewportState,
|
||||||
PRasterizationState = &rasterizationState,
|
PRasterizationState = &rasterizationState,
|
||||||
PMultisampleState = &multisampleState,
|
PMultisampleState = &multisampleState,
|
||||||
|
@ -674,6 +671,11 @@ namespace Ryujinx.Graphics.Vulkan
|
||||||
RenderPass = renderPass,
|
RenderPass = renderPass,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
if (!gd.ExtendedDynamicState2Features.ExtendedDynamicState2PatchControlPoints)
|
||||||
|
{
|
||||||
|
pipelineCreateInfo.PTessellationState = &tessellationState;
|
||||||
|
}
|
||||||
|
|
||||||
Result result = gd.Api.CreateGraphicsPipelines(device, cache, 1, &pipelineCreateInfo, null, &pipelineHandle);
|
Result result = gd.Api.CreateGraphicsPipelines(device, cache, 1, &pipelineCreateInfo, null, &pipelineHandle);
|
||||||
|
|
||||||
if (throwOnError)
|
if (throwOnError)
|
||||||
|
|
Loading…
Reference in a new issue