This commit is contained in:
Evan Husted 2024-12-30 01:00:42 -06:00 committed by GitHub
parent afd0b6ad9a
commit dfb9c7e691
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -177,11 +177,8 @@ namespace Ryujinx.Graphics.Gpu.Shader.DiskCache
GuestCodeAndCbData?[] guestShaders,
ShaderSpecializationState specState,
int programIndex,
bool isCompute,
int shaderTranslationDelay)
bool isCompute)
{
Thread.Sleep(shaderTranslationDelay);
GuestShaders = guestShaders;
SpecializationState = specState;
ProgramIndex = programIndex;
@ -370,7 +367,10 @@ namespace Ryujinx.Graphics.Gpu.Shader.DiskCache
{
try
{
AsyncProgramTranslation asyncTranslation = new(guestShaders, specState, programIndex, isCompute, _context.DirtyHacks[DirtyHacks.ShaderCompilationThreadSleep]);
if (_context.DirtyHacks.IsEnabled(DirtyHacks.ShaderCompilationThreadSleep))
Thread.Sleep(_context.DirtyHacks[DirtyHacks.ShaderCompilationThreadSleep]);
AsyncProgramTranslation asyncTranslation = new(guestShaders, specState, programIndex, isCompute);
_asyncTranslationQueue.Add(asyncTranslation, _cancellationToken);
}
catch (OperationCanceledException)