[Mesa-dev] [PATCH 2/2] egl/drm: set the VISUAL_TYPE alongside the VISUAL_ID
Emil Velikov
emil.l.velikov at gmail.com
Mon Aug 21 14:18:11 UTC 2017
On 11 July 2017 at 14:27, Emil Velikov <emil.l.velikov at gmail.com> wrote:
> From: Emil Velikov <emil.velikov at collabora.com>
>
> 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: mesa-stable at lists.freedesktop.org
> Cc: Chad Versace <chadversary at google.com>
> Signed-off-by: Emil Velikov <emil.velikov at collabora.com>
> ---
> 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
More information about the mesa-dev
mailing list