summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorReinUsesLisp <reinuseslisp@airmail.cc>2019-01-16 04:37:35 -0300
committerReinUsesLisp <reinuseslisp@airmail.cc>2019-02-06 22:23:40 -0300
commitdf0f31f44ea4e6945031a84f4bed7f231649fdb4 (patch)
tree91171ce20b333d027f7aa136fe4f2431112f76d8
parent7fefec585c805fa09951da11890bb90afb8a42a9 (diff)
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.
-rw-r--r--src/video_core/renderer_opengl/gl_shader_cache.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/video_core/renderer_opengl/gl_shader_cache.cpp b/src/video_core/renderer_opengl/gl_shader_cache.cpp
index b2b5c2aa5..7eeae082a 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<OGLProgram>();
shader->handle = glCreateProgram();
+ glProgramParameteri(shader->handle, GL_PROGRAM_SEPARABLE, GL_TRUE);
glProgramBinary(shader->handle, dump.binary_format, dump.binary.data(),
static_cast<GLsizei>(dump.binary.size()));