Change shader cache init wait method (#6131)

* Change shader cache init wait method

* Make field readonly
This commit is contained in:
gdkchan 2024-01-18 14:17:38 -03:00 committed by GitHub
parent 2dbbc9bc05
commit 870d9599cc
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
11 changed files with 20 additions and 23 deletions

View file

@ -57,9 +57,6 @@ namespace ARMeilleure.Translation
private Thread[] _backgroundTranslationThreads;
private volatile int _threadCount;
// FIXME: Remove this once the init logic of the emulator will be redone.
public static readonly ManualResetEvent IsReadyForTranslation = new(false);
public Translator(IJitMemoryAllocator allocator, IMemoryManager memory, bool for64Bits)
{
_allocator = allocator;
@ -100,8 +97,6 @@ namespace ARMeilleure.Translation
{
if (Interlocked.Increment(ref _threadCount) == 1)
{
IsReadyForTranslation.WaitOne();
if (_ptc.State == PtcState.Enabled)
{
Debug.Assert(Functions.Count == 0);