mirror of
https://github.com/mpv-player/mpv
synced 2024-11-14 22:48:35 +01:00
vo_opengl: use 16 bit textures with angle
Regression due to 03fe506
. It accidentally changed the default value if
glGetTexLevelParameteriv() is not available, which is the case with
ANGLE.
This commit is contained in:
parent
31611fc46b
commit
1c0bd59bc2
@ -1255,8 +1255,12 @@ void gl_pbo_upload_uninit(struct gl_pbo_upload *pbo)
|
||||
int gl_determine_16bit_tex_depth(GL *gl)
|
||||
{
|
||||
const struct gl_format *fmt = gl_find_unorm_format(gl, 2, 1);
|
||||
if (!gl->GetTexLevelParameteriv || !fmt)
|
||||
if (!gl->GetTexLevelParameteriv || !fmt) {
|
||||
// ANGLE supports ES 3.0 and the extension, but lacks the function above.
|
||||
if (gl->mpgl_caps & MPGL_CAP_EXT16)
|
||||
return 16;
|
||||
return -1;
|
||||
}
|
||||
|
||||
GLuint tex;
|
||||
gl->GenTextures(1, &tex);
|
||||
|
@ -3310,7 +3310,6 @@ struct gl_video *gl_video_init(GL *gl, struct mp_log *log, struct mpv_global *g)
|
||||
.gl = gl,
|
||||
.global = g,
|
||||
.log = log,
|
||||
.texture_16bit_depth = 16,
|
||||
.sc = gl_sc_create(gl, log),
|
||||
.opts_cache = m_config_cache_alloc(p, g, &gl_video_conf),
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user