[PATCH xserver] dri3: Fix DRI3.2 support for drivers other than modesetting-ddx.
Daniel Stone
daniel at fooishbar.org
Tue Apr 24 20:11:11 UTC 2018
Hi Adam,
On 24 April 2018 at 20:52, Adam Jackson <ajax at nwnk.net> wrote:
> On Tue, 2018-04-24 at 11:42 +0100, Daniel Stone wrote:
>> On 24 April 2018 at 09:17, Mario Kleiner <mario.kleiner.de at gmail.com> wrote:
>> > Both xf86-video-intel and xf86-video-nouveau cause OpenGL
>> > clients to fail when used with DRI3 on server 1.20 with Mesa 18.1.
>> >
>> > Reason is that the servers DRI3 version is now unconditionally
>> > reported as DRI3 1.2 to 1.2 capable clients. This causes clients
>> > using Mesa 18.1 to use the new DRI 3.2 requests DRI3GetSupportedModifiers,
>> > DRI3PixmapFromBuffers, etc. Drivers other than modesetting-ddx
>> > do not support the needed hooks like info->pixmap_from_fds or
>> > info->get_formats, info->get_modifiers. Unfortunately we can't
>> > simply report the servers DRI3 version as 1.0 in this case, as
>> > the reported version can not be specific to a X-Screen, and
>> > different screens may have drivers with different capabilities.
>
> I think this implies we should not advertise 1.2 if any screen lacks
> the 1.2 hooks.
To be honest, I'd be fine with that too.
>> Thanks a lot for hunting this down! This fix does still make me
>> uncomfortable though. I think a better fix would be, on the Mesa side,
>> to never call any 1.2 codepaths for the server if we get no
>> formats/modifiers back from the GetSupported calls, and to never call
>> any 1.2 codepaths for the drawable if DRIImage's
>> createImageWithModifiers does not exist or if it fails and we fall
>> back to regular createImage. That way we make sure that both sides
>> exercise the same behaviour: either both with explicit modifiers, or
>> neither.
>
> The problem with that strategy is it means 1.20 would be compatible
> with zero already-released versions of Mesa.
True, though it is only 18.1.0rc1 broken now, and we've plenty of time
before rc2.
Cheers,
Daniel
More information about the xorg-devel
mailing list