mirror of
https://github.com/cemu-project/Cemu.git
synced 2024-12-24 00:31:52 +01:00
OpenGL: Restore ProgramBinary cache for GL shaders (#1209)
This commit is contained in:
parent
c913a59c7a
commit
523a1652df
@ -23,16 +23,13 @@ bool RendererShaderGL::loadBinary()
|
||||
cemu_assert_debug(m_baseHash != 0);
|
||||
uint64 h1, h2;
|
||||
GenerateShaderPrecompiledCacheFilename(m_type, m_baseHash, m_auxHash, h1, h2);
|
||||
sint32 fileSize = 0;
|
||||
std::vector<uint8> cacheFileData;
|
||||
if (!s_programBinaryCache->GetFile({h1, h2 }, cacheFileData))
|
||||
return false;
|
||||
if (fileSize < sizeof(uint32))
|
||||
{
|
||||
if (cacheFileData.size() <= sizeof(uint32))
|
||||
return false;
|
||||
}
|
||||
|
||||
uint32 shaderBinFormat = *(uint32*)(cacheFileData.data() + 0);
|
||||
uint32 shaderBinFormat = *(uint32*)(cacheFileData.data());
|
||||
|
||||
m_program = glCreateProgram();
|
||||
glProgramBinary(m_program, shaderBinFormat, cacheFileData.data()+4, cacheFileData.size()-4);
|
||||
|
Loading…
Reference in New Issue
Block a user