[Mesa-dev] [PATCH 0/5] egl/android: Change order of EGLConfig generation
Chad Versace
chadversary at chromium.org
Sat Jun 17 02:37:45 UTC 2017
Patches 1-4 are little cleanups. The real change is in patch 5.
I wrote this series while debugging issues that Rob Herring found [1]
while testing my i965 RGBX patch series [2]. *This* patch series
fixes those errors, and is also independent of my RGBX series.
[1]: https://lists.freedesktop.org/archives/mesa-dev/2017-June/158400.html
[2]: https://lists.freedesktop.org/archives/mesa-dev/2017-June/158142.html
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:
http://git.kiwitree.net/cgit/~chadv/mesa/tag/?h=chadv/review/2017-06-16/egl-android-config-order-v01
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(-)
--
2.13.0
More information about the mesa-dev
mailing list