OpenGL: use shader 420pack if available to staticly bind ubo location

Bindung locations after compiling a shader stalls the driver. So if we manage not to bind anything after compilation, the lag would be reduced much.
This commit is contained in:
degasus 2014-01-05 10:38:45 +01:00
parent 4fff5ac90d
commit c42f274e22
5 changed files with 8 additions and 4 deletions

View file

@ -371,6 +371,7 @@ Renderer::Renderer()
g_Config.backend_info.bSupportsGLSLUBO = !DriverDetails::HasBug(DriverDetails::BUG_ANNIHILATEDUBOS);
g_Config.backend_info.bSupportsPrimitiveRestart = true;
g_Config.backend_info.bSupportsEarlyZ = false;
g_Config.backend_info.bSupportShadingLanguage420pack = false;
g_ogl_config.bSupportsGLSLCache = true;
g_ogl_config.bSupportsGLPinnedMemory = false;
@ -482,6 +483,7 @@ Renderer::Renderer()
g_Config.backend_info.bSupportsPrimitiveRestart = !DriverDetails::HasBug(DriverDetails::BUG_PRIMITIVERESTART) &&
(TO_BOOL(GLEW_VERSION_3_1) || TO_BOOL(GLEW_NV_primitive_restart));
g_Config.backend_info.bSupportsEarlyZ = TO_BOOL(GLEW_ARB_shader_image_load_store);
g_Config.backend_info.bSupportShadingLanguage420pack = TO_BOOL(GLEW_ARB_shading_language_420pack);
g_ogl_config.bSupportsGLSLCache = TO_BOOL(GLEW_ARB_get_program_binary);
g_ogl_config.bSupportsGLPinnedMemory = TO_BOOL(GLEW_AMD_pinned_memory);