[PATCH xserver] glamor/xwayland: Add depth 30 format mapping for DRI 3.2 as well.

Mario Kleiner mario.kleiner.de at gmail.com
Fri Mar 9 03:58:20 UTC 2018


Signed-off-by: Mario Kleiner <mario.kleiner.de at gmail.com>
---
 glamor/glamor_egl.c           | 2 ++
 hw/xwayland/xwayland-glamor.c | 4 ++++
 2 files changed, 6 insertions(+)

diff --git a/glamor/glamor_egl.c b/glamor/glamor_egl.c
index 8389d5f..eccc795 100644
--- a/glamor/glamor_egl.c
+++ b/glamor/glamor_egl.c
@@ -464,6 +464,8 @@ gbm_format_for_depth(CARD8 depth)
         return GBM_FORMAT_RGB565;
     case 24:
         return GBM_FORMAT_XRGB8888;
+    case 30:
+        return GBM_FORMAT_ARGB2101010;
     default:
         ErrorF("unexpected depth: %d\n", depth);
     case 32:
diff --git a/hw/xwayland/xwayland-glamor.c b/hw/xwayland/xwayland-glamor.c
index b961695..4de3beb 100644
--- a/hw/xwayland/xwayland-glamor.c
+++ b/hw/xwayland/xwayland-glamor.c
@@ -69,6 +69,8 @@ wl_drm_format_for_depth(int depth)
         return WL_DRM_FORMAT_RGB565;
     case 24:
         return WL_DRM_FORMAT_XRGB8888;
+    case 30:
+        return WL_DRM_FORMAT_ARGB2101010;
     default:
         ErrorF("unexpected depth: %d\n", depth);
     case 32:
@@ -84,6 +86,8 @@ gbm_format_for_depth(int depth)
         return GBM_FORMAT_RGB565;
     case 24:
         return GBM_FORMAT_XRGB8888;
+    case 30:
+        return GBM_FORMAT_ARGB2101010;
     default:
         ErrorF("unexpected depth: %d\n", depth);
     case 32:
-- 
2.7.4



More information about the xorg-devel mailing list