vo_gpu: opengl: disable compute shaders for old GLSL

Fixes #6272.
This commit is contained in:
Niklas Haas 2018-11-13 20:28:03 +01:00 committed by sfan5
parent b222980394
commit 2704625e3f
1 changed files with 6 additions and 0 deletions

View File

@ -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++) {