aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorgdkchan <gab.dark.100@gmail.com>2020-07-03 19:30:41 -0300
committerGitHub <noreply@github.com>2020-07-04 00:30:41 +0200
commitb0d9ec8a8202039b21fb799707c8d26f37c4fbfd (patch)
tree184de99948a056afb9279900112729d8197998c5
parent302d0f830c903c60b0859cecc9cb304c365ca987 (diff)
Fix compute restore of previous shader state (#1352)
-rw-r--r--Ryujinx.Graphics.Gpu/Engine/Compute.cs2
-rw-r--r--Ryujinx.Graphics.Gpu/Engine/Methods.cs6
2 files changed, 6 insertions, 2 deletions
diff --git a/Ryujinx.Graphics.Gpu/Engine/Compute.cs b/Ryujinx.Graphics.Gpu/Engine/Compute.cs
index 9f0034eb..4d18f4d3 100644
--- a/Ryujinx.Graphics.Gpu/Engine/Compute.cs
+++ b/Ryujinx.Graphics.Gpu/Engine/Compute.cs
@@ -163,7 +163,7 @@ namespace Ryujinx.Graphics.Gpu.Engine
qmd.CtaRasterHeight,
qmd.CtaRasterDepth);
- UpdateShaderState(state);
+ _forceShaderUpdate = true;
}
}
} \ No newline at end of file
diff --git a/Ryujinx.Graphics.Gpu/Engine/Methods.cs b/Ryujinx.Graphics.Gpu/Engine/Methods.cs
index 5957bb62..fc933131 100644
--- a/Ryujinx.Graphics.Gpu/Engine/Methods.cs
+++ b/Ryujinx.Graphics.Gpu/Engine/Methods.cs
@@ -38,6 +38,8 @@ namespace Ryujinx.Graphics.Gpu.Engine
private bool _isAnyVbInstanced;
private bool _vsUsesInstanceId;
+ private bool _forceShaderUpdate;
+
/// <summary>
/// Creates a new instance of the GPU methods class.
/// </summary>
@@ -121,8 +123,10 @@ namespace Ryujinx.Graphics.Gpu.Engine
// Shaders must be the first one to be updated if modified, because
// some of the other state depends on information from the currently
// bound shaders.
- if (state.QueryModified(MethodOffset.ShaderBaseAddress, MethodOffset.ShaderState))
+ if (state.QueryModified(MethodOffset.ShaderBaseAddress, MethodOffset.ShaderState) || _forceShaderUpdate)
{
+ _forceShaderUpdate = false;
+
UpdateShaderState(state);
}