[Mesa-dev] initial meson port

Dylan Baker dylan at pnwbakers.com
Wed Sep 27 17:00:29 UTC 2017


I've gone ahead and pushed the Vulkan drivers meson builds.

For those interested in helping finish the conversion, I have a branch
"wip/meson-4" on my github (github.com/dcbaker/mesa) that has i965 and most of
the core classic mesa stack building. I'm working on GLX, then EGL to start
testing this stack. Getting gallium building is my next step after that (it'll
be RadeonSI because I have hardware).

I'm also working on getting features into upstream meson to make meson more
comfortable for mesa. Currently there are patches landed or pending for the two
workarounds in the meson build we have currently (choosing the right linker and
indexing into CustomTargets). I'm also still thinking about how we can share
source files with the other 3 build systems already in mesa (autotools and
android being the most important, since hopefully our meson will be able to
support windows in the future, I don't know what will happen when android moves
to blueprint/soong). If there is anything else please let me know.

Dylan

Quoting Dylan Baker (2017-09-20 13:27:37)
> Hi everyone,
> 
> A long time ago I made some rumbling about porting mesa to meson (isn't that
> confusing). In the mean time I've been bogged down with other projects,
> including adding features to meson itself, and trying to write and rebase meson
> patches for all of mesa. Unfortunately mesa is a large fast moving project and
> trying to writing meson for the entire thing has proven to simply be
> intractable, I could spend nearly half my day rebasing to current master, and
> that's both demoralizing and error prone.
> 
> So I took Jason's advice and started with what mattered to him ;) Vulkan. This
> was a chunk big enough to be a decent example, but small and contained enough to
> not require lots of rebasing. Intel's "anv" and the AMD "radv" driver share a
> large number of dependencies between each other, and demonstrate writing a meson
> build system.
> 
> You may notice a lot of TODO/FIXME comments here. Some of them are related to
> upstream meson bugs (there are two currently, one that I have a pull request for
> that is probably ready for merge, and one that I'm working on currently), or
> things that need to be implemented for the meson build system to be complete.
> There are a few things that will need to be resolved before implementing mesa
> and gallium drivers (around dependencies that are hard dependencies for Vulkan,
> but soft dependencies for mesa/gallium).
> 
> The meson build system is much faster for building these two drivers than the
> autotools build system, but there are a couple of caveats worth mentioning
> before I give you the numbers. 1: meson doesn't check for as many features,
> flags, or dependencies; 2: meson doesn't build glx, egl, or the glsl compiler,
> just enough of the glsl_compiler to get anv and radv building. The 1st will just
> naturally happen, the second could be fixed.
> 
> Methodology : I ran each build system in as close of a configuration as I could
> (out of tree, same number of jobs) using zsh's time. These were run on a 2 core
> 4 thread Intel skylake. Note that ninja by default runs with logical cores + 2
> jobs.
> 
> Commands
> autotools : 'mkdir autotools ; cd autotools ; ../autogen.sh \
>     --without-dri-drivers --without-gallium-drivers \
>     --with-platforms=x11,wayland --with-vulkan-drivers=intel,radeon \
>     && make -j6'
> meson : meson build -Dvulkan-drivers=intel,amd -Dplatforms=x11,wayland && ninja -C build
> 
> Results
> autotools : sh -c   535.34s user 30.33s system 310% cpu 3:02.05 total
> meson     : sh -c   136.58s user 11.98s system 372% cpu 39.895 total
> 
> I'm hopeful that we can start landing the meson build system incrementally, so
> that the rebasing pain can be eased. I'm working on getting i965 and radeonSI
> as my next targets (I have access to hardware to test those), and I'll continue
> to add additional drivers from there.
> 
> Dylan
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: signature
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20170927/6537066c/attachment.sig>


More information about the mesa-dev mailing list