mirror of
https://github.com/GreemDev/Ryujinx.git
synced 2025-01-08 06:01:58 +00:00
Shader translation delay hack (#469)
A workaround to avoid a freeze when translating shaders with the Metal backend, that would happen after changing version or going from Vulkan to Metal. Adds a delay in milliseconds, configurable in the UI behind the Dirty Hacks mechanism. --------- Co-authored-by: Evan Husted <greem@greemdev.net>
This commit is contained in:
parent
ec1020b165
commit
d10a478cce
1 changed files with 4 additions and 0 deletions
|
@ -1,3 +1,4 @@
|
|||
using Ryujinx.Common.Configuration;
|
||||
using Ryujinx.Common.Logging;
|
||||
using Ryujinx.Graphics.GAL;
|
||||
using Ryujinx.Graphics.Shader;
|
||||
|
@ -366,6 +367,9 @@ namespace Ryujinx.Graphics.Gpu.Shader.DiskCache
|
|||
{
|
||||
try
|
||||
{
|
||||
if (_context.DirtyHacks.IsEnabled(DirtyHacks.ShaderCompilationThreadSleep))
|
||||
Thread.Sleep(_context.DirtyHacks[DirtyHacks.ShaderCompilationThreadSleep]);
|
||||
|
||||
AsyncProgramTranslation asyncTranslation = new(guestShaders, specState, programIndex, isCompute);
|
||||
_asyncTranslationQueue.Add(asyncTranslation, _cancellationToken);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue