Automatic builds of mesa OpenGL & Vulkan implementations for Windows (x86, x64, arm64).
Builds are linked statically to their dependencies, just place necessary dll file(s) next to your exe.
Binaries available as 7z archive in latest release page. Following builds are provided:
- llvmpipe - software implementation of OpenGL using LLVM
- d3d12 - Collabora & Microsoft implementation of OpenGL using D3D12
- zink - Collabora implementation of OpenGL using Vulkan
- lavapipe - software implementation of Vulkan using LLVM
- dzn - Microsoft implementation of Vulkan using D3D12
All OpenGL implementations (llvmpipe, d3d12, zink) come in two flavors:
Both options support creating context for full OpenGL (core and compatibility), and OpenGL ES v1/2/3.
Core context for OpenGL on WGL can be created as usual, with WGL_ARB_create_context extension.
To create OpenGL ES context on WGL use WGL_EXT_create_context_es2_profile extension.
Latest EGL, WGL, OpenGL and OpenGL ES headers can be downloaded from their registries on khronos website:
- https://registry.khronos.org/EGL/
- https://registry.khronos.org/OpenGL/index_gl.php#headers
- https://registry.khronos.org/OpenGL/index_es.php#headers
When using libEGL.dll
you should query GL and GLES entry points dynamically with eglGetProcAddress function.
With EGL you can also access GLES functions from libGLESv1_CM.dll
or libGLESv2.dll
files (by linking to .lib or
dynamic loading at runtime) - but this is optional. When using eglGetProcAddress these dll files are not needed
at all, only libEGL.dll
is necessary.
Be careful NOT to link with opengl32.dll
file when using EGL - in such case GL calls won't work or simply crash!
With EGL you can use EGL_MESA_platform_surfaceless extension with eglGetPlatformDisplay function to create offscreen context without dependency on any windowing system.
When using d3d12 opengl driver or dzn vulkan implementation you need to distribute dxil.dll
file too!
To use Vulkan implementations, set VK_DRIVER_FILES env variable to dzn_icd.x86_64.json
or lvp_icd.x86_64.json
First make sure you have installed all necessary depenendencies:
- Python - with pip for installing
meson
,packaging
,mako
andyaml
packages if they are missing - Visual Studio 2022 - with Desktop development with C++ workload installed
- 7-Zip - either full installer, or just
7za.exe
file from "7-Zip Extra" archive - CMake
- Git
- ninja.exe - will be automatically downloaded if missing
- curl.exe - nowadays comes with Windows 10/11
Then run build.cmd
batch file when these tools are installed. It accepts optional argument specifying architecture:
build.cmd x86
- for 32-bit Windowsbuild.cmd x64
- for 64-bit Windowsbuild.cmd arm64
- for Windows on ARM64, for example to use on Qualcomm Snapdragon X Elite devices
Output files will be placed in mesa-[name]-[arch]
folders.