From 37c165e9fc79ab442d868bec40580797a80421c8 Mon Sep 17 00:00:00 2001 From: Otozinclus <58051309+Otozinclus@users.noreply.github.com> Date: Wed, 1 Jan 2025 07:18:17 +0100 Subject: [PATCH] Only delay shader translation on Metal (#480) This way the Arbitrary Shader Translation Delay hack will no longer affect shader loading when using Vulkan. --- .../Shader/DiskCache/ParallelDiskCacheLoader.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Ryujinx.Graphics.Gpu/Shader/DiskCache/ParallelDiskCacheLoader.cs b/src/Ryujinx.Graphics.Gpu/Shader/DiskCache/ParallelDiskCacheLoader.cs index 910e9aea0..eb0f72af1 100644 --- a/src/Ryujinx.Graphics.Gpu/Shader/DiskCache/ParallelDiskCacheLoader.cs +++ b/src/Ryujinx.Graphics.Gpu/Shader/DiskCache/ParallelDiskCacheLoader.cs @@ -367,7 +367,7 @@ namespace Ryujinx.Graphics.Gpu.Shader.DiskCache { try { - if (_context.DirtyHacks.IsEnabled(DirtyHack.ShaderTranslationDelay)) + if (_context.Capabilities.Api == TargetApi.Metal && _context.DirtyHacks.IsEnabled(DirtyHack.ShaderTranslationDelay)) Thread.Sleep(_context.DirtyHacks[DirtyHack.ShaderTranslationDelay]); AsyncProgramTranslation asyncTranslation = new(guestShaders, specState, programIndex, isCompute);