From 8a85071edbd90780b286fa4b19205540fb276815 Mon Sep 17 00:00:00 2001 From: Zhigang Gong Date: Wed, 25 Apr 2012 18:58:16 +0800 Subject: [PATCH] glamor_copyarea: Don't access a DRM only pixmap. As EGL image/gbm only support ARGB8888 image, we don't support other format. We may change the way to use gbm directly latter. But now, we have to face this limitation, and thus if a client create a 16bpp drawable, and call get texture from pixmap then a copy to here may occur and thus we have to force retur a TRUE without do nothing. Signed-off-by: Zhigang Gong --- glamor/glamor_copyarea.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/glamor/glamor_copyarea.c b/glamor/glamor_copyarea.c index 6599d6535..d19e28b3c 100644 --- a/glamor/glamor_copyarea.c +++ b/glamor/glamor_copyarea.c @@ -395,6 +395,13 @@ _glamor_copy_n_to_n(DrawablePtr src, && glamor_ddx_fallback_check_pixmap(dst)) goto done; + if (src_pixmap_priv->type == GLAMOR_DRM_ONLY + || dst_pixmap_priv->type == GLAMOR_DRM_ONLY) { + LogMessage(X_WARNING, + "Access a DRM only pixmap is not allowed within glamor.\n", + dst->pScreen->myNum); + return TRUE; + } glamor_report_delayed_fallbacks(src->pScreen); glamor_report_delayed_fallbacks(dst->pScreen);