[PATCH 02/13] glamor: Add glamor_program based copy acceleration

Michel Dänzer michel at daenzer.net
Fri May 23 01:34:27 PDT 2014


On 23.05.2014 10:40, Keith Packard wrote:
> Michel Dänzer <michel at daenzer.net> 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;

Works for me, thanks.


-- 
Earthling Michel Dänzer            |                  http://www.amd.com
Libre software enthusiast          |                Mesa and X developer

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 234 bytes
Desc: OpenPGP digital signature
URL: <http://lists.x.org/archives/xorg-devel/attachments/20140523/d65f11f3/attachment.sig>


More information about the xorg-devel mailing list