diff options
author | Mary <me@thog.eu> | 2020-11-17 22:40:19 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-11-17 22:40:19 +0100 |
commit | 863edae3283d92ba94a4b68c673ad3bff458b6dd (patch) | |
tree | 30d46bc664cfce64f3b2823c2e11a46796a2385b /ARMeilleure | |
parent | cc60ba9d22ecc582206b61074a0fd6ee2c987ed1 (diff) |
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
Diffstat (limited to 'ARMeilleure')
-rw-r--r-- | ARMeilleure/Translation/Translator.cs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/ARMeilleure/Translation/Translator.cs b/ARMeilleure/Translation/Translator.cs index 0c9d6842..80f7b962 100644 --- a/ARMeilleure/Translation/Translator.cs +++ b/ARMeilleure/Translation/Translator.cs @@ -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); |