Hi Michel,

On 6 March 2018 at 09:53, Michel Dänzer <mic...@daenzer.net> wrote:
> They're part of the 1.20 RC1 ABI, and actually used by external drivers.
> Also, requiring drivers which don't support the new functionality in
> DRI3 1.2 to switch to the new interfaces seems unreasonable.

Thanks for this, and apologies: I'd only checked the DRI3 interface
and missed the Glamor ABI change.

> +_X_EXPORT PixmapPtr
> +glamor_pixmap_from_fd(ScreenPtr screen,
> +                      int fd,
> +                      CARD16 width,
> +                      CARD16 height,
> +                      CARD16 stride, CARD8 depth, CARD8 bpp)
> +{
> +    PixmapPtr pixmap;
> +    Bool ret;
> +
> +    pixmap = screen->CreatePixmap(screen, 0, 0, depth, 0);
> +
> +    ret = glamor_back_pixmap_from_fd(pixmap, fd, width, height,
> +                                     stride, depth, bpp);
> +
> +    if (ret == FALSE) {
> +        screen->DestroyPixmap(pixmap);
> +        return NULL;
> +    }
> +    return pixmap;
> +}

Any reason to not make this just 'return
glamor_pixmap_from_fds(screen, 1, &fd, width, height, &stride, &{0},
depth, bpp, DRM_FORMAT_MOD_INVALID)'? Regardless, this is:
Reviewed-by: Daniel Stone <dani...@collabora.com>

Cheers,
Daniel
_______________________________________________
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: https://lists.x.org/mailman/listinfo/xorg-devel

Reply via email to