From a9d7e227a8d572441e030604933f4e5b65e46155 Mon Sep 17 00:00:00 2001 From: Otozinclus <58051309+Otozinclus@users.noreply.github.com> Date: Wed, 1 Jan 2025 06:54:42 +0100 Subject: [PATCH] Only delay shaders translation on Metal --- .../Shader/DiskCache/ParallelDiskCacheLoader.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Ryujinx.Graphics.Gpu/Shader/DiskCache/ParallelDiskCacheLoader.cs b/src/Ryujinx.Graphics.Gpu/Shader/DiskCache/ParallelDiskCacheLoader.cs index 910e9aea0..cc9f9c6e8 100644 --- a/src/Ryujinx.Graphics.Gpu/Shader/DiskCache/ParallelDiskCacheLoader.cs +++ b/src/Ryujinx.Graphics.Gpu/Shader/DiskCache/ParallelDiskCacheLoader.cs @@ -368,7 +368,8 @@ public void QueueGuestProgram(GuestCodeAndCbData?[] guestShaders, ShaderSpeciali try { if (_context.DirtyHacks.IsEnabled(DirtyHack.ShaderTranslationDelay)) - Thread.Sleep(_context.DirtyHacks[DirtyHack.ShaderTranslationDelay]); + if (_context.Capabilities.Api == TargetApi.Metal) + Thread.Sleep(_context.DirtyHacks[DirtyHack.ShaderTranslationDelay]); AsyncProgramTranslation asyncTranslation = new(guestShaders, specState, programIndex, isCompute); _asyncTranslationQueue.Add(asyncTranslation, _cancellationToken);