simplify + check for metal first

This commit is contained in:
Evan Husted 2024-12-31 23:59:35 -06:00 committed by GitHub
parent a9d7e227a8
commit 3bb115d690
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

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);