diff options
author | Bin Jin <bjin@ctrl-d.org> | 2017-07-24 19:15:15 +0000 |
---|---|---|
committer | Bin Jin <bjin@ctrl-d.org> | 2017-07-25 04:07:26 +0800 |
commit | 13ef6bcf6fe129614299bb40daa1427a213ed949 (patch) | |
tree | 0a18b93c9d60a69f093f154faab5030d512700ee /video/out/opengl/common.c | |
parent | dbef5b737e2f994f02923c8214cba368b663a655 (diff) | |
download | mpv-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/common.c')
-rw-r--r-- | video/out/opengl/common.c | 9 |
1 files changed, 9 insertions, 0 deletions
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; |