softgpu: Check for queued compile.

Rarely, we could have queued compiling the same one, which would crash on
a double insert.
This commit is contained in:
Unknown W. Brackets 2022-12-03 12:15:58 -08:00
parent 238c9439e3
commit 38eb0a7a82
2 changed files with 5 additions and 2 deletions

View file

@ -182,7 +182,8 @@ NearestFunc SamplerJitCache::GetByID(const SamplerID &id, std::function<void()>
}
compileQueue_.clear();
Compile(id);
if (!cache_.Get(key))
Compile(id);
// Okay, should be there now.
return cache_.Get(key);