[Mesa-dev] Static/shared pipe-drivers (was megadriver/pipe-loader-to-all)
emil.l.velikov at gmail.com
Tue Jun 17 12:05:15 PDT 2014
On 17/06/14 19:39, Ilia Mirkin wrote:
> On Thu, Jun 12, 2014 at 3:56 PM, Emil Velikov <emil.l.velikov at gmail.com> wrote:
>> Hi all,
>> These patches add support for building (grouping) the various targets per
>> API, meaning that only one library will be created for e.g. vdpau
>> (libvdpau_gallium) with individual ones (libvdpau_r600) being a hardlink
>> to it.
>> This allows us to have substantial space savings as the API(state-tracker)
>> is available only once. Additionally it adds support for shared
>> pipe-drivers via a _unstable_ interface, which saves us the duplication
>> across X APIs.
> Given that this is an unstable API, how do you handle versioning? What
> will happen when people (invariably) mix & match?
Thanks for asking.
Perhaps I should mention here as well that the xa, gbm and opencl targets
currently use it. This series converts the former to to "static" by default.
If one wants to use "shared pipe-drivers" they need to edit the configure
Once all the mayhem is done, a few explicit notes will be added to the
About mix and match:
The api has not changed since the addition of configuration function (commit
ec7d5b8c021 ~2011) and the introduction of pipe-loader (commit 317be33d732
~2011). Not sure about future changes though.
The series will make things that are already broken more obvious, rather than
"introducing" the issue.
(Hope that explanation was not too much).
Some targets are already fragile, this series makes things safer by default
and provides a big hidden hammer for people that (think they) know what they
>> The former method has been used by the egl-static while the latter by
>> opencl and gbm targets since they were introduced.
>> By default we build with "static pipe-drivers".
>> Some numbers + extra info 
>> dri: (r600|radeonsi|nouveau)_dri.so -> 6.5 MiB
>> vdpau: libvdpau_(r600|radeonsi|nouveau).so -> 3.5 MiB
>> Total: 10MiB
>> dri: (r600|radeonsi|nouveau)_dri.so -> 3.9 MiB
>> vdpau: libvdpau_(r600|radeonsi|nouveau).so -> 633 KiB
>> gallium-pipe: pipe_(r600|radeonsi|nouveau).so -> 5.3 MiB
>> Total: 9.8MiB
>> dri: (r600|radeonsi|nouveau)_dri.so -> 5.0+4.5+5.3 = 14.8 MiB
>> vdpau: libvdpau_(r600|radeonsi|nouveau).so -> 1.9+1.2+2.3 = 5.4 MiB
>> Total: 20.2MiB
>> The previous series can be found here 
>> Changes since then
>> - Convert targets individually.
>> - OMX targets now work, and the final library is now libomx-mesa.so
>> - Dropped the DRI targets for now
>> - A handfull of typos thinkos and bugs fixed.
>> My plan is to have these pushed in ~4 stages, with two stages per week.
>> This way I will be able to crack on with the remaining bits and have all
>> of it tested well before we branch the next release.
>> Series is availabe at
>> As always comments and suggestions are greatly appreciated.
>>  http://lists.freedesktop.org/archives/mesa-dev/2014-May/059806.html
>>  http://lists.freedesktop.org/archives/mesa-dev/2014-May/059628.html
>> mesa-dev mailing list
>> mesa-dev at lists.freedesktop.org
More information about the mesa-dev