[Mesa-dev] [PATCH] egl/dri2: expose srgb configs when KHR_gl_colorspace is available

Marek Olšák maraeo at gmail.com
Fri Oct 2 18:12:30 PDT 2015


I'm not sure if this is correct or if we should just return NULL in
this case like the "case" statement above that does.

Marek

On Sat, Oct 3, 2015 at 12:48 AM, Emil Velikov <emil.l.velikov at gmail.com> wrote:
> Otherwise the user has no way of using it, and we'll try to access the
> linear one.
>
> Cc: Mauro Rossi <issor.oruam at gmail.com>
> Cc: Chih-Wei Huang <cwhuang at android-x86.org>
> Cc: "11.0" <mesa-stable at lists.freedesktop.org>
> Fixes: c2c2e9ab604(egl: implement EGL_KHR_gl_colorspace (v2))
> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=91596
> Signed-off-by: Emil Velikov <emil.l.velikov at gmail.com>
> ---
>  src/egl/drivers/dri2/egl_dri2.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/src/egl/drivers/dri2/egl_dri2.c b/src/egl/drivers/dri2/egl_dri2.c
> index 1740ee3..049bebb 100644
> --- a/src/egl/drivers/dri2/egl_dri2.c
> +++ b/src/egl/drivers/dri2/egl_dri2.c
> @@ -236,7 +236,8 @@ dri2_add_config(_EGLDisplay *disp, const __DRIconfig *dri_config, int id,
>           break;
>
>        case __DRI_ATTRIB_FRAMEBUFFER_SRGB_CAPABLE:
> -         srgb = value != 0;
> +         if (dpy->Extensions.KHR_gl_colorspace)
> +            srgb = value != 0;
>           break;
>
>        default:
> --
> 2.5.0
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/mesa-dev


More information about the mesa-dev mailing list