[Mesa-dev] vdpau_interop extension oddities

Thomas Hellstrom thomas at shipmail.org
Wed Feb 1 14:56:19 UTC 2017


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.

Wouldn't the correct solution be to have vdpau export a single layer of
the array texture (using the whandle offset pointing to the layer start)
which is then reinterpreted by the driver, not the state tracker, as a
true non-array texture.

And if for some reason the driver doesn't support reinterpreting and
offseting like this wouldn't it be possible to hide the layer_override
inside the driver for surface, sampler_view and transfer object
purposes, as part of the texture internal format?

Thanks,

Thomas







More information about the mesa-dev mailing list