From 13ef6bcf6fe129614299bb40daa1427a213ed949 Mon Sep 17 00:00:00 2001 From: Bin Jin Date: Mon, 24 Jul 2017 19:15:15 +0000 Subject: 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. --- video/out/opengl/common.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'video/out/opengl/common.c') diff --git a/video/out/opengl/common.c b/video/out/opengl/common.c index 9af21856ab..c7a714817a 100644 --- a/video/out/opengl/common.c +++ b/video/out/opengl/common.c @@ -357,6 +357,11 @@ static const struct gl_functions gl_functions[] = { {0}, }, }, + { + .ver_core = 430, + .extension = "GL_ARB_arrays_of_arrays", + .provides = MPGL_CAP_NESTED_ARRAY, + }, // Swap control, always an OS specific extension // The OSX code loads this manually. { @@ -619,6 +624,10 @@ void mpgl_load_functions2(GL *gl, void *(*get_fn)(void *ctx, const char *n), mp_verbose(log, "Detected suspected software renderer.\n"); } + // GL_ARB_compute_shader & GL_ARB_shader_image_load_store + if (gl->DispatchCompute && gl->BindImageTexture) + gl->mpgl_caps |= MPGL_CAP_COMPUTE_SHADER; + // Provided for simpler handling if no framebuffer support is available. if (!gl->BindFramebuffer) gl->BindFramebuffer = &dummy_glBindFramebuffer; -- cgit v1.2.3