Friday, March 19, 2021

Microsoft is shipping a product built with Meson

Some time ago Microsoft announced a compatibility pack to get OpenGL and OpenCL running even on computers whose hardware does not provide native OpenGL drivers. It is basically OpenGL-over-Direct3D. Or that is at least my understanding of it, hopefully this description is sufficiently accurate to not cause audible groans on the devs who actually know what it is doing under the covers. More actual details can be found in this blog post.

An OpenGL implementation is a whole lot of work and writing one from scratch is a multi-year project. Instead of doing that, Microsoft chose the sensible approach of taking the Mesa implementation and porting it to work on Windows. Typically large corporations do this by the vendoring approach, that is, copying the source code inside their own repos, rewriting the build system and treating it as if it was their own code.

The blog post does not say it, but in this case that approach was not taken. Instead all work was done in upstream Mesa and the end products are built with the same Meson build files [1]. This also goes for the final release that is available in Windows Store. This is a fairly big milestone for the Meson project as it is now provably mature enough that major players like Microsoft are willing to use it to build and ship end user products. 

[1] There may, of course, be some internal patches we don't know about.


  1. I had an opportunity to interview with Microsoft and there is definitely a change of attitude on how they approach open source tooling - and clearly they understand that upstreaming is the most sensible approach plus meson is well supported and investing in the upstream provides more stability that they can rely on for future projects. I hope that Microsoft continues to use meson in other projects they do.

  2. > [1] There may, of course, be some internal patches we don't know about.

    We did have some internal patches to redirect wraps (i.e. zlib) to point to local repositories, rather than external GitHub repos, but I just tweaked our pre-meson build script to clone them in subprojects directly instead. With that, the source of what we're shipping is 1:1 with upstream.

  3. I guess they don't provide source?