diff options
| author | gdkchan <gab.dark.100@gmail.com> | 2020-07-03 19:30:41 -0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-07-04 00:30:41 +0200 |
| commit | b0d9ec8a8202039b21fb799707c8d26f37c4fbfd (patch) | |
| tree | 184de99948a056afb9279900112729d8197998c5 | |
| parent | 302d0f830c903c60b0859cecc9cb304c365ca987 (diff) | |
Fix compute restore of previous shader state (#1352)
| -rw-r--r-- | Ryujinx.Graphics.Gpu/Engine/Compute.cs | 2 | ||||
| -rw-r--r-- | Ryujinx.Graphics.Gpu/Engine/Methods.cs | 6 |
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); } |
