summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNiklas Haas <git@haasn.xyz>2018-11-13 20:28:03 +0100
committersfan5 <sfan5@live.de>2018-11-17 00:49:10 +0100
commit2704625e3f90ce770685add724055092acb8d364 (patch)
tree8c1fe61592067a2aee2c6f8c595670eec67da317
parentb2229803946e81b11a75110d70b38e05d666f051 (diff)
downloadmpv-2704625e3f90ce770685add724055092acb8d364.tar.bz2
mpv-2704625e3f90ce770685add724055092acb8d364.tar.xz
vo_gpu: opengl: disable compute shaders for old GLSL
Fixes #6272.
-rw-r--r--video/out/opengl/ra_gl.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/video/out/opengl/ra_gl.c b/video/out/opengl/ra_gl.c
index 70bd9f61aa..1101f44c49 100644
--- a/video/out/opengl/ra_gl.c
+++ b/video/out/opengl/ra_gl.c
@@ -124,6 +124,12 @@ static int ra_init_gl(struct ra *ra, GL *gl)
if (gl->BlitFramebuffer)
ra->caps |= RA_CAP_BLIT;
+ // Disable compute shaders for GLSL < 420. This work-around is needed since
+ // some buggy OpenGL drivers expose compute shaders for lower GLSL versions,
+ // despite the spec requiring 420+.
+ if (ra->glsl_version < 420)
+ ra->caps &= ~RA_CAP_COMPUTE;
+
int gl_fmt_features = gl_format_feature_flags(gl);
for (int n = 0; gl_formats[n].internal_format; n++) {