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>
This commit is contained in:
Zhigang Gong 2012-04-25 18:58:16 +08:00 committed by Eric Anholt
parent 0b6867dddb
commit 8a85071edb

View File

@ -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);