Apply suggestions from code review
Simple suggestions from code review Co-authored-by: gdkchan <gab.dark.100@gmail.com>
This commit is contained in:
parent
d9c5b5c753
commit
4a3b10fa9f
5 changed files with 9 additions and 14 deletions
|
@ -94,7 +94,6 @@ namespace Ryujinx.Graphics.Vulkan
|
|||
private FeedbackLoopAspects _feedbackLoop;
|
||||
private bool _passWritesDepthStencil;
|
||||
|
||||
|
||||
private readonly PipelineColorBlendAttachmentState[] _storedBlend;
|
||||
public ulong DrawCount { get; private set; }
|
||||
public bool RenderPassActive { get; private set; }
|
||||
|
@ -1250,7 +1249,6 @@ namespace Ryujinx.Graphics.Vulkan
|
|||
(uint)stencilTest.FrontMask,
|
||||
(uint)stencilTest.FrontFuncRef);
|
||||
|
||||
|
||||
UpdatePassDepthStencil();
|
||||
SignalStateChange();
|
||||
}
|
||||
|
|
|
@ -215,8 +215,8 @@ namespace Ryujinx.Graphics.Vulkan
|
|||
{
|
||||
pipeline.PrimitiveRestartEnable = state.PrimitiveRestartEnable;
|
||||
pipeline.RasterizerDiscardEnable = state.RasterizerDiscard;
|
||||
pipeline.DepthBiasEnable = ((state.BiasEnable != 0) &&
|
||||
(state.DepthBiasFactor != 0 && state.DepthBiasUnits != 0));
|
||||
pipeline.DepthBiasEnable = (state.BiasEnable != 0) &&
|
||||
(state.DepthBiasFactor != 0 && state.DepthBiasUnits != 0);
|
||||
}
|
||||
|
||||
if (!extendedDynamicState2.ExtendedDynamicState2LogicOp)
|
||||
|
|
|
@ -3,7 +3,6 @@ using Silk.NET.Vulkan;
|
|||
using Silk.NET.Vulkan.Extensions.EXT;
|
||||
using System;
|
||||
|
||||
|
||||
namespace Ryujinx.Graphics.Vulkan
|
||||
{
|
||||
struct PipelineDynamicState
|
||||
|
@ -74,7 +73,7 @@ namespace Ryujinx.Graphics.Vulkan
|
|||
FrontFace = 1 << 7,
|
||||
DepthTestBool = 1 << 8,
|
||||
DepthTestCompareOp = 1 << 9,
|
||||
StencilTestEnableandStencilOp = 1 << 10,
|
||||
StencilTestEnableAndStencilOp = 1 << 10,
|
||||
LineWidth = 1 << 11,
|
||||
RasterDiscard = 1 << 12,
|
||||
LogicOp = 1 << 13,
|
||||
|
@ -203,7 +202,6 @@ namespace Ryujinx.Graphics.Vulkan
|
|||
public void SetLineWidth(float width)
|
||||
{
|
||||
_lineWidth = width;
|
||||
|
||||
_dirty |= DirtyFlags.LineWidth;
|
||||
}
|
||||
|
||||
|
@ -412,7 +410,7 @@ namespace Ryujinx.Graphics.Vulkan
|
|||
gd.Api.CmdSetStencilReference(commandBuffer, StencilFaceFlags.FaceFrontBit, _frontReference);
|
||||
}
|
||||
|
||||
private readonly void RecordStencilTestandOp(ExtExtendedDynamicState api, CommandBuffer commandBuffer)
|
||||
private readonly void RecordStencilTestAndOp(ExtExtendedDynamicState api, CommandBuffer commandBuffer)
|
||||
{
|
||||
api.CmdSetStencilTestEnable(commandBuffer, StencilTestEnable);
|
||||
|
||||
|
@ -431,7 +429,6 @@ namespace Ryujinx.Graphics.Vulkan
|
|||
|
||||
if (gd.Capabilities.SupportsExtendedDynamicState)
|
||||
{
|
||||
|
||||
gd.ExtendedDynamicStateApi.CmdSetViewportWithCount(commandBuffer, ViewportsCount,
|
||||
Viewports.AsSpan());
|
||||
}
|
||||
|
@ -491,7 +488,7 @@ namespace Ryujinx.Graphics.Vulkan
|
|||
|
||||
primitiveRestartEnable &= topologySupportsRestart;
|
||||
|
||||
//Cannot disable primitiveRestartEnable for these Topologies on MacOS
|
||||
// Cannot disable primitiveRestartEnable for these Topologies on MacOS.
|
||||
if (gd.IsMoltenVk)
|
||||
{
|
||||
primitiveRestartEnable = true;
|
||||
|
|
|
@ -634,8 +634,8 @@ namespace Ryujinx.Graphics.Vulkan
|
|||
{
|
||||
if (gd.SupportsMTL31 || !gd.IsMoltenVk)
|
||||
{
|
||||
//Requires Metal 3.1 and new MoltenVK however extended dynamic states extension is not
|
||||
//available on older verrsion of MVK so we can safely check only OS version
|
||||
// Requires Metal 3.1 and new MoltenVK, however extended dynamic states extension is not
|
||||
// available on older versions of MVK, so we can safely check only OS version.
|
||||
dynamicStates[dynamicStatesCount++] = DynamicState.VertexInputBindingStrideExt;
|
||||
}
|
||||
dynamicStates[0] = DynamicState.ViewportWithCountExt;
|
||||
|
|
|
@ -422,7 +422,7 @@ namespace Ryujinx.Graphics.Vulkan
|
|||
properties.Limits.FramebufferDepthSampleCounts &
|
||||
properties.Limits.FramebufferStencilSampleCounts;
|
||||
|
||||
//Temporarily disable this can be added back at a later date, make it easy to re-enable.
|
||||
// Temporarily disable this, can be added back at a later date, make it easy to re-enable.
|
||||
featuresExtendedDynamicState2.ExtendedDynamicState2PatchControlPoints = false;
|
||||
|
||||
Capabilities = new HardwareCapabilities(
|
||||
|
|
Loading…
Reference in a new issue