aboutsummaryrefslogtreecommitdiff
path: root/Ryujinx.Graphics.Gpu/Engine/Threed/StateUpdater.cs
diff options
context:
space:
mode:
authorriperiperi <rhy3756547@hotmail.com>2022-12-16 12:40:01 +0000
committerGitHub <noreply@github.com>2022-12-16 09:40:01 -0300
commit5a085cba0fe15b8f4946ab328887a063afe3a147 (patch)
tree73762355814beb97a9e90769591bd51d746f87d9 /Ryujinx.Graphics.Gpu/Engine/Threed/StateUpdater.cs
parent1a1d33a018c74fd02fda93abfbde4760068fee65 (diff)
GPU: Fix layered attachment write (#4131)1.1.474
Fixes a regression caused by #4003 where the code that writes `_vtgWritesRtLayer` was removed, breaking the crowd in mario strikers.
Diffstat (limited to 'Ryujinx.Graphics.Gpu/Engine/Threed/StateUpdater.cs')
-rw-r--r--Ryujinx.Graphics.Gpu/Engine/Threed/StateUpdater.cs9
1 files changed, 8 insertions, 1 deletions
diff --git a/Ryujinx.Graphics.Gpu/Engine/Threed/StateUpdater.cs b/Ryujinx.Graphics.Gpu/Engine/Threed/StateUpdater.cs
index 572f7fb0..e6b47345 100644
--- a/Ryujinx.Graphics.Gpu/Engine/Threed/StateUpdater.cs
+++ b/Ryujinx.Graphics.Gpu/Engine/Threed/StateUpdater.cs
@@ -1295,7 +1295,14 @@ namespace Ryujinx.Graphics.Gpu.Engine.Threed
for (int stageIndex = 0; stageIndex < Constants.ShaderStages; stageIndex++)
{
- _currentProgramInfo[stageIndex] = gs.Shaders[stageIndex + 1]?.Info;
+ ShaderProgramInfo info = gs.Shaders[stageIndex + 1]?.Info;
+
+ if (info?.UsesRtLayer == true)
+ {
+ _vtgWritesRtLayer = true;
+ }
+
+ _currentProgramInfo[stageIndex] = info;
}
_context.Renderer.Pipeline.SetProgram(gs.HostProgram);