summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZhigang Gong <zhigang.gong@linux.intel.com>2012-04-25 18:58:16 +0800
committerZhigang Gong <zhigang.gong@linux.intel.com>2012-04-27 15:53:37 +0800
commit6969cbf87f57698e87810037bb2831d7741c006f (patch)
tree01dff0bb509e12669352f5489b35d9b15bceec13
parent519388d6e80dac48b11ad3b8f92131e8b607c73d (diff)
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 <zhigang.gong@linux.intel.com>
-rw-r--r--src/glamor_copyarea.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/glamor_copyarea.c b/src/glamor_copyarea.c
index 6599d65..d19e28b 100644
--- a/src/glamor_copyarea.c
+++ b/src/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);