aboutsummaryrefslogtreecommitdiff
path: root/Ryujinx.Graphics.Gpu/Engine/Methods.cs
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 /Ryujinx.Graphics.Gpu/Engine/Methods.cs
parent302d0f830c903c60b0859cecc9cb304c365ca987 (diff)
Fix compute restore of previous shader state (#1352)
Diffstat (limited to 'Ryujinx.Graphics.Gpu/Engine/Methods.cs')
-rw-r--r--Ryujinx.Graphics.Gpu/Engine/Methods.cs6
1 files changed, 5 insertions, 1 deletions
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);
}