Use dictionary instead for clarity and rework some logic.
This commit is contained in:
parent
7ac2cd44d0
commit
4a3932ed54
3 changed files with 29 additions and 34 deletions
|
@ -391,11 +391,6 @@ namespace Ryujinx.Graphics.Vulkan
|
|||
RenderPass renderPass,
|
||||
bool throwOnError = false)
|
||||
{
|
||||
if (program.TryGetGraphicsPipeline(ref Internal, out var 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)
|
||||
|
@ -405,6 +400,11 @@ namespace Ryujinx.Graphics.Vulkan
|
|||
return null;
|
||||
}
|
||||
|
||||
if (program.TryGetGraphicsPipeline(ref Internal, out var pipeline))
|
||||
{
|
||||
return pipeline;
|
||||
}
|
||||
|
||||
Pipeline pipelineHandle = default;
|
||||
|
||||
bool isMoltenVk = gd.IsMoltenVk;
|
||||
|
@ -426,6 +426,7 @@ namespace Ryujinx.Graphics.Vulkan
|
|||
{
|
||||
SType = StructureType.PipelineVertexInputStateCreateInfo,
|
||||
VertexAttributeDescriptionCount = VertexAttributeDescriptionsCount,
|
||||
PVertexAttributeDescriptions = isMoltenVk ? pVertexAttributeDescriptions2 : pVertexAttributeDescriptions,
|
||||
VertexBindingDescriptionCount = VertexBindingDescriptionsCount,
|
||||
PVertexBindingDescriptions = pVertexBindingDescriptions,
|
||||
};
|
||||
|
@ -455,8 +456,6 @@ 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;
|
||||
}
|
||||
|
@ -585,8 +584,6 @@ namespace Ryujinx.Graphics.Vulkan
|
|||
|
||||
if (!isMoltenVk)
|
||||
{
|
||||
vertexInputState.PVertexAttributeDescriptions = pVertexAttributeDescriptions;
|
||||
|
||||
baseDynamicStatesCount++;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue