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)
|
if (oldTopologyClass != newTopologyClass)
|
||||||
{
|
{
|
||||||
_newState.Topology = oldTopology;
|
_newState.TopologyClass = oldTopology;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -747,9 +747,10 @@ namespace Ryujinx.Graphics.Vulkan
|
||||||
_newState.DepthTestEnable = oldDepthTestEnable;
|
_newState.DepthTestEnable = oldDepthTestEnable;
|
||||||
_newState.DepthWriteEnable = oldDepthWriteEnable;
|
_newState.DepthWriteEnable = oldDepthWriteEnable;
|
||||||
_newState.ViewportsCount = oldViewportsCount;
|
_newState.ViewportsCount = oldViewportsCount;
|
||||||
_newState.Topology = oldTopology;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
_newState.Topology = oldTopology;
|
||||||
|
|
||||||
DynamicState.SetViewports(ref oldViewports, oldViewportsCount);
|
DynamicState.SetViewports(ref oldViewports, oldViewportsCount);
|
||||||
|
|
||||||
SignalStateChange();
|
SignalStateChange();
|
||||||
|
@ -1102,18 +1103,20 @@ namespace Ryujinx.Graphics.Vulkan
|
||||||
|
|
||||||
var vkTopology = Gd.TopologyRemap(topology).Convert();
|
var vkTopology = Gd.TopologyRemap(topology).Convert();
|
||||||
var newTopologyClass = GetTopologyClass(vkTopology);
|
var newTopologyClass = GetTopologyClass(vkTopology);
|
||||||
var currentTopologyClass = GetTopologyClass(_newState.Topology);
|
var currentTopologyClass = GetTopologyClass(_newState.TopologyClass);
|
||||||
|
|
||||||
if (_supportExtDynamic)
|
if (_supportExtDynamic)
|
||||||
{
|
{
|
||||||
DynamicState.SetPrimitiveTopology(vkTopology);
|
DynamicState.SetPrimitiveTopology(vkTopology);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!_supportExtDynamic || (currentTopologyClass != newTopologyClass))
|
if ((currentTopologyClass != newTopologyClass))
|
||||||
{
|
{
|
||||||
_newState.Topology = vkTopology;
|
_newState.TopologyClass = vkTopology;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
_newState.Topology = vkTopology;
|
||||||
|
|
||||||
SignalStateChange();
|
SignalStateChange();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -131,6 +131,8 @@ namespace Ryujinx.Graphics.Vulkan
|
||||||
set => Internal.Id7 = (Internal.Id7 & 0xFFFFFFFFFFF0FFFF) | ((ulong)value << 16);
|
set => Internal.Id7 = (Internal.Id7 & 0xFFFFFFFFFFF0FFFF) | ((ulong)value << 16);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public PrimitiveTopology TopologyClass;
|
||||||
|
|
||||||
public LogicOp LogicOp
|
public LogicOp LogicOp
|
||||||
{
|
{
|
||||||
readonly get => (LogicOp)((Internal.Id7 >> 20) & 0xF);
|
readonly get => (LogicOp)((Internal.Id7 >> 20) & 0xF);
|
||||||
|
@ -437,6 +439,15 @@ namespace Ryujinx.Graphics.Vulkan
|
||||||
Topology = Topology,
|
Topology = Topology,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
if (supportsExtDynamicState)
|
||||||
|
{
|
||||||
|
inputAssemblyState.Topology = TopologyClass;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
inputAssemblyState.Topology = Topology;
|
||||||
|
}
|
||||||
|
|
||||||
var tessellationState = new PipelineTessellationStateCreateInfo
|
var tessellationState = new PipelineTessellationStateCreateInfo
|
||||||
{
|
{
|
||||||
SType = StructureType.PipelineTessellationStateCreateInfo,
|
SType = StructureType.PipelineTessellationStateCreateInfo,
|
||||||
|
|
Loading…
Reference in a new issue