aboutsummaryrefslogtreecommitdiff
path: root/src/Ryujinx.Graphics.Shader/Translation/ShaderIdentifier.cs
diff options
context:
space:
mode:
Diffstat (limited to 'src/Ryujinx.Graphics.Shader/Translation/ShaderIdentifier.cs')
-rw-r--r--src/Ryujinx.Graphics.Shader/Translation/ShaderIdentifier.cs18
1 files changed, 11 insertions, 7 deletions
diff --git a/src/Ryujinx.Graphics.Shader/Translation/ShaderIdentifier.cs b/src/Ryujinx.Graphics.Shader/Translation/ShaderIdentifier.cs
index e9c25994..c077e1cd 100644
--- a/src/Ryujinx.Graphics.Shader/Translation/ShaderIdentifier.cs
+++ b/src/Ryujinx.Graphics.Shader/Translation/ShaderIdentifier.cs
@@ -5,18 +5,22 @@ namespace Ryujinx.Graphics.Shader.Translation
{
static class ShaderIdentifier
{
- public static ShaderIdentification Identify(IReadOnlyList<Function> functions, ShaderConfig config)
+ public static ShaderIdentification Identify(
+ IReadOnlyList<Function> functions,
+ IGpuAccessor gpuAccessor,
+ ShaderStage stage,
+ InputTopology inputTopology,
+ out int layerInputAttr)
{
- if (config.Stage == ShaderStage.Geometry &&
- config.GpuAccessor.QueryPrimitiveTopology() == InputTopology.Triangles &&
- !config.GpuAccessor.QueryHostSupportsGeometryShader() &&
- IsLayerPassthroughGeometryShader(functions, out int layerInputAttr))
+ if (stage == ShaderStage.Geometry &&
+ inputTopology == InputTopology.Triangles &&
+ !gpuAccessor.QueryHostSupportsGeometryShader() &&
+ IsLayerPassthroughGeometryShader(functions, out layerInputAttr))
{
- config.SetGeometryShaderLayerInputAttribute(layerInputAttr);
-
return ShaderIdentification.GeometryLayerPassthrough;
}
+ layerInputAttr = 0;
return ShaderIdentification.None;
}