mirror of
https://git.naxdy.org/Mirror/Ryujinx.git
synced 2024-12-27 02:53:04 +00:00
Fix oversight with implementing Primitive Topology Dynamic State
This commit is contained in:
parent
e6492f8e78
commit
d8d33417e9
2 changed files with 19 additions and 5 deletions
|
@ -737,7 +737,7 @@ namespace Ryujinx.Graphics.Vulkan
|
|||
|
||||
if (oldTopologyClass != newTopologyClass)
|
||||
{
|
||||
_newState.Topology = oldTopology;
|
||||
_newState.TopologyClass = oldTopology;
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@ -747,8 +747,9 @@ namespace Ryujinx.Graphics.Vulkan
|
|||
_newState.DepthTestEnable = oldDepthTestEnable;
|
||||
_newState.DepthWriteEnable = oldDepthWriteEnable;
|
||||
_newState.ViewportsCount = oldViewportsCount;
|
||||
_newState.Topology = oldTopology;
|
||||
}
|
||||
|
||||
_newState.Topology = oldTopology;
|
||||
|
||||
DynamicState.SetViewports(ref oldViewports, oldViewportsCount);
|
||||
|
||||
|
@ -1102,17 +1103,19 @@ namespace Ryujinx.Graphics.Vulkan
|
|||
|
||||
var vkTopology = Gd.TopologyRemap(topology).Convert();
|
||||
var newTopologyClass = GetTopologyClass(vkTopology);
|
||||
var currentTopologyClass = GetTopologyClass(_newState.Topology);
|
||||
var currentTopologyClass = GetTopologyClass(_newState.TopologyClass);
|
||||
|
||||
if (_supportExtDynamic)
|
||||
{
|
||||
DynamicState.SetPrimitiveTopology(vkTopology);
|
||||
}
|
||||
|
||||
if (!_supportExtDynamic || (currentTopologyClass != newTopologyClass))
|
||||
if ((currentTopologyClass != newTopologyClass))
|
||||
{
|
||||
_newState.Topology = vkTopology;
|
||||
_newState.TopologyClass = vkTopology;
|
||||
}
|
||||
|
||||
_newState.Topology = vkTopology;
|
||||
|
||||
SignalStateChange();
|
||||
}
|
||||
|
|
|
@ -131,6 +131,8 @@ namespace Ryujinx.Graphics.Vulkan
|
|||
set => Internal.Id7 = (Internal.Id7 & 0xFFFFFFFFFFF0FFFF) | ((ulong)value << 16);
|
||||
}
|
||||
|
||||
public PrimitiveTopology TopologyClass;
|
||||
|
||||
public LogicOp LogicOp
|
||||
{
|
||||
readonly get => (LogicOp)((Internal.Id7 >> 20) & 0xF);
|
||||
|
@ -437,6 +439,15 @@ namespace Ryujinx.Graphics.Vulkan
|
|||
Topology = Topology,
|
||||
};
|
||||
|
||||
if (supportsExtDynamicState)
|
||||
{
|
||||
inputAssemblyState.Topology = TopologyClass;
|
||||
}
|
||||
else
|
||||
{
|
||||
inputAssemblyState.Topology = Topology;
|
||||
}
|
||||
|
||||
var tessellationState = new PipelineTessellationStateCreateInfo
|
||||
{
|
||||
SType = StructureType.PipelineTessellationStateCreateInfo,
|
||||
|
|
Loading…
Reference in a new issue