Remove redundant logic, just use max possible dynamic states
This commit is contained in:
parent
38c9ec925c
commit
1bcc9c029a
1 changed files with 2 additions and 30 deletions
|
@ -565,34 +565,7 @@ namespace Ryujinx.Graphics.Vulkan
|
||||||
colorBlendState.PNext = &colorBlendAdvancedState;
|
colorBlendState.PNext = &colorBlendAdvancedState;
|
||||||
}
|
}
|
||||||
|
|
||||||
int baseDynamicStatesCount = 7;
|
DynamicState* dynamicStates = stackalloc DynamicState[22];
|
||||||
int additionalDynamicStatesCount = 0;
|
|
||||||
|
|
||||||
if (!isMoltenVk)
|
|
||||||
{
|
|
||||||
baseDynamicStatesCount++;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (supportsExtDynamicState)
|
|
||||||
{
|
|
||||||
additionalDynamicStatesCount += isMoltenVk ? 8 : 9;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (supportsExtDynamicState2)
|
|
||||||
{
|
|
||||||
additionalDynamicStatesCount += 3;
|
|
||||||
if (gd.ExtendedDynamicState2Features.ExtendedDynamicState2LogicOp)
|
|
||||||
{
|
|
||||||
additionalDynamicStatesCount++;
|
|
||||||
}
|
|
||||||
if (gd.ExtendedDynamicState2Features.ExtendedDynamicState2PatchControlPoints && HasTessellationControlShader)
|
|
||||||
{
|
|
||||||
additionalDynamicStatesCount++;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
int dynamicStatesCount = baseDynamicStatesCount + additionalDynamicStatesCount;
|
|
||||||
DynamicState* dynamicStates = stackalloc DynamicState[dynamicStatesCount];
|
|
||||||
|
|
||||||
dynamicStates[0] = DynamicState.Viewport;
|
dynamicStates[0] = DynamicState.Viewport;
|
||||||
dynamicStates[1] = DynamicState.Scissor;
|
dynamicStates[1] = DynamicState.Scissor;
|
||||||
|
@ -649,11 +622,10 @@ namespace Ryujinx.Graphics.Vulkan
|
||||||
var pipelineDynamicStateCreateInfo = new PipelineDynamicStateCreateInfo
|
var pipelineDynamicStateCreateInfo = new PipelineDynamicStateCreateInfo
|
||||||
{
|
{
|
||||||
SType = StructureType.PipelineDynamicStateCreateInfo,
|
SType = StructureType.PipelineDynamicStateCreateInfo,
|
||||||
DynamicStateCount = (uint)dynamicStatesCount,
|
DynamicStateCount = (uint)currentIndex,
|
||||||
PDynamicStates = dynamicStates,
|
PDynamicStates = dynamicStates,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
var pipelineCreateInfo = new GraphicsPipelineCreateInfo
|
var pipelineCreateInfo = new GraphicsPipelineCreateInfo
|
||||||
{
|
{
|
||||||
SType = StructureType.GraphicsPipelineCreateInfo,
|
SType = StructureType.GraphicsPipelineCreateInfo,
|
||||||
|
|
Loading…
Reference in a new issue