mirror of
https://git.naxdy.org/Mirror/Ryujinx.git
synced 2024-12-27 02:53:04 +00:00
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;
|
||||
}
|
||||
|
||||
// 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;
|
||||
|
||||
bool isMoltenVk = gd.IsMoltenVk;
|
||||
|
@ -417,20 +426,10 @@ namespace Ryujinx.Graphics.Vulkan
|
|||
{
|
||||
SType = StructureType.PipelineVertexInputStateCreateInfo,
|
||||
VertexAttributeDescriptionCount = VertexAttributeDescriptionsCount,
|
||||
PVertexAttributeDescriptions = isMoltenVk ? pVertexAttributeDescriptions2 : pVertexAttributeDescriptions,
|
||||
VertexBindingDescriptionCount = VertexBindingDescriptionsCount,
|
||||
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
|
||||
{
|
||||
SType = StructureType.PipelineInputAssemblyStateCreateInfo,
|
||||
|
@ -456,6 +455,8 @@ namespace Ryujinx.Graphics.Vulkan
|
|||
|
||||
if (isMoltenVk)
|
||||
{
|
||||
vertexInputState.PVertexAttributeDescriptions = pVertexAttributeDescriptions2;
|
||||
|
||||
//When widelines feature is not supported it must be 1.0f per spec.
|
||||
rasterizationState.LineWidth = 1.0f;
|
||||
}
|
||||
|
@ -584,6 +585,8 @@ namespace Ryujinx.Graphics.Vulkan
|
|||
|
||||
if (!isMoltenVk)
|
||||
{
|
||||
vertexInputState.PVertexAttributeDescriptions = pVertexAttributeDescriptions;
|
||||
|
||||
baseDynamicStatesCount++;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue