mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-06-27 04:31:41 +00:00
workaround for buggy intel windows driver. revert this as soon as there are newer driver
This commit is contained in:
parent
0325e37bfb
commit
a0ef58418b
1 changed files with 15 additions and 2 deletions
|
@ -488,6 +488,19 @@ void ProgramShaderCache::Shutdown(void)
|
||||||
|
|
||||||
void ProgramShaderCache::CreateHeader ( void )
|
void ProgramShaderCache::CreateHeader ( void )
|
||||||
{
|
{
|
||||||
|
#ifdef _WIN32
|
||||||
|
// Intel Windows driver has a issue:
|
||||||
|
// their glsl doesn't know about the ubo extension, so we can't load it.
|
||||||
|
// but as version 140, ubo is in core and don't have to be loaded in glsl.
|
||||||
|
// as sandy do ogl3.1, glsl 140 is supported, so force it in this way.
|
||||||
|
// TODO: remove this again when the issue is fixed:
|
||||||
|
// see http://communities.intel.com/thread/36084
|
||||||
|
u8 *vendor = glGetString(GL_VENDOR);
|
||||||
|
bool intel_windows_hack = strcmp(vendor, "Intel") == 0;
|
||||||
|
#else
|
||||||
|
bool intel_windows_hack = false;
|
||||||
|
#endif
|
||||||
|
|
||||||
snprintf(s_glsl_header, sizeof(s_glsl_header),
|
snprintf(s_glsl_header, sizeof(s_glsl_header),
|
||||||
"#version %s\n"
|
"#version %s\n"
|
||||||
"#extension GL_ARB_texture_rectangle : enable\n"
|
"#extension GL_ARB_texture_rectangle : enable\n"
|
||||||
|
@ -510,8 +523,8 @@ void ProgramShaderCache::CreateHeader ( void )
|
||||||
"#define lerp(x, y, z) mix(x, y, z)\n"
|
"#define lerp(x, y, z) mix(x, y, z)\n"
|
||||||
|
|
||||||
|
|
||||||
, "130"
|
, intel_windows_hack ? "140" : "130"
|
||||||
, g_ActiveConfig.backend_info.bSupportsGLSLUBO ? "#extension GL_ARB_uniform_buffer_object : enable" : "// ubo disabled"
|
, g_ActiveConfig.backend_info.bSupportsGLSLUBO && !intel_windows_hack ? "#extension GL_ARB_uniform_buffer_object : enable" : "// ubo disabled"
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue