Fix inconsistencies in progress reporting (#2129)
Signal and setup events correctly Eliminate possible races Use a single event Mark volatiles and reduce scope of waithandles Common handler 100ms -> 50ms
This commit is contained in:
parent
0b022cad1e
commit
69f8722e79
6 changed files with 128 additions and 87 deletions
|
@ -80,25 +80,14 @@ namespace Ryujinx.Graphics.Gpu
|
|||
internal Capabilities Capabilities => _caps.Value;
|
||||
|
||||
/// <summary>
|
||||
/// Signaled when shader cache begins and ends loading.
|
||||
/// Signals true when loading has started, false when ended.
|
||||
/// Event for signalling shader cache loading progress.
|
||||
/// </summary>
|
||||
public event Action<bool> ShaderCacheStateChanged
|
||||
public event Action<Shader.ShaderCacheState, int, int> ShaderCacheStateChanged
|
||||
{
|
||||
add => Methods.ShaderCache.ShaderCacheStateChanged += value;
|
||||
remove => Methods.ShaderCache.ShaderCacheStateChanged -= value;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Signaled while shader cache is loading to indicate current progress.
|
||||
/// Provides current and total number of shaders loaded.
|
||||
/// </summary>
|
||||
public event Action<int, int> ShaderCacheProgressChanged
|
||||
{
|
||||
add => Methods.ShaderCache.ShaderCacheProgressChanged += value;
|
||||
remove => Methods.ShaderCache.ShaderCacheProgressChanged -= value;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Creates a new instance of the GPU emulation context.
|
||||
/// </summary>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue