Fix compute restore of previous shader state (#1352)
This commit is contained in:
parent
302d0f830c
commit
b0d9ec8a82
2 changed files with 6 additions and 2 deletions
|
@ -163,7 +163,7 @@ namespace Ryujinx.Graphics.Gpu.Engine
|
||||||
qmd.CtaRasterHeight,
|
qmd.CtaRasterHeight,
|
||||||
qmd.CtaRasterDepth);
|
qmd.CtaRasterDepth);
|
||||||
|
|
||||||
UpdateShaderState(state);
|
_forceShaderUpdate = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -38,6 +38,8 @@ namespace Ryujinx.Graphics.Gpu.Engine
|
||||||
private bool _isAnyVbInstanced;
|
private bool _isAnyVbInstanced;
|
||||||
private bool _vsUsesInstanceId;
|
private bool _vsUsesInstanceId;
|
||||||
|
|
||||||
|
private bool _forceShaderUpdate;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Creates a new instance of the GPU methods class.
|
/// Creates a new instance of the GPU methods class.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -121,8 +123,10 @@ namespace Ryujinx.Graphics.Gpu.Engine
|
||||||
// Shaders must be the first one to be updated if modified, because
|
// Shaders must be the first one to be updated if modified, because
|
||||||
// some of the other state depends on information from the currently
|
// some of the other state depends on information from the currently
|
||||||
// bound shaders.
|
// bound shaders.
|
||||||
if (state.QueryModified(MethodOffset.ShaderBaseAddress, MethodOffset.ShaderState))
|
if (state.QueryModified(MethodOffset.ShaderBaseAddress, MethodOffset.ShaderState) || _forceShaderUpdate)
|
||||||
{
|
{
|
||||||
|
_forceShaderUpdate = false;
|
||||||
|
|
||||||
UpdateShaderState(state);
|
UpdateShaderState(state);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Reference in a new issue