[Mesa-stable] [Mesa-dev] [RFC PATCH] dri megadriver_stub: provide compatibility with older DRI loader

Jordan Justen jljusten at gmail.com
Fri Dec 6 16:45:11 PST 2013


On Fri, Dec 6, 2013 at 3:50 PM, Ian Romanick <idr at freedesktop.org> wrote:
> On 12/06/2013 01:12 PM, Jordan Justen wrote:
>> On Fri, Dec 6, 2013 at 2:35 AM, Jordan Justen <jordan.l.justen at intel.com> wrote:
>>> To help the transition period when DRI loaders are being updated
>>> to support the newer __driDriverExtensions_foo mechanism,
>>> we populate __DRIextension with the extensions returned
>>> by __driDriverExtensions_foo during a library contructor
>>> function.
>>>
>>> We find the driver foo's name by using the dladdr function
>>> which gives the path of the dynamic library's name that
>>> was being loaded.
>
> I like this approach much better than the one we were discussing in the
> office yesterday.  It's much cleaner, and it's not specific to any
> particular driver.  I'd really like to hear Eric and / or Keith's opinion
>
>>> Signed-off-by: Jordan Justen <jordan.l.justen at intel.com>
>>> Cc: "10.0" <mesa-stable at lists.freedesktop.org>
>>> ---
>>> Trying to allow Mesa 10 to be loaded by older DRI loaders.
>>>
>>> This seems to help glxinfo get the i965 driver if Mesa 10's
>>> i965_dri.so is added to into a Mesa 9.2 libGL stack.
>>>
>>> It still needs to be tested more with older X servers.
>>
>> I tested mesa master with and without this patch on a system running
>> xserver-xorg-core 1.12.4 and gnome-shell.
>>
>> Without this change, gnome-shell will fail to load and metacity will
>> load as the fallback. Xorg.0.log reports that it can't find the
>> __driDriverExtensions symbol in i965_dri.so, as expected.
>>
>> With the change gnome-shell starts, and glxinfo reports that it is
>> running Mesa i965 from master. I did not see any errors mention in
>> Xorg.0.log.
>>
>> Is there anything else I should look for?
>
> And I assume that there were no piglit regressions on this
> configuration?

Sorry, I haven't run piglit yet.

I have a v2 almost ready based on Keith's feedback, and I'll run
piglit before sending it out.

>  Did 'LIBGL_ALWAYS_INDIRECT=y glxgears' run properly?

Yeah, that seems to work.

-Jordan


More information about the mesa-stable mailing list