[Glamor] [PATCH] Allow to create textured pixmaps from gbm_bo without using gem names

davyaxel at free.fr davyaxel at free.fr
Tue Nov 26 12:08:16 PST 2013


>
>
> There seems to be a last issue to settle: texture format.
>
> Dri3 protocol doesn't share any information about the format of the buffers.
>
> That means for example that we can't know of which format is an imported buffer,
>  until the pixmap is associated to a window (then we can check the window visual).
>
> This is a problem I'm not sure the best way to solve.
> Perhaps a way is to always use GL_BGRA over GL_RGBA for example, even if the content doesn't match to that.
> I think this is already what happens when the pixmap has a textured created from a buffer comming from the DDX.
>
I think the best approach is to consider we live in an argb8888 world (which seems a pretty good asumption right now).

We can't know which component order will result when allocating a texture with GL_BGRA of GL_RGBA.
For example with gallium drivers, GL_RGBA (the one we use now for all textures) is ABGR8888.
To ensure we use ARGB8888, the best to me seems to allocate an argb8888 gbm_bo, and create the texture from it (after converting to an image).

Glamor Dri3 support could do that, and keep the old way when dri3 isn't enabled.

Axel Davy


More information about the Glamor mailing list