Merge pull request #2177 from riperiperi/feature/parallel-shader-cache

Allow parallel shader compilation when loading a shader cache
This commit is contained in:
EmulationFanatic 2021-05-19 11:39:19 -07:00 committed by GitHub
commit b5c72b44de
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
16 changed files with 785 additions and 251 deletions

View file

@ -131,6 +131,11 @@ namespace Ryujinx.Graphics.OpenGL
PrintGpuInformation();
if (HwCapabilities.SupportsParallelShaderCompile)
{
GL.Arb.MaxShaderCompilerThreads(Math.Min(Environment.ProcessorCount, 8));
}
_counters.Initialize();
}
@ -178,16 +183,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)