Consolidate some checks
This commit is contained in:
parent
1adae7794a
commit
4b504243d8
1 changed files with 13 additions and 10 deletions
|
@ -396,6 +396,15 @@ namespace Ryujinx.Graphics.Vulkan
|
||||||
return pipeline;
|
return pipeline;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Using patches topology without a tessellation shader is invalid.
|
||||||
|
// If we find such a case, return null pipeline to skip the draw.
|
||||||
|
if (Topology == PrimitiveTopology.PatchList && !HasTessellationControlShader)
|
||||||
|
{
|
||||||
|
program.AddGraphicsPipeline(ref Internal, null);
|
||||||
|
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
Pipeline pipelineHandle = default;
|
Pipeline pipelineHandle = default;
|
||||||
|
|
||||||
bool isMoltenVk = gd.IsMoltenVk;
|
bool isMoltenVk = gd.IsMoltenVk;
|
||||||
|
@ -417,20 +426,10 @@ namespace Ryujinx.Graphics.Vulkan
|
||||||
{
|
{
|
||||||
SType = StructureType.PipelineVertexInputStateCreateInfo,
|
SType = StructureType.PipelineVertexInputStateCreateInfo,
|
||||||
VertexAttributeDescriptionCount = VertexAttributeDescriptionsCount,
|
VertexAttributeDescriptionCount = VertexAttributeDescriptionsCount,
|
||||||
PVertexAttributeDescriptions = isMoltenVk ? pVertexAttributeDescriptions2 : pVertexAttributeDescriptions,
|
|
||||||
VertexBindingDescriptionCount = VertexBindingDescriptionsCount,
|
VertexBindingDescriptionCount = VertexBindingDescriptionsCount,
|
||||||
PVertexBindingDescriptions = pVertexBindingDescriptions,
|
PVertexBindingDescriptions = pVertexBindingDescriptions,
|
||||||
};
|
};
|
||||||
|
|
||||||
// Using patches topology without a tessellation shader is invalid.
|
|
||||||
// If we find such a case, return null pipeline to skip the draw.
|
|
||||||
if (Topology == PrimitiveTopology.PatchList && !HasTessellationControlShader)
|
|
||||||
{
|
|
||||||
program.AddGraphicsPipeline(ref Internal, null);
|
|
||||||
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
var inputAssemblyState = new PipelineInputAssemblyStateCreateInfo
|
var inputAssemblyState = new PipelineInputAssemblyStateCreateInfo
|
||||||
{
|
{
|
||||||
SType = StructureType.PipelineInputAssemblyStateCreateInfo,
|
SType = StructureType.PipelineInputAssemblyStateCreateInfo,
|
||||||
|
@ -456,6 +455,8 @@ namespace Ryujinx.Graphics.Vulkan
|
||||||
|
|
||||||
if (isMoltenVk)
|
if (isMoltenVk)
|
||||||
{
|
{
|
||||||
|
vertexInputState.PVertexAttributeDescriptions = pVertexAttributeDescriptions2;
|
||||||
|
|
||||||
//When widelines feature is not supported it must be 1.0f per spec.
|
//When widelines feature is not supported it must be 1.0f per spec.
|
||||||
rasterizationState.LineWidth = 1.0f;
|
rasterizationState.LineWidth = 1.0f;
|
||||||
}
|
}
|
||||||
|
@ -584,6 +585,8 @@ namespace Ryujinx.Graphics.Vulkan
|
||||||
|
|
||||||
if (!isMoltenVk)
|
if (!isMoltenVk)
|
||||||
{
|
{
|
||||||
|
vertexInputState.PVertexAttributeDescriptions = pVertexAttributeDescriptions;
|
||||||
|
|
||||||
baseDynamicStatesCount++;
|
baseDynamicStatesCount++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue