mirror of
https://github.com/blawar/GLideN64.git
synced 2024-07-07 03:13:49 +00:00
Adding check that there is at least one binary format for shader cache support
There is one implementation that supports the get_program_binary extension, but doesn't provide any actual formats. (it's Mesa) In any case this is probably a good check to have.
This commit is contained in:
parent
a12c9e7464
commit
e126a51f6f
|
@ -97,7 +97,11 @@ void CombinerInfo::init()
|
|||
{
|
||||
m_pCurrent = NULL;
|
||||
m_pUniformCollection = createUniformCollection();
|
||||
m_bShaderCacheSupported = config.generalEmulation.enableShadersStorage != 0 && OGLVideo::isExtensionSupported(GET_PROGRAM_BINARY_EXTENSION);
|
||||
int numBinaryFormats;
|
||||
glGetIntegerv(GL_NUM_PROGRAM_BINARY_FORMATS, &numBinaryFormats);
|
||||
m_bShaderCacheSupported = config.generalEmulation.enableShadersStorage != 0 &&
|
||||
OGLVideo::isExtensionSupported(GET_PROGRAM_BINARY_EXTENSION) &&
|
||||
numBinaryFormats > 0;
|
||||
|
||||
m_shadersLoaded = 0;
|
||||
if (m_bShaderCacheSupported && !_loadShadersStorage()) {
|
||||
|
|
Loading…
Reference in New Issue
Block a user