diff options
author | Chad Versace <[email protected]> | 2017-06-16 19:11:21 -0700 |
---|---|---|
committer | Chad Versace <[email protected]> | 2017-06-22 08:58:45 -0700 |
commit | 5e884353e647261ac815c85724fc108e86dd1d85 (patch) | |
tree | 17fc73bae83293458fbc481cffd987d04cc50f9c /src/mesa/main | |
parent | 1c409fe4c144f11ce6c6a4548ac5c6ba37980058 (diff) |
egl/android: Change order of EGLConfig generation (v2)
Many Android apps (such as Google's official NDK GLES2 example app), and
even portions the core framework code (such as SystemServiceManager in
Nougat), incorrectly choose their EGLConfig. They neglect to match the
EGLConfig's EGL_NATIVE_VISUAL_ID against the window's native format, and
instead choose the first EGLConfig whose channel sizes match those of
the native window format while ignoring the channel *ordering*.
We can detect such buggy clients in logcat when they call
eglCreateSurface, by detecting the mismatch between the EGLConfig's
format and the window's format.
As a workaround, this patch changes the order of EGLConfig generation
such that all EGLConfigs for HAL pixel format i precede those for HAL
pixel format i+1. In my (chadversary) testing on Android Nougat, this
was good enough to pacify the buggy clients.
v2: Rebase to make patch cherry-pickable to stable.
Cc: [email protected]
Cc: Tomasz Figa <[email protected]>
Cc: Rob Herring <[email protected]>
Reviewed-by: Emil Velikov <[email protected]>
Diffstat (limited to 'src/mesa/main')
0 files changed, 0 insertions, 0 deletions