mirror of
https://github.com/mpv-player/mpv
synced 2024-10-30 04:46:41 +01:00
vo_opengl: make ES float texture format checks stricter
Some of these checks became pointless after dropping ES 2.0 support for extended filtering. GL_EXT_texture_rg is part of core in ES 3.0, and we already check for this version, so testing for the extension is redundant. GL_OES_texture_half_float_linear is also always available, at least as far as our needs go. The functionality we need from GL_EXT_color_buffer_half_float is always available in ES 3.2, and we explicitly check for ES 3.2, so reject this extension if the ES version is new enough.
This commit is contained in:
parent
80d702dce8
commit
049e3ccb65
@ -256,17 +256,12 @@ static const struct gl_functions gl_functions[] = {
|
||||
.ver_exclude = 300,
|
||||
.ver_es_exclude = 1,
|
||||
},
|
||||
// 16 bit float textures filterable with GL_LINEAR in GLES
|
||||
{
|
||||
.extension = "GL_OES_texture_half_float_linear",
|
||||
.provides = MPGL_CAP_OES_HFLOAT_LIN,
|
||||
.ver_exclude = 1,
|
||||
},
|
||||
// 16 bit float textures that can be rendered to in GLES
|
||||
{
|
||||
.extension = "GL_EXT_color_buffer_half_float",
|
||||
.provides = MPGL_CAP_EXT_CR_HFLOAT,
|
||||
.ver_exclude = 1,
|
||||
.ver_es_exclude = 320,
|
||||
},
|
||||
{
|
||||
.ver_core = 320,
|
||||
|
@ -63,7 +63,6 @@ enum {
|
||||
MPGL_CAP_EXT16 = (1 << 18), // GL_EXT_texture_norm16
|
||||
MPGL_CAP_ARB_FLOAT = (1 << 19), // GL_ARB_texture_float
|
||||
MPGL_CAP_EXT_CR_HFLOAT = (1 << 20), // GL_EXT_color_buffer_half_float
|
||||
MPGL_CAP_OES_HFLOAT_LIN = (1 << 21), // GL_OES_texture_half_float_linear
|
||||
|
||||
MPGL_CAP_SW = (1 << 30), // indirect or sw renderer
|
||||
};
|
||||
|
@ -116,9 +116,7 @@ int gl_format_feature_flags(GL *gl)
|
||||
| (gl->es >= 320 ? F_ES32 : 0)
|
||||
| (gl->mpgl_caps & MPGL_CAP_EXT16 ? F_EXT16 : 0)
|
||||
| ((gl->es >= 300 &&
|
||||
(gl->mpgl_caps & MPGL_CAP_TEX_RG) &&
|
||||
(gl->mpgl_caps & MPGL_CAP_EXT_CR_HFLOAT) &&
|
||||
(gl->mpgl_caps & MPGL_CAP_OES_HFLOAT_LIN)) ? F_EXTF16 : 0)
|
||||
(gl->mpgl_caps & MPGL_CAP_EXT_CR_HFLOAT)) ? F_EXTF16 : 0)
|
||||
| ((gl->version == 210 &&
|
||||
(gl->mpgl_caps & MPGL_CAP_ARB_FLOAT) &&
|
||||
(gl->mpgl_caps & MPGL_CAP_TEX_RG) &&
|
||||
|
@ -23,8 +23,7 @@ enum {
|
||||
F_ES3 = 1 << 3, // ES3.0 or later
|
||||
F_ES32 = 1 << 4, // ES3.2 or later
|
||||
F_EXT16 = 1 << 5, // ES with GL_EXT_texture_norm16
|
||||
F_EXTF16 = 1 << 6, // GL_OES_texture_half_float_linear +
|
||||
// GL_EXT_color_buffer_half_float
|
||||
F_EXTF16 = 1 << 6, // GL_EXT_color_buffer_half_float
|
||||
F_GL2F = 1 << 7, // GL2.1-only with texture_rg + texture_float + FBOs
|
||||
F_APPL = 1 << 8, // GL_APPLE_rgb_422
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user