Only delay shader translation on Metal #480

Merged
Otozinclus merged 2 commits from Only-delay-shaders-on-Metal into master 2025-01-01 06:18:17 +00:00
Showing only changes of commit 3bb115d690 - Show all commits

View File

@ -367,9 +367,8 @@ namespace Ryujinx.Graphics.Gpu.Shader.DiskCache
{ {
try try
{ {
if (_context.DirtyHacks.IsEnabled(DirtyHack.ShaderTranslationDelay)) if (_context.Capabilities.Api == TargetApi.Metal && _context.DirtyHacks.IsEnabled(DirtyHack.ShaderTranslationDelay))
if (_context.Capabilities.Api == TargetApi.Metal) Thread.Sleep(_context.DirtyHacks[DirtyHack.ShaderTranslationDelay]);
Thread.Sleep(_context.DirtyHacks[DirtyHack.ShaderTranslationDelay]);
AsyncProgramTranslation asyncTranslation = new(guestShaders, specState, programIndex, isCompute); AsyncProgramTranslation asyncTranslation = new(guestShaders, specState, programIndex, isCompute);
_asyncTranslationQueue.Add(asyncTranslation, _cancellationToken); _asyncTranslationQueue.Add(asyncTranslation, _cancellationToken);