shader cache: Fix Linux boot issues (#1709)

* shader cache: Fix Linux boot issues

This rollback the init logic back to previous state, and replicate the
way PTC handle initialization.

* shader cache: set default state of ready for translation event to false

* Fix cpu unit tests
This commit is contained in:
Mary 2020-11-17 22:40:19 +01:00 committed by GitHub
parent cc60ba9d22
commit 863edae328
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 48 additions and 60 deletions

View file

@ -1,4 +1,3 @@
using Ryujinx.Common.Configuration;
using Ryujinx.Graphics.GAL;
using Ryujinx.Graphics.Gpu.Engine;
using Ryujinx.Graphics.Gpu.Engine.GPFifo;
@ -19,11 +18,6 @@ namespace Ryujinx.Graphics.Gpu
/// </summary>
public ManualResetEvent HostInitalized { get; }
/// <summary>
/// Event signaled when the gpu context is ready to be used.
/// </summary>
public ManualResetEvent ReadyEvent { get; }
/// <summary>
/// Host renderer.
/// </summary>
@ -93,20 +87,16 @@ namespace Ryujinx.Graphics.Gpu
_caps = new Lazy<Capabilities>(Renderer.GetCapabilities);
HostInitalized = new ManualResetEvent(false);
ReadyEvent = new ManualResetEvent(false);
}
/// <summary>
/// Initialize the GPU emulation context.
/// Initialize the GPU shader cache.
/// </summary>
/// <param name="logLevel">The log level required.</param>
public void Initialize(GraphicsDebugLevel logLevel)
public void InitializeShaderCache()
{
HostInitalized.WaitOne();
Renderer.Initialize(logLevel);
Methods.ShaderCache.Initialize();
ReadyEvent.Set();
}
/// <summary>
@ -142,7 +132,6 @@ namespace Ryujinx.Graphics.Gpu
Renderer.Dispose();
GPFifo.Dispose();
HostInitalized.Dispose();
ReadyEvent.Dispose();
}
}
}