On 15 July 2016 at 08:53, Tomasz Figa <tf...@chromium.org> wrote:
> Drivers can request different set of buffers depending on the buffer
> mask they pass to the get_buffers callback. This patch makes
> droid_image_get_buffers() respect this mask.
>
> Signed-off-by: Tomasz Figa <tf...@chromium.org>
> ---
>  src/egl/drivers/dri2/platform_android.c | 15 +++++++++++----
>  1 file changed, 11 insertions(+), 4 deletions(-)
>
> diff --git a/src/egl/drivers/dri2/platform_android.c 
> b/src/egl/drivers/dri2/platform_android.c
> index de1e5e6..7495445 100644
> --- a/src/egl/drivers/dri2/platform_android.c
> +++ b/src/egl/drivers/dri2/platform_android.c
> @@ -434,16 +434,23 @@ droid_image_get_buffers(__DRIdrawable *driDrawable,
>  {
>     struct dri2_egl_surface *dri2_surf = loaderPrivate;
>
> +   images->image_mask = 0;
> +
>     if (update_buffers(dri2_surf) < 0)
>        return 0;
>
> -   if (get_back_bo(dri2_surf) < 0) {
> -      _eglError(EGL_BAD_PARAMETER, "get_back_bo");
> +   if (buffer_mask & __DRI_IMAGE_BUFFER_FRONT) {
> +      _eglLog(_EGL_WARNING, "Front buffer is not supported for window 
> surfaces");
Not sure if using EGL_WARNING won't cause too much unnecessary "spam".
Although we could tweak that at later stage, if needed.

Reviewed-by: Emil Velikov <emil.l.veli...@gmail.com>

Related: other platforms (platform_drm and platform_wayland) could use
the same fix. I believe they all share the EGL semantics of "Thou
shall not have a front buffer"

-Emil
_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to