mesa/src/egl
Yiwei Zhang d677120cae egl/android: only apply front rendering usage in shared buffer mode
When EGL_KHR_mutable_render_buffer extension is enabled, advertised
configs unconditionally include EGL_MUTABLE_RENDER_BUFFER_BIT_KHR bit.

However, f61337b5 starts requesting front rendering usage bit when
EGL_MUTABLE_RENDER_BUFFER_BIT_KHR is seen on the SurfaceType, which
essentially forces linear usage on all winsys BOs for gallium dri and
i965 drivers on Android when cros gralloc is in use.

This patch dynamically appends or strips the front rendering usage bit
depends on whether EGL_RENDER_BUFFER is EGL_SINGLE_BUFFER or
EGL_BACK_BUFFER. The next dequeuBuffer call will switch the buffer
sharing mode while re-allocating winsys BOs given the updated gralloc
usage bits if necessary.

v2: handle ANativeWindow_setUsage on error

Fixes: f61337b5 ("egl/android: check front rendering support for cros gralloc")

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Rob Clark <robdclark@chromium.org> (v1)
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11787>
2021-07-08 22:05:38 +00:00
..
drivers egl/android: only apply front rendering usage in shared buffer mode 2021-07-08 22:05:38 +00:00
generate Add EGL xcb platform 2020-11-12 16:39:47 +00:00
main egl: fix in expected type 2021-06-19 19:34:20 +00:00
wayland egl/wayland: add a NULL guard for the authenticate callback 2020-12-16 13:48:48 +00:00
egl-entrypoint-check.py egl/entrypoint-check: add check that GLVND and plain EGL have the same entrypoints 2020-08-08 13:45:06 +00:00
egl-glvnd-symbols.txt egl: add glvnd symbols check 2019-07-10 11:27:51 +00:00
egl-symbols.txt egl: use new symbols check script 2019-07-10 11:27:51 +00:00
meson.build egl: android: add IMapper@4 metadata API buffer_info getter 2021-06-30 16:50:44 +00:00