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

Michel Dänzer michel at daenzer.net
Thu Jan 28 21:58:41 PST 2016


On 29.01.2016 12:44, Michel Dänzer wrote:
> On 28.01.2016 20:20, Daniel Stone wrote:
>> On 28 January 2016 at 03:21, Michel Dänzer <michel at daenzer.net> wrote:
>>> On 27.01.2016 23:54, Daniel Stone wrote:
>>>> On 27 January 2016 at 14:16, Axel Davy <axel.davy at ens.fr> wrote:
>>>>>
>>>>> The other thing you mention, ie failing to import non-scanout
>>>>> buffers when scanout is requested is, I believe, unrelated to this
>>>>> patch, and would require a bit more work. In particular this is
>>>>> handled by a function validateUsage, which doesn't seem to be fully
>>>>> implemented on gallium. I suggest to file a bug on bugzillla.
>>>>
>>>> Well, I could, but if this fix goes in, I assume nothing will ever
>>>> happen for Gallium drivers, so not sure there's much point, aside
>>>> from having a URL to point to the next time this comes up.
>>>
>>> intel_validate_usage doesn't handle scanout either, but AFAIR at least
>>> older generations of Intel GPUs don't support all tiling modes for
>>> scanout either. So I don't see how that could work in the scheme you
>>> describe other than by luck.
>>>
>>> Assuming there was any validateUsage hook which would properly catch
>>> buffers which can't be scanned out, can you point us to other code which
>>> would allow the Wayland compositor to make sure clients allocate buffers
>>> which can be scanned out?
>>
>> The code doesn't exist now, but essentially gbm_bo_import would be
>> able to track a wl_buffer back to the source, and send a wl_drm event
>> back to Mesa (remember that this is private protocol, so can be
>> changed at will) informing it that it should allocate with more
>> optimal flags. Not a great deal of work.
> 
> It still sounds like significant work (particularly for somebody like me
> who isn't very familiar with Wayland details yet). It should be done by
> somebody who cares about the difference you're describing.

BTW, if such a person were to do the work for a non-Gallium driver, of
course I wouldn't expect them to do the Gallium specific work either.


-- 
Earthling Michel Dänzer               |               http://www.amd.com
Libre software enthusiast             |             Mesa and X developer


More information about the mesa-dev mailing list