From b31020b193db24e175bce077755c2f3e814e57ff Mon Sep 17 00:00:00 2001 From: Niklas Haas Date: Wed, 26 Jul 2017 01:42:19 +0200 Subject: vo_opengl: check against shmem limits The radius check was not strict enough, especially not for all platforms. To fix this, actually check the hardware capabilities instead of relying on a hard-coded maximum radius. --- video/out/opengl/common.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'video/out/opengl/common.c') diff --git a/video/out/opengl/common.c b/video/out/opengl/common.c index c7a714817a..f6202e2c8c 100644 --- a/video/out/opengl/common.c +++ b/video/out/opengl/common.c @@ -625,8 +625,10 @@ void mpgl_load_functions2(GL *gl, void *(*get_fn)(void *ctx, const char *n), } // GL_ARB_compute_shader & GL_ARB_shader_image_load_store - if (gl->DispatchCompute && gl->BindImageTexture) + if (gl->DispatchCompute && gl->BindImageTexture) { gl->mpgl_caps |= MPGL_CAP_COMPUTE_SHADER; + gl->GetIntegerv(GL_MAX_COMPUTE_SHARED_MEMORY_SIZE, &gl->max_shmem); + } // Provided for simpler handling if no framebuffer support is available. if (!gl->BindFramebuffer) -- cgit v1.2.3