[Mesa-dev] [PATCH] st/dri: fix dri2_format_table for argb1555 and rgb565
Rob Clark
robdclark at gmail.com
Sat Jan 12 00:09:10 UTC 2019
On Fri, Jan 11, 2019 at 6:19 PM Marek Olšák <maraeo at gmail.com> wrote:
>
> From: Marek Olšák <marek.olsak at amd.com>
>
> The bug caused that rgb565 framebuffers used argb1555.
>
> Fixes: 433ca3127a3b94bfe9a513e7c7ce594e09e1359f
> ---
> src/gallium/state_trackers/dri/dri2.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/src/gallium/state_trackers/dri/dri2.c b/src/gallium/state_trackers/dri/dri2.c
> index 6fc07e42f74..ebbbabb6492 100644
> --- a/src/gallium/state_trackers/dri/dri2.c
> +++ b/src/gallium/state_trackers/dri/dri2.c
> @@ -85,21 +85,21 @@ static const struct dri2_format_mapping dri2_format_table[] = {
> { __DRI_IMAGE_FOURCC_ARGB8888, __DRI_IMAGE_FORMAT_ARGB8888,
> __DRI_IMAGE_COMPONENTS_RGBA, PIPE_FORMAT_BGRA8888_UNORM },
> { __DRI_IMAGE_FOURCC_ABGR8888, __DRI_IMAGE_FORMAT_ABGR8888,
> __DRI_IMAGE_COMPONENTS_RGBA, PIPE_FORMAT_RGBA8888_UNORM },
> { __DRI_IMAGE_FOURCC_SARGB8888, __DRI_IMAGE_FORMAT_SARGB8,
> __DRI_IMAGE_COMPONENTS_RGBA, PIPE_FORMAT_BGRA8888_SRGB },
> { __DRI_IMAGE_FOURCC_XRGB8888, __DRI_IMAGE_FORMAT_XRGB8888,
> __DRI_IMAGE_COMPONENTS_RGB, PIPE_FORMAT_BGRX8888_UNORM },
> { __DRI_IMAGE_FOURCC_XBGR8888, __DRI_IMAGE_FORMAT_XBGR8888,
> __DRI_IMAGE_COMPONENTS_RGB, PIPE_FORMAT_RGBX8888_UNORM },
> - { __DRI_IMAGE_FOURCC_ARGB1555, __DRI_IMAGE_FORMAT_RGB565,
> + { __DRI_IMAGE_FOURCC_ARGB1555, __DRI_IMAGE_FORMAT_ARGB1555,
Hey, I had only just made the exact same change locally, debugging
deqp w/ a 565 visual
(I'm still getting lots of fails, although the small # I've looked at
so far look like precision issues, so not sure if deqp actually even
works properly at less than 8b/component..)
anyways,
Reviewed-by: Rob Clark <robdclark at gmail.com>
> __DRI_IMAGE_COMPONENTS_RGBA, PIPE_FORMAT_B5G5R5A1_UNORM },
> { __DRI_IMAGE_FOURCC_RGB565, __DRI_IMAGE_FORMAT_RGB565,
> __DRI_IMAGE_COMPONENTS_RGB, PIPE_FORMAT_B5G6R5_UNORM },
> { __DRI_IMAGE_FOURCC_R8, __DRI_IMAGE_FORMAT_R8,
> __DRI_IMAGE_COMPONENTS_R, PIPE_FORMAT_R8_UNORM },
> { __DRI_IMAGE_FOURCC_R16, __DRI_IMAGE_FORMAT_R16,
> __DRI_IMAGE_COMPONENTS_R, PIPE_FORMAT_R16_UNORM },
> { __DRI_IMAGE_FOURCC_GR88, __DRI_IMAGE_FORMAT_GR88,
> __DRI_IMAGE_COMPONENTS_RG, PIPE_FORMAT_RG88_UNORM },
> { __DRI_IMAGE_FOURCC_GR1616, __DRI_IMAGE_FORMAT_GR88,
> --
> 2.17.1
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev
More information about the mesa-dev
mailing list