Use Viewport and Scissor with count.
Topology Dynamic State is not working as intended. Need to add check to set correct Topology class. Circle back to this later. For now revert it. Some minor fixes.
This commit is contained in:
parent
e7fbc9a1be
commit
eaedc3ec9e
4 changed files with 73 additions and 73 deletions
|
@ -455,18 +455,14 @@ namespace Ryujinx.Graphics.Vulkan
|
|||
{
|
||||
primitiveRestartEnable = true;
|
||||
}
|
||||
|
||||
|
||||
var inputAssemblyState = new PipelineInputAssemblyStateCreateInfo
|
||||
{
|
||||
SType = StructureType.PipelineInputAssemblyStateCreateInfo,
|
||||
PrimitiveRestartEnable = primitiveRestartEnable,
|
||||
Topology = Topology,
|
||||
};
|
||||
|
||||
if (!supportsExtDynamicState)
|
||||
{
|
||||
inputAssemblyState.Topology = Topology;
|
||||
}
|
||||
|
||||
var tessellationState = new PipelineTessellationStateCreateInfo
|
||||
{
|
||||
SType = StructureType.PipelineTessellationStateCreateInfo,
|
||||
|
@ -492,13 +488,17 @@ namespace Ryujinx.Graphics.Vulkan
|
|||
rasterizationState.CullMode = CullMode;
|
||||
rasterizationState.FrontFace = FrontFace;
|
||||
}
|
||||
|
||||
|
||||
var viewportState = new PipelineViewportStateCreateInfo
|
||||
{
|
||||
SType = StructureType.PipelineViewportStateCreateInfo,
|
||||
ViewportCount = ViewportsCount,
|
||||
ScissorCount = ScissorsCount,
|
||||
};
|
||||
|
||||
if (!supportsExtDynamicState)
|
||||
{
|
||||
viewportState.ViewportCount = ViewportsCount;
|
||||
viewportState.ScissorCount = ScissorsCount;
|
||||
}
|
||||
|
||||
if (gd.Capabilities.SupportsDepthClipControl)
|
||||
{
|
||||
|
@ -608,7 +608,7 @@ namespace Ryujinx.Graphics.Vulkan
|
|||
colorBlendState.PNext = &colorBlendAdvancedState;
|
||||
}
|
||||
|
||||
int dynamicStatesCount = supportsExtDynamicState ? (isMoltenVk ? 16 : 17) : (isMoltenVk ? 7 : 8);
|
||||
int dynamicStatesCount = supportsExtDynamicState ? (isMoltenVk ? 17 : 18) : (isMoltenVk ? 7 : 8);
|
||||
|
||||
DynamicState* dynamicStates = stackalloc DynamicState[dynamicStatesCount];
|
||||
|
||||
|
@ -627,7 +627,7 @@ namespace Ryujinx.Graphics.Vulkan
|
|||
|
||||
if (supportsExtDynamicState)
|
||||
{
|
||||
int index = 8;
|
||||
int index = (isMoltenVk ? 7 : 8);
|
||||
if (!isMoltenVk) {
|
||||
dynamicStates[index++] = DynamicState.VertexInputBindingStrideExt;
|
||||
}
|
||||
|
@ -637,7 +637,8 @@ namespace Ryujinx.Graphics.Vulkan
|
|||
dynamicStates[index++] = DynamicState.DepthWriteEnableExt;
|
||||
dynamicStates[index++] = DynamicState.DepthCompareOpExt;
|
||||
dynamicStates[index++] = DynamicState.StencilTestEnableExt;
|
||||
dynamicStates[index++] = DynamicState.PrimitiveTopologyExt;
|
||||
dynamicStates[index++] = DynamicState.ViewportWithCountExt;
|
||||
dynamicStates[index++] = DynamicState.ScissorWithCountExt;
|
||||
dynamicStates[index] = DynamicState.StencilOpExt;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue