[RFC xserver 04/16] DRI3: Implement GetSupportedFormats and GetSupportedModifiers

Michel Dänzer michel at daenzer.net
Fri Jun 9 02:36:05 UTC 2017


On 09/06/17 03:43 AM, Daniel Stone wrote:
> From: Louis-Francis Ratté-Boulianne <lfrb at collabora.com>
> 
> Use EGL extension EXT_image_dma_buf_modifiers to query supported
> DMA-BUF formats and modifiers to return to DRI3 clients. The
> information is cached to avoid having to fetch it again for
> each new client.
> 
> Signed-off-by: Louis-Francis Ratté-Boulianne <lfrb at collabora.com>
> Signed-off-by: Daniel Stone <daniels at collabora.com>

[...]

>  static Bool
> +glamor_get_formats(ScreenPtr screen,
> +                   CARD32 *num_formats, CARD32 **formats)
> +{

[...]

> +static Bool
> +glamor_get_modifiers(ScreenPtr screen, CARD32 format,
> +                     CARD32 *num_modifiers, uint64_t **modifiers)
> +{

[...]

> @@ -536,6 +614,8 @@ static dri3_screen_info_rec glamor_dri3_info = {
>      .open_client = glamor_dri3_open_client,
>      .pixmap_from_fd = glamor_pixmap_from_fd,
>      .fd_from_pixmap = glamor_fd_from_pixmap,
> +    .get_formats = glamor_get_formats,
> +    .get_modifiers = glamor_get_modifiers,

glamor_get_formats and glamor_get_modifiers need to be _X_EXPORT instead
of static for drivers which set GLAMOR_NO_DRI3 and call dri3_screen_init
directly.


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


More information about the xorg-devel mailing list