summaryrefslogtreecommitdiffstats
path: root/video/out/opengl/video_shaders.c
diff options
context:
space:
mode:
authorBin Jin <bjin@ctrl-d.org>2017-07-24 19:15:15 +0000
committerBin Jin <bjin@ctrl-d.org>2017-07-25 04:07:26 +0800
commit13ef6bcf6fe129614299bb40daa1427a213ed949 (patch)
tree0a18b93c9d60a69f093f154faab5030d512700ee /video/out/opengl/video_shaders.c
parentdbef5b737e2f994f02923c8214cba368b663a655 (diff)
downloadmpv-13ef6bcf6fe129614299bb40daa1427a213ed949.tar.bz2
mpv-13ef6bcf6fe129614299bb40daa1427a213ed949.tar.xz
vo_opengl: enable compute shader for mesa
Mesa 17.1 supports compute shader but not full specs of OpenGL 4.3. Change the code to detect OpenGL extension "GL_ARB_compute_shader" rather than OpenGL version 4.3. HDR peak detection requires SSBO, and polar scaler requires 2D array extension. Add these extensions as requirement as well.
Diffstat (limited to 'video/out/opengl/video_shaders.c')
-rw-r--r--video/out/opengl/video_shaders.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/video/out/opengl/video_shaders.c b/video/out/opengl/video_shaders.c
index fe6e944168..854c829f1d 100644
--- a/video/out/opengl/video_shaders.c
+++ b/video/out/opengl/video_shaders.c
@@ -241,6 +241,7 @@ void pass_compute_polar(struct gl_shader_cache *sc, struct scaler *scaler,
gl_sc_uniform_tex(sc, "lut", scaler->gl_target, scaler->gl_lut);
// Load all relevant texels into shmem
+ gl_sc_enable_extension(sc, "GL_ARB_arrays_of_arrays");
for (int c = 0; c < components; c++)
GLSLHF("shared float in%d[%d][%d];\n", c, ih, iw);