mirror of
https://git.naxdy.org/Mirror/Ryujinx.git
synced 2024-12-26 18:43:04 +00:00
Revert a change
This commit is contained in:
parent
a7409e6fba
commit
91c3ac2701
4 changed files with 11 additions and 20 deletions
|
@ -1080,8 +1080,6 @@ namespace Ryujinx.Graphics.Vulkan
|
|||
_newState.HasTessellationControlShader = internalProgram.HasTessellationControlShader;
|
||||
_newState.StagesCount = (uint)stages.Length;
|
||||
|
||||
_newState.Topology = internalProgram.ShaderTopology;
|
||||
|
||||
stages.CopyTo(_newState.Stages.AsSpan()[..stages.Length]);
|
||||
|
||||
SignalStateChange();
|
||||
|
@ -1702,7 +1700,7 @@ namespace Ryujinx.Graphics.Vulkan
|
|||
{
|
||||
DynamicState.SetFeedbackLoop(aspects);
|
||||
}
|
||||
else
|
||||
else if (Gd.Capabilities.SupportsAttachmentFeedbackLoop)
|
||||
{
|
||||
_newState.FeedbackLoopAspects = aspects;
|
||||
}
|
||||
|
@ -1718,11 +1716,6 @@ namespace Ryujinx.Graphics.Vulkan
|
|||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
private bool UpdateFeedbackLoop()
|
||||
{
|
||||
if (!Gd.Capabilities.SupportsAttachmentFeedbackLoop)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
List<TextureView> hazards = _descriptorSetUpdater.FeedbackLoopHazards;
|
||||
|
||||
if ((hazards?.Count ?? 0) > 0)
|
||||
|
|
|
@ -153,13 +153,15 @@ namespace Ryujinx.Graphics.Vulkan
|
|||
0);
|
||||
}
|
||||
|
||||
public static PipelineState ToVulkanPipelineState(this ProgramPipelineState state, VulkanRenderer gd, bool hasTCS)
|
||||
public static PipelineState ToVulkanPipelineState(this ProgramPipelineState state, VulkanRenderer gd)
|
||||
{
|
||||
var extendedDynamicState2 = gd.Capabilities.SupportsExtendedDynamicState2;
|
||||
var extendedDynamicState = gd.Capabilities.SupportsExtendedDynamicState;
|
||||
|
||||
var topology = extendedDynamicState ? gd.TopologyRemap(state.Topology).Convert().ConvertToClass() : gd.TopologyRemap(state.Topology).Convert();
|
||||
|
||||
PipelineState pipeline = new();
|
||||
pipeline.Initialize(gd.Capabilities);
|
||||
pipeline.Initialize(gd.Capabilities, topology);
|
||||
|
||||
// It is assumed that Dynamic State is enabled when this conversion is used.
|
||||
pipeline.DepthBoundsTestEnable = false; // Not implemented.
|
||||
|
@ -225,8 +227,7 @@ namespace Ryujinx.Graphics.Vulkan
|
|||
pipeline.StencilBackDepthFailOp = extendedDynamicState ? 0 : state.StencilTest.BackDpFail.Convert();
|
||||
pipeline.StencilBackCompareOp = extendedDynamicState ? 0 : state.StencilTest.BackFunc.Convert();
|
||||
|
||||
var topology = hasTCS ? PrimitiveTopology.Patches : state.Topology;
|
||||
pipeline.Topology = extendedDynamicState ? gd.TopologyRemap(topology).Convert().ConvertToClass() : gd.TopologyRemap(topology).Convert();
|
||||
pipeline.Topology = topology;
|
||||
|
||||
int vaCount = Math.Min(Constants.MaxVertexAttributes, state.VertexAttribCount);
|
||||
int vbCount = Math.Min(Constants.MaxVertexBuffers, state.VertexBufferCount);
|
||||
|
|
|
@ -258,7 +258,7 @@ namespace Ryujinx.Graphics.Vulkan
|
|||
private bool _supportsFeedBackLoopDynamicState;
|
||||
|
||||
|
||||
public void Initialize(HardwareCapabilities capabilities)
|
||||
public void Initialize(HardwareCapabilities capabilities, PrimitiveTopology topology = default)
|
||||
{
|
||||
HasTessellationControlShader = false;
|
||||
Stages = new NativeArray<PipelineShaderStageCreateInfo>(Constants.MaxShaderStages);
|
||||
|
@ -277,13 +277,14 @@ namespace Ryujinx.Graphics.Vulkan
|
|||
_supportsExtDynamicState2 = capabilities.SupportsExtendedDynamicState2;
|
||||
_supportsFeedBackLoopDynamicState = capabilities.SupportsDynamicAttachmentFeedbackLoop;
|
||||
|
||||
if (_supportsFeedBackLoopDynamicState || !capabilities.SupportsAttachmentFeedbackLoop)
|
||||
if (!capabilities.SupportsAttachmentFeedbackLoop)
|
||||
{
|
||||
FeedbackLoopAspects = FeedbackLoopAspects.None;
|
||||
}
|
||||
|
||||
if (_supportsExtDynamicState)
|
||||
{
|
||||
Topology = topology;
|
||||
StencilFrontFailOp = 0;
|
||||
StencilFrontPassOp = 0;
|
||||
StencilFrontDepthFailOp = 0;
|
||||
|
@ -649,7 +650,7 @@ namespace Ryujinx.Graphics.Vulkan
|
|||
|
||||
PipelineCreateFlags flags = 0;
|
||||
|
||||
if (gd.Capabilities.SupportsAttachmentFeedbackLoop)
|
||||
if (gd.Capabilities.SupportsAttachmentFeedbackLoop && !_supportsFeedBackLoopDynamicState)
|
||||
{
|
||||
FeedbackLoopAspects aspects = FeedbackLoopAspects;
|
||||
|
||||
|
|
|
@ -24,8 +24,6 @@ namespace Ryujinx.Graphics.Vulkan
|
|||
public bool IsCompute { get; }
|
||||
public bool HasTessellationControlShader => (Stages & (1u << 3)) != 0;
|
||||
|
||||
public PrimitiveTopology ShaderTopology;
|
||||
|
||||
public bool UpdateTexturesWithoutTemplate { get; }
|
||||
|
||||
public uint Stages { get; }
|
||||
|
@ -552,9 +550,7 @@ namespace Ryujinx.Graphics.Vulkan
|
|||
// The active attachment formats have been provided by the abstraction layer.
|
||||
var renderPass = CreateDummyRenderPass();
|
||||
|
||||
PipelineState pipeline = _state.ToVulkanPipelineState(_gd, HasTessellationControlShader);
|
||||
|
||||
ShaderTopology = pipeline.Topology;
|
||||
PipelineState pipeline = _state.ToVulkanPipelineState(_gd);
|
||||
|
||||
// Copy the shader stage info to the pipeline.
|
||||
var stages = pipeline.Stages.AsSpan();
|
||||
|
|
Loading…
Reference in a new issue