Add progress reporting to PTC and Shader Cache (#2057)

* UI changes

* Add progress reporting to PTC & ShaderCache

* Account for null events and expand docs

Co-authored-by: Joshi234 <46032261+Joshi234@users.noreply.github.com>
This commit is contained in:
mageven 2021-03-03 06:09:36 +05:30 committed by GitHub
parent 31fca432a7
commit ca5d8e58dd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 148 additions and 19 deletions

View file

@ -79,6 +79,26 @@ namespace Ryujinx.Graphics.Gpu
/// </summary>
internal Capabilities Capabilities => _caps.Value;
/// <summary>
/// Signaled when shader cache begins and ends loading.
/// Signals true when loading has started, false when ended.
/// </summary>
public event Action<bool> 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>