2017-06-17 02:37:45 UTC
I wrote this series while debugging issues that Rob Herring found 
while testing my i965 RGBX patch series . *This* patch series
fixes those errors, and is also independent of my RGBX series.
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 series 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 testing on Android Nougat, this was good
enough to pacify the buggy clients.
This patch series lives on a git tag:
Chad Versace (5):
egl/android: Declare loop vars inside their loops
egl/android: Declare 'const' the EGLConfig attribs template array
egl/android: Rename var in droid_add_configs_for_visuals()
egl/android: Pull invariant var outside of loop
egl/android: Change order of EGLConfig generation
src/egl/drivers/dri2/platform_android.c | 79 +++++++++++++++++++--------------
1 file changed, 45 insertions(+), 34 deletions(-)