Skip to content

mmozeiko/build-mesa

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

70 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

mesa builds

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.

Download

Binaries available as 7z archive in latest release page. Following builds are provided:

Using OpenGL

All OpenGL implementations (llvmpipe, d3d12, zink) come in two flavors:

  • opengl32.dll file - use WGL to create GL context
  • libEGL.dll file - use EGL to create GL context

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:

Using EGL

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.

Using D3D12 for OpenGL/Vulkan

When using d3d12 opengl driver or dzn vulkan implementation you need to distribute dxil.dll file too!

Using lavapipe/dzn for Vulkan

To use Vulkan implementations, set VK_DRIVER_FILES env variable to dzn_icd.x86_64.json or lvp_icd.x86_64.json

Building locally

First make sure you have installed all necessary depenendencies:

Then run build.cmd batch file when these tools are installed. It accepts optional argument specifying architecture:

  • build.cmd x86 - for 32-bit Windows
  • build.cmd x64 - for 64-bit Windows
  • build.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.