Revert Silk.NET to main branch version.
Remove VK_EXT_extended_dynamic_state3 functionality until later PR
This commit is contained in:
parent
fb4ef3347a
commit
f43413f374
7 changed files with 46 additions and 386 deletions
|
@ -407,8 +407,6 @@ namespace Ryujinx.Graphics.Vulkan
|
|||
|
||||
bool supportsExtDynamicState = gd.Capabilities.SupportsExtendedDynamicState;
|
||||
bool supportsExtDynamicState2 = gd.Capabilities.SupportsExtendedDynamicState2;
|
||||
bool supportsExtDynamicState3 = gd.Capabilities.SupportsExtendedDynamicState3;
|
||||
|
||||
|
||||
fixed (VertexInputAttributeDescription* pVertexAttributeDescriptions = &Internal.VertexAttributeDescriptions[0])
|
||||
fixed (VertexInputAttributeDescription* pVertexAttributeDescriptions2 = &_vertexAttributeDescriptions2[0])
|
||||
|
@ -436,13 +434,9 @@ namespace Ryujinx.Graphics.Vulkan
|
|||
var inputAssemblyState = new PipelineInputAssemblyStateCreateInfo
|
||||
{
|
||||
SType = StructureType.PipelineInputAssemblyStateCreateInfo,
|
||||
Topology = Topology,
|
||||
};
|
||||
|
||||
if (!gd.SupportsUnrestrictedDynamicTopology)
|
||||
{
|
||||
inputAssemblyState.Topology = Topology;
|
||||
}
|
||||
|
||||
var tessellationState = new PipelineTessellationStateCreateInfo
|
||||
{
|
||||
SType = StructureType.PipelineTessellationStateCreateInfo,
|
||||
|
@ -457,13 +451,9 @@ namespace Ryujinx.Graphics.Vulkan
|
|||
{
|
||||
SType = StructureType.PipelineRasterizationStateCreateInfo,
|
||||
PolygonMode = PolygonMode,
|
||||
DepthClampEnable = DepthClampEnable,
|
||||
};
|
||||
|
||||
if (!gd.ExtendedDynamicState3Features.ExtendedDynamicState3DepthClampEnable)
|
||||
{
|
||||
rasterizationState.DepthClampEnable = DepthClampEnable;
|
||||
}
|
||||
|
||||
if (isMoltenVk)
|
||||
{
|
||||
//When widelines feature is not supported it must be 1.0f per spec.
|
||||
|
@ -482,7 +472,7 @@ namespace Ryujinx.Graphics.Vulkan
|
|||
SType = StructureType.PipelineViewportStateCreateInfo,
|
||||
};
|
||||
|
||||
if (gd.Capabilities.SupportsDepthClipControl && !gd.ExtendedDynamicState3Features.ExtendedDynamicState3DepthClipNegativeOneToOne)
|
||||
if (gd.Capabilities.SupportsDepthClipControl)
|
||||
{
|
||||
var viewportDepthClipControlState = new PipelineViewportDepthClipControlCreateInfoEXT
|
||||
{
|
||||
|
@ -499,18 +489,10 @@ namespace Ryujinx.Graphics.Vulkan
|
|||
SampleShadingEnable = false,
|
||||
RasterizationSamples = TextureStorage.ConvertToSampleCountFlags(gd.Capabilities.SupportedSampleCounts, SamplesCount),
|
||||
MinSampleShading = 1,
|
||||
AlphaToCoverageEnable = AlphaToCoverageEnable,
|
||||
AlphaToOneEnable = AlphaToOneEnable,
|
||||
};
|
||||
|
||||
if (!gd.ExtendedDynamicState3Features.ExtendedDynamicState3AlphaToCoverageEnable)
|
||||
{
|
||||
multisampleState.AlphaToCoverageEnable = AlphaToCoverageEnable;
|
||||
}
|
||||
|
||||
if (!gd.ExtendedDynamicState3Features.ExtendedDynamicState3AlphaToOneEnable)
|
||||
{
|
||||
multisampleState.AlphaToOneEnable = AlphaToOneEnable;
|
||||
}
|
||||
|
||||
var depthStencilState = new PipelineDepthStencilStateCreateInfo
|
||||
{
|
||||
SType = StructureType.PipelineDepthStencilStateCreateInfo,
|
||||
|
@ -579,6 +561,7 @@ namespace Ryujinx.Graphics.Vulkan
|
|||
SType = StructureType.PipelineColorBlendStateCreateInfo,
|
||||
AttachmentCount = ColorBlendAttachmentStateCount,
|
||||
PAttachments = pColorBlendAttachmentState,
|
||||
LogicOpEnable = LogicOpEnable,
|
||||
};
|
||||
|
||||
if (!gd.ExtendedDynamicState2Features.ExtendedDynamicState2LogicOp)
|
||||
|
@ -586,11 +569,6 @@ namespace Ryujinx.Graphics.Vulkan
|
|||
colorBlendState.LogicOp = LogicOp;
|
||||
}
|
||||
|
||||
if (!gd.ExtendedDynamicState3Features.ExtendedDynamicState3LogicOpEnable)
|
||||
{
|
||||
colorBlendState.LogicOpEnable = LogicOpEnable;
|
||||
}
|
||||
|
||||
PipelineColorBlendAdvancedStateCreateInfoEXT colorBlendAdvancedState;
|
||||
|
||||
if (!AdvancedBlendSrcPreMultiplied ||
|
||||
|
@ -634,35 +612,6 @@ namespace Ryujinx.Graphics.Vulkan
|
|||
}
|
||||
}
|
||||
|
||||
if (supportsExtDynamicState3)
|
||||
{
|
||||
if (gd.ExtendedDynamicState3Features.ExtendedDynamicState3DepthClampEnable)
|
||||
{
|
||||
additionalDynamicStatesCount++;
|
||||
}
|
||||
if (gd.ExtendedDynamicState3Features.ExtendedDynamicState3LogicOpEnable)
|
||||
{
|
||||
additionalDynamicStatesCount++;
|
||||
}
|
||||
if (gd.ExtendedDynamicState3Features.ExtendedDynamicState3AlphaToCoverageEnable)
|
||||
{
|
||||
additionalDynamicStatesCount++;
|
||||
}
|
||||
if (gd.ExtendedDynamicState3Features.ExtendedDynamicState3AlphaToOneEnable)
|
||||
{
|
||||
additionalDynamicStatesCount++;
|
||||
}
|
||||
if (gd.ExtendedDynamicState3Features.ExtendedDynamicState3DepthClipNegativeOneToOne)
|
||||
{
|
||||
additionalDynamicStatesCount++;
|
||||
}
|
||||
|
||||
if (gd.SupportsUnrestrictedDynamicTopology)
|
||||
{
|
||||
additionalDynamicStatesCount++;
|
||||
}
|
||||
}
|
||||
|
||||
int dynamicStatesCount = baseDynamicStatesCount + additionalDynamicStatesCount;
|
||||
DynamicState* dynamicStates = stackalloc DynamicState[dynamicStatesCount];
|
||||
|
||||
|
@ -716,35 +665,6 @@ namespace Ryujinx.Graphics.Vulkan
|
|||
}
|
||||
}
|
||||
|
||||
if (supportsExtDynamicState3)
|
||||
{
|
||||
if (gd.ExtendedDynamicState3Features.ExtendedDynamicState3DepthClampEnable)
|
||||
{
|
||||
dynamicStates[currentIndex++] = DynamicState.DepthClampEnableExt;
|
||||
}
|
||||
if (gd.ExtendedDynamicState3Features.ExtendedDynamicState3LogicOpEnable)
|
||||
{
|
||||
dynamicStates[currentIndex++] = DynamicState.LogicOpEnableExt;
|
||||
}
|
||||
if (gd.ExtendedDynamicState3Features.ExtendedDynamicState3AlphaToCoverageEnable)
|
||||
{
|
||||
dynamicStates[currentIndex++] = DynamicState.AlphaToCoverageEnableExt;
|
||||
}
|
||||
if (gd.ExtendedDynamicState3Features.ExtendedDynamicState3AlphaToOneEnable)
|
||||
{
|
||||
dynamicStates[currentIndex++] = DynamicState.AlphaToOneEnableExt;
|
||||
}
|
||||
if (gd.ExtendedDynamicState3Features.ExtendedDynamicState3DepthClipNegativeOneToOne)
|
||||
{
|
||||
dynamicStates[currentIndex++] = DynamicState.DepthClipNegativeOneToOneExt;
|
||||
}
|
||||
|
||||
if (gd.SupportsUnrestrictedDynamicTopology)
|
||||
{
|
||||
dynamicStates[currentIndex++] = DynamicState.PrimitiveTopology;
|
||||
}
|
||||
}
|
||||
|
||||
var pipelineDynamicStateCreateInfo = new PipelineDynamicStateCreateInfo
|
||||
{
|
||||
SType = StructureType.PipelineDynamicStateCreateInfo,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue