summaryrefslogtreecommitdiffstats
path: root/video
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2018-04-26 21:48:57 +0200
committerJan Ekström <jeebjp@gmail.com>2018-04-29 02:21:32 +0300
commiteb33556cbffae5a3514be1de18b8abcd8f754090 (patch)
treec56b8309d3ca47a8adcd8c553e4456d043a32df2 /video
parentb4173c1fd2b732a2e1a69e3cf8f96bbe4ecc3ed5 (diff)
downloadmpv-eb33556cbffae5a3514be1de18b8abcd8f754090.tar.bz2
mpv-eb33556cbffae5a3514be1de18b8abcd8f754090.tar.xz
egl_helpers: change minimum framebuffer size to 8 bit per component
This is for working around bugs in certain Android devices. At least one device fails to sort EGLConfigs by size, so eglChooseConfig() ends up choosing a config with 5/6/5 bits per r/g/b component. The other attributes in the affected EGLConfigs did not look like they should affect the sorting process as specified by the EGL 1.4 standard. The device was reported as: Sony Xperia Z3 Tablet Compact Firmware 6.0.1 build number 23.5.A.1.291 GL_VERSION='OpenGL ES 3.0 V@140.0 AU@ (GIT@I741a3d36ca)' GL_VENDOR='Qualcomm' GL_RENDERER='Adreno (TM) 330' Other Qualcom/Adreno devices have been reported as unaffected by this (including some with same GL_RENDERER string). "Fix" this by always requiring at least 8 bit. This means it would fail on devices which cannot provide this. We're fine with this. mpv-android/mpv-android#112
Diffstat (limited to 'video')
-rw-r--r--video/out/opengl/egl_helpers.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/video/out/opengl/egl_helpers.c b/video/out/opengl/egl_helpers.c
index a3b9c65059..29057614b2 100644
--- a/video/out/opengl/egl_helpers.c
+++ b/video/out/opengl/egl_helpers.c
@@ -115,9 +115,9 @@ static bool create_context(struct ra_ctx *ctx, EGLDisplay display,
EGLint attributes[] = {
EGL_SURFACE_TYPE, EGL_WINDOW_BIT,
- EGL_RED_SIZE, 1,
- EGL_GREEN_SIZE, 1,
- EGL_BLUE_SIZE, 1,
+ EGL_RED_SIZE, 8,
+ EGL_GREEN_SIZE, 8,
+ EGL_BLUE_SIZE, 8,
EGL_ALPHA_SIZE, ctx->opts.want_alpha ? 1 : 0,
EGL_RENDERABLE_TYPE, rend,
EGL_NONE