mirror of
https://github.com/Ryujinx/Ryujinx.git
synced 2024-11-28 15:50:15 +00:00
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;
|
||||
}
|
||||
|
||||
int baseDynamicStatesCount = 7;
|
||||
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];
|
||||
DynamicState* dynamicStates = stackalloc DynamicState[22];
|
||||
|
||||
dynamicStates[0] = DynamicState.Viewport;
|
||||
dynamicStates[1] = DynamicState.Scissor;
|
||||
|
@ -649,11 +622,10 @@ namespace Ryujinx.Graphics.Vulkan
|
|||
var pipelineDynamicStateCreateInfo = new PipelineDynamicStateCreateInfo
|
||||
{
|
||||
SType = StructureType.PipelineDynamicStateCreateInfo,
|
||||
DynamicStateCount = (uint)dynamicStatesCount,
|
||||
DynamicStateCount = (uint)currentIndex,
|
||||
PDynamicStates = dynamicStates,
|
||||
};
|
||||
|
||||
|
||||
var pipelineCreateInfo = new GraphicsPipelineCreateInfo
|
||||
{
|
||||
SType = StructureType.GraphicsPipelineCreateInfo,
|
||||
|
|
Loading…
Reference in a new issue