mirror of
https://github.com/Ryujinx/Ryujinx.git
synced 2025-06-28 23:00:47 -07:00
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:
@ -31,6 +31,9 @@ namespace ARMeilleure.Translation
|
||||
|
||||
private volatile int _threadCount;
|
||||
|
||||
// FIXME: Remove this once the init logic of the emulator will be redone
|
||||
public static ManualResetEvent IsReadyForTranslation = new ManualResetEvent(false);
|
||||
|
||||
public Translator(IJitMemoryAllocator allocator, IMemoryManager memory)
|
||||
{
|
||||
_memory = memory;
|
||||
@ -83,6 +86,8 @@ namespace ARMeilleure.Translation
|
||||
{
|
||||
if (Interlocked.Increment(ref _threadCount) == 1)
|
||||
{
|
||||
IsReadyForTranslation.WaitOne();
|
||||
|
||||
if (Ptc.State == PtcState.Enabled)
|
||||
{
|
||||
Ptc.MakeAndSaveTranslations(_funcs, _memory, _jumpTable);
|
||||
|
Reference in New Issue
Block a user