[Mesa-dev] vdpau_interop extension oddities

Thomas Hellstrom thomas at shipmail.org
Wed Feb 1 15:50:24 UTC 2017


Hi, Again,

(No need answering while on sick leave!).

On 02/01/2017 04:39 PM, Thomas Hellstrom wrote:
> Hi, Christian!
>
> Thanks for your reply. I'll look through the code again!
>
> /Thomas
>
>
> On 02/01/2017 04:22 PM, Christian König wrote:
>> Hi Thomas,
>>
>> I'm on sick leave, but will try to quickly answer your questions.
>>
>> But don't be disappointed if you don't hear back from me before Monday.
>>
>> Am 01.02.2017 um 15:56 schrieb Thomas Hellstrom:
>>> Hi, Christian,
>>>
>>> I'm looking through the mesa vdpau interop code and found something that
>>> looks strange to me:
>>>
>>> (dmabuf part)
>>>
>>> For video surfaces, it looks like vdpau exports a handle to a 2D_ARRAY
>>> texture.
>>> Later in the mesa state tracker, that handle is used to back a "fake"
>>> single slice 2D texture from which we create views like if it were an
>>> array texture, using the layer_override. I guess this would cause
>>> numerous problems when trying to render to these textures or using
>>> texSubImage etc.
>> Hui? That's not how I remembered it.
>>
>> For the dma-buf part we export one layer of a 2D_ARRAY texture and
>> then import that as "normal" 2D texture.

Here it looks like we always export the first layer...

whandle.layer = surf->u.tex.first_layer; (vdpau / surface.c)

should be

whandle.layer = surf->u.tex.first_layer + ( plane & 1);

>>
>> The layer_override is only for the old code path used by Nouveau, e.g.
>> exporting the pipe objects directly and then access only a certain layer.

You're right. The layer override is only active for the old code path.

So if I understand correctly the end result would be that both field
textures are identical?

/Thomas




More information about the mesa-dev mailing list