diff options
author | wm4 <wm4@nowhere> | 2017-06-17 13:54:21 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2017-06-17 13:55:07 +0200 |
commit | 182bbb59175f4fcb7d727d89dda7bb9a1596a6de (patch) | |
tree | 3a0e8e4942f0e83e2f0696df7d0eadd7a0eaf427 | |
parent | 2a0028aa130a542f10a2f88bd12025b6c240da27 (diff) |
vo_opengl: fall back to ordered dither instead of blowing up
In GLES 2 mode, we can do dither, but "fruit" dithering is still out of
the question, because it does not support any high depth textures.
(Actually we probably could use an 8 bit texture too for this, at least
with small matrix sizes, but it's still too much of a pain to convert
the data, so why bother.)
This is actually a regression; before this, forcibly enabling dumb mode
due to low GL caps actually happened to avoid this case.
Fixes #4519.
-rw-r--r-- | video/out/opengl/video.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/video/out/opengl/video.c b/video/out/opengl/video.c index f4695b1333..51d484d078 100644 --- a/video/out/opengl/video.c +++ b/video/out/opengl/video.c @@ -2192,14 +2192,19 @@ static void pass_dither(struct gl_video *p) const struct gl_format *fmt = gl_find_unorm_format(gl, 2, 1); if (!fmt || gl->es) fmt = gl_find_float16_format(gl, 1); - tex_size = size; if (fmt) { + tex_size = size; tex_iformat = fmt->internal_format; tex_format = fmt->format; + tex_type = GL_FLOAT; + tex_data = p->last_dither_matrix; + } else { + MP_VERBOSE(p, "GL too old. Falling back to ordered dither.\n"); + p->opts.dither_algo = DITHER_ORDERED; } - tex_type = GL_FLOAT; - tex_data = p->last_dither_matrix; - } else { + } + + if (p->opts.dither_algo == DITHER_ORDERED) { assert(sizeof(temp) >= 8 * 8); mp_make_ordered_dither_matrix(temp, 8); |