From df0f31f44ea4e6945031a84f4bed7f231649fdb4 Mon Sep 17 00:00:00 2001 From: ReinUsesLisp Date: Wed, 16 Jan 2019 04:37:35 -0300 Subject: [PATCH] gl_shader_cache: Set GL_PROGRAM_SEPARABLE to dumped shaders i965 (and probably all mesa drivers) require GL_PROGRAM_SEPARABLE when using glProgramBinary. This is probably required by the standard but it's ignored by permisive proprietary drivers. --- src/video_core/renderer_opengl/gl_shader_cache.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/video_core/renderer_opengl/gl_shader_cache.cpp b/src/video_core/renderer_opengl/gl_shader_cache.cpp index b2b5c2aa5a..7eeae082ad 100644 --- a/src/video_core/renderer_opengl/gl_shader_cache.cpp +++ b/src/video_core/renderer_opengl/gl_shader_cache.cpp @@ -405,6 +405,7 @@ CachedProgram ShaderCacheOpenGL::GeneratePrecompiledProgram( CachedProgram shader = std::make_shared(); shader->handle = glCreateProgram(); + glProgramParameteri(shader->handle, GL_PROGRAM_SEPARABLE, GL_TRUE); glProgramBinary(shader->handle, dump.binary_format, dump.binary.data(), static_cast(dump.binary.size()));