Some missed changes
This commit is contained in:
parent
5e86d5e178
commit
a7409e6fba
4 changed files with 19 additions and 19 deletions
|
@ -323,9 +323,9 @@ namespace Ryujinx.Graphics.Vulkan
|
||||||
PrimitiveTopology.TriangleStrip or
|
PrimitiveTopology.TriangleStrip or
|
||||||
PrimitiveTopology.TriangleFan or
|
PrimitiveTopology.TriangleFan or
|
||||||
PrimitiveTopology.TriangleListWithAdjacency or
|
PrimitiveTopology.TriangleListWithAdjacency or
|
||||||
PrimitiveTopology.TriangleStripWithAdjacency => PrimitiveTopology.TriangleList,
|
PrimitiveTopology.TriangleStripWithAdjacency => PrimitiveTopology.TriangleStrip,
|
||||||
PrimitiveTopology.PatchList => PrimitiveTopology.PatchList,
|
PrimitiveTopology.PatchList => PrimitiveTopology.PatchList,
|
||||||
_ => LogInvalidAndReturn(topology, nameof(PrimitiveTopology), PrimitiveTopology.TriangleList),
|
_ => LogInvalidAndReturn(topology, nameof(PrimitiveTopology), PrimitiveTopology.TriangleStrip),
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -644,7 +644,7 @@ namespace Ryujinx.Graphics.Vulkan
|
||||||
var oldStencilTestEnable = _supportExtDynamic ? DynamicState.StencilTestEnable : _newState.StencilTestEnable;
|
var oldStencilTestEnable = _supportExtDynamic ? DynamicState.StencilTestEnable : _newState.StencilTestEnable;
|
||||||
var oldDepthTestEnable = _supportExtDynamic ? DynamicState.DepthTestEnable : _newState.DepthTestEnable;
|
var oldDepthTestEnable = _supportExtDynamic ? DynamicState.DepthTestEnable : _newState.DepthTestEnable;
|
||||||
var oldDepthWriteEnable = _supportExtDynamic ? DynamicState.DepthWriteEnable : _newState.DepthWriteEnable;
|
var oldDepthWriteEnable = _supportExtDynamic ? DynamicState.DepthWriteEnable : _newState.DepthWriteEnable;
|
||||||
var oldTopology = _supportExtDynamic ? DynamicState._topology : _newState.Topology;
|
var oldTopology = _newState.Topology;
|
||||||
var oldViewports = DynamicState.Viewports;
|
var oldViewports = DynamicState.Viewports;
|
||||||
var oldViewportsCount = _supportExtDynamic ? DynamicState.ViewportsCount : _newState.ViewportsCount;
|
var oldViewportsCount = _supportExtDynamic ? DynamicState.ViewportsCount : _newState.ViewportsCount;
|
||||||
|
|
||||||
|
@ -825,11 +825,6 @@ namespace Ryujinx.Graphics.Vulkan
|
||||||
|
|
||||||
public void SetDepthBias(PolygonModeMask enables, float factor, float units, float clamp)
|
public void SetDepthBias(PolygonModeMask enables, float factor, float units, float clamp)
|
||||||
{
|
{
|
||||||
if (factor == 0 && units == 0 && !_newState.DepthBiasEnable && !_supportExtDynamic2)
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool depthBiasEnable = (enables != 0) && (factor != 0 && units != 0);
|
bool depthBiasEnable = (enables != 0) && (factor != 0 && units != 0);
|
||||||
bool changed = false;
|
bool changed = false;
|
||||||
|
|
||||||
|
@ -882,7 +877,10 @@ namespace Ryujinx.Graphics.Vulkan
|
||||||
if (_supportExtDynamic)
|
if (_supportExtDynamic)
|
||||||
{
|
{
|
||||||
DynamicState.SetDepthTestBool(depthTest.TestEnable, depthTest.WriteEnable);
|
DynamicState.SetDepthTestBool(depthTest.TestEnable, depthTest.WriteEnable);
|
||||||
DynamicState.SetDepthTestCompareOp(depthTest.TestEnable ? depthTest.Func.Convert() : default);
|
if (depthTest.TestEnable)
|
||||||
|
{
|
||||||
|
DynamicState.SetDepthTestCompareOp(depthTest.Func.Convert());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -899,7 +897,7 @@ namespace Ryujinx.Graphics.Vulkan
|
||||||
{
|
{
|
||||||
if (_supportExtDynamic)
|
if (_supportExtDynamic)
|
||||||
{
|
{
|
||||||
DynamicState.SetCullMode(enable ? face.Convert() : default);
|
DynamicState.SetCullMode(enable ? face.Convert() : CullModeFlags.None);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -977,7 +975,11 @@ namespace Ryujinx.Graphics.Vulkan
|
||||||
|
|
||||||
if (Gd.Capabilities.SupportsExtendedDynamicState2.ExtendedDynamicState2LogicOp)
|
if (Gd.Capabilities.SupportsExtendedDynamicState2.ExtendedDynamicState2LogicOp)
|
||||||
{
|
{
|
||||||
DynamicState.SetLogicOp(logicOpEnable ? op.Convert() : default);
|
if (logicOpEnable)
|
||||||
|
{
|
||||||
|
DynamicState.SetLogicOp(op.Convert());
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -998,11 +1000,6 @@ namespace Ryujinx.Graphics.Vulkan
|
||||||
|
|
||||||
public void SetPatchParameters(int vertices, ReadOnlySpan<float> defaultOuterLevel, ReadOnlySpan<float> defaultInnerLevel)
|
public void SetPatchParameters(int vertices, ReadOnlySpan<float> defaultOuterLevel, ReadOnlySpan<float> defaultInnerLevel)
|
||||||
{
|
{
|
||||||
if (vertices == 0 || vertices > Gd.Capabilities.MaxTessellationPatchSize)
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (Gd.Capabilities.SupportsExtendedDynamicState2.ExtendedDynamicState2PatchControlPoints)
|
if (Gd.Capabilities.SupportsExtendedDynamicState2.ExtendedDynamicState2PatchControlPoints)
|
||||||
{
|
{
|
||||||
DynamicState.SetPatchControlPoints((uint)vertices);
|
DynamicState.SetPatchControlPoints((uint)vertices);
|
||||||
|
@ -1770,7 +1767,7 @@ namespace Ryujinx.Graphics.Vulkan
|
||||||
}
|
}
|
||||||
|
|
||||||
// Stencil test being enabled doesn't necessarily mean a write, but it's not critical to check.
|
// Stencil test being enabled doesn't necessarily mean a write, but it's not critical to check.
|
||||||
_passWritesDepthStencil |= _supportExtDynamic ? (DynamicState.DepthTestEnable && DynamicState.DepthWriteEnable) || _newState.StencilTestEnable : (_newState.DepthTestEnable && _newState.DepthWriteEnable) || _newState.StencilTestEnable;
|
_passWritesDepthStencil |= _supportExtDynamic ? (DynamicState.DepthTestEnable && DynamicState.DepthWriteEnable) || DynamicState.StencilTestEnable : (_newState.DepthTestEnable && _newState.DepthWriteEnable) || _newState.StencilTestEnable;
|
||||||
}
|
}
|
||||||
|
|
||||||
private bool RecreateGraphicsPipelineIfNeeded()
|
private bool RecreateGraphicsPipelineIfNeeded()
|
||||||
|
|
|
@ -166,7 +166,10 @@ namespace Ryujinx.Graphics.Vulkan
|
||||||
|
|
||||||
pipeline.DepthClampEnable = state.DepthClampEnable;
|
pipeline.DepthClampEnable = state.DepthClampEnable;
|
||||||
|
|
||||||
pipeline.FeedbackLoopAspects = FeedbackLoopAspects.None;
|
if (gd.Capabilities.SupportsDynamicAttachmentFeedbackLoop || !gd.Capabilities.SupportsAttachmentFeedbackLoop)
|
||||||
|
{
|
||||||
|
pipeline.FeedbackLoopAspects = FeedbackLoopAspects.None;
|
||||||
|
}
|
||||||
|
|
||||||
pipeline.DepthMode = state.DepthMode == DepthMode.MinusOneToOne;
|
pipeline.DepthMode = state.DepthMode == DepthMode.MinusOneToOne;
|
||||||
|
|
||||||
|
|
|
@ -56,7 +56,7 @@ namespace Ryujinx.Graphics.Vulkan
|
||||||
|
|
||||||
private uint _patchControlPoints;
|
private uint _patchControlPoints;
|
||||||
|
|
||||||
public PrimitiveTopology _topology;
|
private PrimitiveTopology _topology;
|
||||||
|
|
||||||
private bool _primitiveRestartEnable;
|
private bool _primitiveRestartEnable;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue