Implement parallel host shader cache compilation.

This commit is contained in:
riperiperi 2021-03-29 21:52:25 +01:00
parent bb43219f1d
commit ddf4b92a9c
7 changed files with 452 additions and 232 deletions

View file

@ -130,6 +130,11 @@ namespace Ryujinx.Graphics.OpenGL
PrintGpuInformation();
if (HwCapabilities.SupportsParallelShaderCompile)
{
GL.Arb.MaxShaderCompilerThreads(Math.Min(Environment.ProcessorCount, 8));
}
_counters.Initialize();
}
@ -177,16 +182,7 @@ namespace Ryujinx.Graphics.OpenGL
public IProgram LoadProgramBinary(byte[] programBinary)
{
Program program = new Program(programBinary);
if (program.IsLinked)
{
return program;
}
program.Dispose();
return null;
return new Program(programBinary);
}
public void CreateSync(ulong id)