[Mesa-dev] [PATCH] egl/wayland: Set __DRI_IMAGE_USE_SCANOUT for shared buffers

Daniel Stone daniel at fooishbar.org
Tue May 3 16:24:02 UTC 2016


Hi,

On 3 May 2016 at 14:52, Daniel Vetter <daniel at ffwll.ch> wrote:
> On Mon, Feb 01, 2016 at 12:48:52PM +0900, Michel Dänzer wrote:
>> As I said before, looking at intel_validate_usage, I suspect the latter.
>
> Just jumping in here, but it's correct atm. Well if we ignore a recent bug
> to enable Y-tiling where mesa shouldn't. Currently Intel solves the above
> problem by being careful in the selection of what's possible for winsys
> buffers, to make sure that the other side is guaranteed to be able to use
> it.

It's worth noting that this would have had no ill effect for clients;
the kernel properly realises that the tiling mode is incompatible and
rejects the buffer, which would cause a fallback to GL composition.
Unfortunately, the tiling format was also chosen for the compositor's
own output, so nothing could be displayed at all. But, as far as I can
tell, apart from not rejecting it earlier (through a validateUsage
hook, which I have patches to implement), the right thing does happen.

> Having read the thread I think fixing up the validation part on the
> compositor side would be the correct fix short term for this. That will
> keep all options open for the future to optimize this however we want,
> without the need for flag days across all mesa drivers.
>
> And yes, adding required additional metadata to the wayland drm proto will
> be a bit of work, since to make it all work we'd also need to add import
> support for that to gbm.

Right, the GBM API needs to expose modifiers for this to be useful.
And whilst doing that, really you want to be adding multi-plane
support at the same time. Once you've got that far, it's presumably an
extra DRIimage usage flag, to declare that the client is aware of
modifiers. Something I've not yet had time for, sadly.

Cheers,
Daniel


More information about the mesa-dev mailing list