diff options
Diffstat (limited to 'video/out/gpu/video.c')
-rw-r--r-- | video/out/gpu/video.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/video/out/gpu/video.c b/video/out/gpu/video.c index add7985f78..035619891b 100644 --- a/video/out/gpu/video.c +++ b/video/out/gpu/video.c @@ -2698,9 +2698,12 @@ static void pass_dither(struct gl_video *p) struct image img = image_wrap(p->error_diffusion_tex[0], PLANE_RGB, p->components); - // 1024 is minimal required number of invocation allowed in single - // work group in OpenGL. Use it for maximal performance. - int block_size = MPMIN(1024, o_h); + // Ensure the block size doesn't exceed the minimum defined by the + // specification (1024 in desktop GL, 128 in GLES). + // TODO: Look up the actual maximum block size for the + // implementation using: + // glGetIntegerv(MAX_COMPUTE_WORK_GROUP_INVOCATIONS, &value); + int block_size = MPMIN(p->ra->glsl_es ? 128 : 1024, o_h); pass_describe(p, "dither=error-diffusion (kernel=%s, depth=%d)", kernel->name, dst_depth); |