On 11 July 2017 at 14:27, Emil Velikov <[email protected]> wrote:
> From: Emil Velikov <[email protected]>
>
> According to the EGL_KHR_platform_gbm extension:
>
>     For each EGLConfig that belongs to the GBM platform, the
>     EGL_NATIVE_VISUAL_ID attribute is a GBM color format, such as
>     GBM_FORMAT_XRGB8888.
>
> Which we correctly manage. At the same time the EGL 1.4 spec says
>
>     If an EGLConfig supports windows then it may have an associated
>     native visual. EGL_NATIVE_VISUAL_ID specifies an identifier for this
>     visual, and EGL_NATIVE_VISUAL_TYPE specifies its type. If an
>     EGLConfig does not support windows, or if there is no associated
>     native visual type, then querying EGL_NATIVE_VISUAL_ID will return 0
>     and querying EGL_NATIVE_VISUAL_TYPE will return EGL_NONE.
>
> Based on this, either both of ID and TYPE should be set, or neither.
>
> Cc: [email protected]
> Cc: Chad Versace <[email protected]>
> Signed-off-by: Emil Velikov <[email protected]>
> ---
>  src/egl/drivers/dri2/platform_drm.c | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/src/egl/drivers/dri2/platform_drm.c 
> b/src/egl/drivers/dri2/platform_drm.c
> index 8e12aed0b32..b2146aa64af 100644
> --- a/src/egl/drivers/dri2/platform_drm.c
> +++ b/src/egl/drivers/dri2/platform_drm.c
> @@ -613,6 +613,7 @@ drm_add_configs_for_visuals(_EGLDriver *drv, _EGLDisplay 
> *disp)
>
>           const EGLint attr_list[] = {
>              EGL_NATIVE_VISUAL_ID,  visuals[j].format,
> +            EGL_NATIVE_VISUAL_TYPE,  visuals[j].format,
>              EGL_NONE,
>           };
>
Chad,

Does the above make sense? Should we bother?
Admittedly the stable tag could be dropped, since it's not that
crucial of a fix.

-Emil
_______________________________________________
mesa-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to