aboutsummaryrefslogtreecommitdiff
path: root/Ryujinx.Graphics.Shader/Translation/ShaderConfig.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Ryujinx.Graphics.Shader/Translation/ShaderConfig.cs')
-rw-r--r--Ryujinx.Graphics.Shader/Translation/ShaderConfig.cs22
1 files changed, 21 insertions, 1 deletions
diff --git a/Ryujinx.Graphics.Shader/Translation/ShaderConfig.cs b/Ryujinx.Graphics.Shader/Translation/ShaderConfig.cs
index a79ef6f5..2caa8f63 100644
--- a/Ryujinx.Graphics.Shader/Translation/ShaderConfig.cs
+++ b/Ryujinx.Graphics.Shader/Translation/ShaderConfig.cs
@@ -20,6 +20,8 @@ namespace Ryujinx.Graphics.Shader.Translation
public bool LastInPipeline { get; private set; }
public bool LastInVertexPipeline { get; private set; }
+ public bool HasLayerInputAttribute { get; private set; }
+ public int GpLayerInputAttribute { get; private set; }
public int ThreadsPerInputPrimitive { get; }
public OutputTopology OutputTopology { get; }
@@ -245,6 +247,22 @@ namespace Ryujinx.Graphics.Shader.Translation
LayerOutputAttribute = attr;
}
+ public void SetGeometryShaderLayerInputAttribute(int attr)
+ {
+ HasLayerInputAttribute = true;
+ GpLayerInputAttribute = attr;
+ }
+
+ public void SetLastInVertexPipeline(bool hasFragment)
+ {
+ if (!hasFragment)
+ {
+ LastInPipeline = true;
+ }
+
+ LastInVertexPipeline = true;
+ }
+
public void SetInputUserAttributeFixedFunc(int index)
{
UsedInputAttributes |= 1 << index;
@@ -706,13 +724,15 @@ namespace Ryujinx.Graphics.Shader.Translation
return FindDescriptorIndex(GetImageDescriptors(), texOp);
}
- public ShaderProgramInfo CreateProgramInfo()
+ public ShaderProgramInfo CreateProgramInfo(ShaderIdentification identification = ShaderIdentification.None)
{
return new ShaderProgramInfo(
GetConstantBufferDescriptors(),
GetStorageBufferDescriptors(),
GetTextureDescriptors(),
GetImageDescriptors(),
+ identification,
+ GpLayerInputAttribute,
Stage,
UsedFeatures.HasFlag(FeatureFlags.InstanceId),
UsedFeatures.HasFlag(FeatureFlags.DrawParameters),