Michel Dänzer <[email protected]> writes:

> This results in a crash / memory corruption when confronted with
> GLAMOR_DRM_ONLY pixmaps. glamor_copy_bail calls down to fb, but the
> pixmap's devPrivate.ptr does not point to any usable storage.
>
> This happens for me when a piglit test creates a depth 16 GLXPixmap.

This should fix the problem by bailing when attempting to prepare a
pixmap which cannot be downloaded:

diff --git a/glamor/glamor_prepare.c b/glamor/glamor_prepare.c
index 60a4229..6fb8a91 100644
--- a/glamor/glamor_prepare.c
+++ b/glamor/glamor_prepare.c
@@ -39,6 +39,9 @@ glamor_prep_pixmap_box(PixmapPtr pixmap, glamor_access_t 
access, BoxPtr box)
     int                         gl_access, gl_usage;
     RegionRec                   region;
 
+    if (priv->type == GLAMOR_DRM_ONLY)
+        return FALSE;
+
     if (!GLAMOR_PIXMAP_PRIV_HAS_FBO(priv))
         return TRUE;
 
-- 
[email protected]

Attachment: pgpvjz2Z5XiLN.pgp
Description: PGP signature

_______________________________________________
[email protected]: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel

Reply via email to