0
0
Fork 0

Fix compute restore of previous shader state (#1352)

This commit is contained in:
gdkchan 2020-07-03 19:30:41 -03:00 committed by GitHub
parent 302d0f830c
commit b0d9ec8a82
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 2 deletions

View file

@ -163,7 +163,7 @@ namespace Ryujinx.Graphics.Gpu.Engine
qmd.CtaRasterHeight,
qmd.CtaRasterDepth);
UpdateShaderState(state);
_forceShaderUpdate = true;
}
}
}

View file

@ -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);
}