From 43b4b34376cdea486906f8bb4058dda3be7e1bd8 Mon Sep 17 00:00:00 2001 From: riperiperi Date: Thu, 12 May 2022 14:47:13 +0100 Subject: Implement Viewport Transform Disable (#3328) * Initial implementation (no specialization) * Use specialization * Fix render scale, increase code gen version * Revert accidental change * Address Feedback --- Ryujinx.Graphics.Shader/Translation/ShaderConfig.cs | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'Ryujinx.Graphics.Shader/Translation/ShaderConfig.cs') diff --git a/Ryujinx.Graphics.Shader/Translation/ShaderConfig.cs b/Ryujinx.Graphics.Shader/Translation/ShaderConfig.cs index 23b8b951..27d72cd5 100644 --- a/Ryujinx.Graphics.Shader/Translation/ShaderConfig.cs +++ b/Ryujinx.Graphics.Shader/Translation/ShaderConfig.cs @@ -14,6 +14,7 @@ namespace Ryujinx.Graphics.Shader.Translation public ShaderStage Stage { get; } public bool GpPassthrough { get; } + public bool LastInVertexPipeline { get; private set; } public int ThreadsPerInputPrimitive { get; } @@ -135,6 +136,7 @@ namespace Ryujinx.Graphics.Shader.Translation OmapSampleMask = header.OmapSampleMask; OmapDepth = header.OmapDepth; TransformFeedbackEnabled = gpuAccessor.QueryTransformFeedbackEnabled(); + LastInVertexPipeline = header.Stage < ShaderStage.Fragment; } public int GetDepthRegister() @@ -274,6 +276,11 @@ namespace Ryujinx.Graphics.Shader.Translation NextInputAttributesPerPatchComponents = config.ThisInputAttributesPerPatchComponents; NextUsesFixedFuncAttributes = config.UsedFeatures.HasFlag(FeatureFlags.FixedFuncAttr); MergeOutputUserAttributes(config.UsedInputAttributes, config.UsedInputAttributesPerPatch); + + if (config.Stage != ShaderStage.Fragment) + { + LastInVertexPipeline = false; + } } public void MergeOutputUserAttributes(int mask, int maskPerPatch) -- cgit v1.2.3