From f93089a64f9586863e8a261af932d125e78230df Mon Sep 17 00:00:00 2001 From: gdkchan Date: Fri, 29 Jan 2021 00:38:51 -0300 Subject: Implement geometry shader passthrough (#1961) * Implement geometry shader passthrough * Cache version change --- Ryujinx.Graphics.Shader/Translation/ShaderConfig.cs | 4 ++++ Ryujinx.Graphics.Shader/Translation/ShaderHeader.cs | 4 ++++ 2 files changed, 8 insertions(+) (limited to 'Ryujinx.Graphics.Shader/Translation') diff --git a/Ryujinx.Graphics.Shader/Translation/ShaderConfig.cs b/Ryujinx.Graphics.Shader/Translation/ShaderConfig.cs index 637ce8fe..b1fd6470 100644 --- a/Ryujinx.Graphics.Shader/Translation/ShaderConfig.cs +++ b/Ryujinx.Graphics.Shader/Translation/ShaderConfig.cs @@ -6,6 +6,8 @@ namespace Ryujinx.Graphics.Shader.Translation { public ShaderStage Stage { get; } + public bool GpPassthrough { get; } + public OutputTopology OutputTopology { get; } public int MaxOutputVertices { get; } @@ -33,6 +35,7 @@ namespace Ryujinx.Graphics.Shader.Translation public ShaderConfig(IGpuAccessor gpuAccessor, TranslationFlags flags, TranslationCounts counts) { Stage = ShaderStage.Compute; + GpPassthrough = false; OutputTopology = OutputTopology.PointList; MaxOutputVertices = 0; LocalMemorySize = 0; @@ -51,6 +54,7 @@ namespace Ryujinx.Graphics.Shader.Translation public ShaderConfig(ShaderHeader header, IGpuAccessor gpuAccessor, TranslationFlags flags, TranslationCounts counts) { Stage = header.Stage; + GpPassthrough = header.Stage == ShaderStage.Geometry && header.GpPassthrough; OutputTopology = header.OutputTopology; MaxOutputVertices = header.MaxOutputVertexCount; LocalMemorySize = header.ShaderLocalMemoryLowSize + header.ShaderLocalMemoryHighSize; diff --git a/Ryujinx.Graphics.Shader/Translation/ShaderHeader.cs b/Ryujinx.Graphics.Shader/Translation/ShaderHeader.cs index 1218d591..ff5932e1 100644 --- a/Ryujinx.Graphics.Shader/Translation/ShaderHeader.cs +++ b/Ryujinx.Graphics.Shader/Translation/ShaderHeader.cs @@ -81,6 +81,8 @@ namespace Ryujinx.Graphics.Shader.Translation public int SassVersion { get; } + public bool GpPassthrough { get; } + public bool DoesLoadOrStore { get; } public bool DoesFp64 { get; } @@ -136,6 +138,8 @@ namespace Ryujinx.Graphics.Shader.Translation SassVersion = commonWord0.Extract(17, 4); + GpPassthrough = commonWord0.Extract(24); + DoesLoadOrStore = commonWord0.Extract(26); DoesFp64 = commonWord0.Extract(27); -- cgit v1.2.3