Optimize
This commit is contained in:
parent
afd0b6ad9a
commit
dfb9c7e691
@ -177,11 +177,8 @@ namespace Ryujinx.Graphics.Gpu.Shader.DiskCache
|
|||||||
GuestCodeAndCbData?[] guestShaders,
|
GuestCodeAndCbData?[] guestShaders,
|
||||||
ShaderSpecializationState specState,
|
ShaderSpecializationState specState,
|
||||||
int programIndex,
|
int programIndex,
|
||||||
bool isCompute,
|
bool isCompute)
|
||||||
int shaderTranslationDelay)
|
|
||||||
{
|
{
|
||||||
Thread.Sleep(shaderTranslationDelay);
|
|
||||||
|
|
||||||
GuestShaders = guestShaders;
|
GuestShaders = guestShaders;
|
||||||
SpecializationState = specState;
|
SpecializationState = specState;
|
||||||
ProgramIndex = programIndex;
|
ProgramIndex = programIndex;
|
||||||
@ -370,7 +367,10 @@ namespace Ryujinx.Graphics.Gpu.Shader.DiskCache
|
|||||||
{
|
{
|
||||||
try
|
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);
|
_asyncTranslationQueue.Add(asyncTranslation, _cancellationToken);
|
||||||
}
|
}
|
||||||
catch (OperationCanceledException)
|
catch (OperationCanceledException)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user