[Mesa-dev] [PATCH] st/dri: fix dri2_format_table for argb1555 and rgb565
Marek Olšák
maraeo at gmail.com
Fri Jan 11 23:19:39 UTC 2019
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,
__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
More information about the mesa-dev
mailing list