From 0d78428aabfe343b79d08973ad748a207b7edb47 Mon Sep 17 00:00:00 2001 From: Ryan Neph Date: Fri, 11 Jun 2021 17:20:09 -0700 Subject: [PATCH] vrend: align GBM format for BGR* resources to host API internal format Signed-off-by: Ryan Neph Reviewed-by: Gert Wollny --- src/vrend_winsys_gbm.c | 4 ++-- tests/test_virgl_init.c | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/vrend_winsys_gbm.c b/src/vrend_winsys_gbm.c index 9f783d5..3a61ce8 100644 --- a/src/vrend_winsys_gbm.c +++ b/src/vrend_winsys_gbm.c @@ -99,8 +99,8 @@ static const struct planar_layout triplanar_yuv_420_layout = { static const struct format_conversion conversions[] = { { GBM_FORMAT_RGB565, VIRGL_FORMAT_B5G6R5_UNORM }, - { GBM_FORMAT_ARGB8888, VIRGL_FORMAT_B8G8R8A8_UNORM }, - { GBM_FORMAT_XRGB8888, VIRGL_FORMAT_B8G8R8X8_UNORM }, + { GBM_FORMAT_ABGR8888, VIRGL_FORMAT_B8G8R8A8_UNORM }, + { GBM_FORMAT_XBGR8888, VIRGL_FORMAT_B8G8R8X8_UNORM }, { GBM_FORMAT_ABGR16161616F, VIRGL_FORMAT_R16G16B16A16_FLOAT }, { GBM_FORMAT_NV12, VIRGL_FORMAT_NV12 }, { GBM_FORMAT_ABGR8888, VIRGL_FORMAT_R8G8B8A8_UNORM}, diff --git a/tests/test_virgl_init.c b/tests/test_virgl_init.c index fd5cfd8..a019ae4 100644 --- a/tests/test_virgl_init.c +++ b/tests/test_virgl_init.c @@ -379,6 +379,7 @@ START_TEST(virgl_test_get_resource_info) ck_assert_int_eq(ret, 0); ck_assert(info.drm_fourcc == GBM_FORMAT_ABGR8888 || + info.drm_fourcc == GBM_FORMAT_XBGR8888 || info.drm_fourcc == GBM_FORMAT_ARGB8888 || info.drm_fourcc == GBM_FORMAT_XRGB8888); ck_assert_int_eq(info.virgl_format, res.format);