[Mesa-dev] [PATCHES] surfaceless EGL: new DRI extension

nobled nobled at dreamwidth.org
Tue Sep 7 12:42:27 PDT 2010


2010/9/7 Kristian Høgsberg <krh at bitplanet.net>:
>>>> But the dri2 extension's version 2 doesn't actually mean "this driver
>>>> can create and bind contexts without drawables"--and right now only
>>>> the intel drivers can.
>>>
>>> No, that is actually one of the implied features of version 2 of the
>>> DRI2 extension: it gives you multi-api support and surfaceless
>>> contexts.  We may be advertising that more than we should, and it
>>> looks like we should add a driDRI2v1Extension to dri_util.c for
>>> drivers that can't advertise v2 yet.  Of course, I should have
>>> documented this in dri_interface.h.
>> Yeah, we'd definitely need that even if surfaceless wasn't a silently
>> implied feature--not all the drivers even pay attention to the gl_api
>> parameter at all and just create an OpenGL context anyway.
>
> Those drivers only advertise API_OPENGL, so the loader shouldn't be
> trying to create any other context, and if it does, we catch first
> thing it in dri2CreateNewContextForAPI.
You're right, I didn't catch that. Never mind!

>> Thing is, surfaceless and multi-api functionality are completely
>> orthogonal though--IMO it makes more sense to have them split, because
>> then they can be implemented separately without unnecessary
>> entanglement-- a) surfaceless support can be added to swrast drivers
>> too, and b) all the drivers that currently implement
>> createContextForAPI right now can still do that, even if they don't
>> have surfaceless support.
>
> I understand, and that would be a fine solution too.  I just decided
> to roll up a few features in a dri2 extension version bump so that
> it's easier to check for and we avoid introducing a new extension.
> Multi-api and surfaceless are both easy to add support for, they're
> basically API tweaks, and adding extensions for those is too much
> typing to be worth it.  The OpenGL API is evolved the same way; when a
> new version comes out, it typically assimilates a number of
> (unrelated) extensions into the core spec, to provide a new base level
> of functionality.  That was my intention here as well, on a somewhat
> smaller scale, of course.
That still gives software drivers no way to advertise surfaceless
contexts. And I think all the typing that would need doing for the
split is already covered by the above patches, isn't it? (attached
updated version of 3.)

Besides, in case surfaceless support doesn't make it into all the dri2
drivers before 7.9, this seems to me the quickest way to avoid
problems.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0003-dri-Check-for-surfaceless-support-in-dri2-drivers.patch
Type: text/x-patch
Size: 1411 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20100907/e21a599f/attachment.bin>


More information about the mesa-dev mailing list