[Mesa-dev] [PATCH 01/10] egl/android: Set EGL_MAX_PBUFFER_WIDTH and EGL_MAX_PBUFFER_HEIGHT

Eric Anholt eric at anholt.net
Fri Jul 15 17:52:45 UTC 2016


Tomasz Figa <tfiga at chromium.org> writes:

> From: Haixia Shi <hshi at chromium.org>
>
> Set config attributes EGL_MAX_PBUFFER_WIDTH and EGL_MAX_PBUFFER_HEIGHT to
> hard-coded non-zero values. These two attributes are required on Android.
>
> Signed-off-by: Tomasz Figa <tfiga at chromium.org>
> ---
>  src/egl/drivers/dri2/platform_android.c | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/src/egl/drivers/dri2/platform_android.c b/src/egl/drivers/dri2/platform_android.c
> index b33f4e8..f42febc 100644
> --- a/src/egl/drivers/dri2/platform_android.c
> +++ b/src/egl/drivers/dri2/platform_android.c
> @@ -655,6 +655,8 @@ droid_add_configs_for_visuals(_EGLDriver *drv, _EGLDisplay *dpy)
>       EGL_NATIVE_VISUAL_TYPE, 0,
>       EGL_FRAMEBUFFER_TARGET_ANDROID, EGL_TRUE,
>       EGL_RECORDABLE_ANDROID, EGL_TRUE,
> +     EGL_MAX_PBUFFER_WIDTH, 4096,
> +     EGL_MAX_PBUFFER_HEIGHT, 4096,
>       EGL_NONE

It seems weird to me to pick a plausible value that hardware might have,
without actually asking the hardware for the value.  Could we use some
MAX_INT-type value to make it obvious that we're just lying and leaving
it up to buffer creation time to error out?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 818 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20160715/e70fc122/attachment.sig>


More information about the mesa-dev mailing list