mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-21 05:09:34 -06:00
Checking GLEW_VERSION_4_0 is superfluous since we check GL_ARB_get_program_binary, and it's a runtime variable anyways.
This commit is contained in:

committed by
Sonicadvance1

parent
31a8424bcc
commit
aaa405c973
@ -85,25 +85,17 @@ struct PROGRAMSHADER
|
||||
// TODO at first glance looks bad - malloc/no free/pointer not saved in instance...
|
||||
u8 *Data()
|
||||
{
|
||||
#ifdef GLEW_VERSION_4_0
|
||||
glGetProgramiv(glprogid, GL_PROGRAM_BINARY_LENGTH, &binaryLength);
|
||||
u8* binary = (u8*)malloc(binaryLength);
|
||||
glGetProgramBinary(glprogid, binaryLength, NULL, &ProgramFormat, binary);
|
||||
return binary;
|
||||
#else
|
||||
return NULL;
|
||||
#endif
|
||||
}
|
||||
|
||||
GLint Size()
|
||||
{
|
||||
#ifdef GLEW_VERSION_4_0
|
||||
if (!binaryLength)
|
||||
glGetProgramiv(glprogid, GL_PROGRAM_BINARY_LENGTH, &binaryLength);
|
||||
return binaryLength;
|
||||
#else
|
||||
return 0;
|
||||
#endif
|
||||
}
|
||||
};
|
||||
|
||||
@ -137,7 +129,6 @@ class ProgramShaderCache
|
||||
public:
|
||||
void Read(const PROGRAMUID &key, const u8 *value, u32 value_size)
|
||||
{
|
||||
#ifdef GLEW_VERSION_4_0
|
||||
PCacheEntry entry;
|
||||
|
||||
// The two shaders might not even exist anymore
|
||||
@ -158,7 +149,6 @@ class ProgramShaderCache
|
||||
glUseProgram(entry.program.glprogid);
|
||||
SetProgramVariables(entry, key);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user