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

davyaxel at free.fr davyaxel at free.fr
Mon Nov 25 14:17:41 PST 2013


On 24/11/2013, Zhigang Gong wrote :
>
>
> On 2013-11-23,22:25,davyaxel at free.fr wrote:
>
>>
>>
>> This is very likely that dri2 support will be dropped for XWayland, once dri3 is ready.
>> Currently the dri2 implementation is similar to the xf86-video-ati implementation.
> If so, that will not be a problem for xwayland. I will only consider the sever side.
>>
>> I think Keithp has proposed his dri3 patches to the intel DDX for merging. So the support should come soon.
>>
>> The code to add dri3 support to the DDX can be quite small, 
>> as you can see in Keith intel DDX repository: the code is about a file of 180 lines.
>>
>> I don't know how the intel DDX works with glamor, 
>> but I imagine 'pixmap_from_fd' and 'fd_from_pixmap' could just call directly the glamor dri3 helpers.
>> And 'open' would be the same than Keith's implementation.
> Ok, then I will add the dri3 glamor support to intel DDX driver after you finish the work at glamor side. Thanks for your contribution.
>
> Thanks,
> Zhigang.
>

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.

Axel Davy


More information about the Glamor mailing list