Add sleep when translating shaders
This commit is contained in:
parent
95b7d38ad7
commit
d737b0a967
@ -178,10 +178,13 @@ namespace Ryujinx.Graphics.Gpu.Shader.DiskCache
|
|||||||
int programIndex,
|
int programIndex,
|
||||||
bool isCompute)
|
bool isCompute)
|
||||||
{
|
{
|
||||||
|
Thread.Sleep(shaderTranslationDelay);
|
||||||
|
|
||||||
GuestShaders = guestShaders;
|
GuestShaders = guestShaders;
|
||||||
SpecializationState = specState;
|
SpecializationState = specState;
|
||||||
ProgramIndex = programIndex;
|
ProgramIndex = programIndex;
|
||||||
IsCompute = isCompute;
|
IsCompute = isCompute,
|
||||||
|
int = shaderTranslationDelay;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -366,7 +369,7 @@ namespace Ryujinx.Graphics.Gpu.Shader.DiskCache
|
|||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
AsyncProgramTranslation asyncTranslation = new(guestShaders, specState, programIndex, isCompute);
|
AsyncProgramTranslation asyncTranslation = new(guestShaders, specState, programIndex, isCompute, _context.DirtyHacks[DirtyHacks.ShaderCompilationThreadSleep);
|
||||||
_asyncTranslationQueue.Add(asyncTranslation, _cancellationToken);
|
_asyncTranslationQueue.Add(asyncTranslation, _cancellationToken);
|
||||||
}
|
}
|
||||||
catch (OperationCanceledException)
|
catch (OperationCanceledException)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user