mirror of
https://git.naxdy.org/Mirror/Ryujinx.git
synced 2024-12-26 18:43:04 +00:00
Set a default topology state that can be overwritten later if needed.
This commit is contained in:
parent
1a43536092
commit
2d1af4ddb4
3 changed files with 8 additions and 3 deletions
|
@ -1105,6 +1105,8 @@ 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();
|
||||
|
|
|
@ -218,9 +218,7 @@ namespace Ryujinx.Graphics.Vulkan
|
|||
pipeline.StencilBackDepthFailOp = extendedDynamicState ? 0 : state.StencilTest.BackDpFail.Convert();
|
||||
pipeline.StencilBackCompareOp = extendedDynamicState ? 0 : state.StencilTest.BackFunc.Convert();
|
||||
|
||||
var vkTopology = gd.TopologyRemap(state.Topology).Convert();
|
||||
|
||||
pipeline.Topology = extendedDynamicState ? vkTopology.ConvertToClass() : vkTopology;
|
||||
pipeline.Topology = gd.TopologyRemap(state.Topology).Convert();
|
||||
|
||||
int vaCount = Math.Min(Constants.MaxVertexAttributes, state.VertexAttribCount);
|
||||
int vbCount = Math.Min(Constants.MaxVertexBuffers, state.VertexBufferCount);
|
||||
|
|
|
@ -6,6 +6,7 @@ using System.Collections.Generic;
|
|||
using System.Collections.ObjectModel;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using PrimitiveTopology = Silk.NET.Vulkan.PrimitiveTopology;
|
||||
|
||||
namespace Ryujinx.Graphics.Vulkan
|
||||
{
|
||||
|
@ -23,6 +24,8 @@ 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; }
|
||||
|
@ -551,6 +554,8 @@ namespace Ryujinx.Graphics.Vulkan
|
|||
|
||||
PipelineState pipeline = _state.ToVulkanPipelineState(_gd);
|
||||
|
||||
ShaderTopology = pipeline.Topology;
|
||||
|
||||
// Copy the shader stage info to the pipeline.
|
||||
var stages = pipeline.Stages.AsSpan();
|
||||
|
||||
|
|
Loading…
Reference in a new issue