Skip to content

Instantly share code, notes, and snippets.

@flibitijibibo
Last active May 30, 2025 00:51
Show Gist options
  • Save flibitijibibo/66ea5ca76b7704ca861cc4152a672817 to your computer and use it in GitHub Desktop.
Save flibitijibibo/66ea5ca76b7704ca861cc4152a672817 to your computer and use it in GitHub Desktop.
GLon12 Instructions

Downloads

Build Instructions

Latest tested commit: b723962418cee94070997fd8c15548dfeebf88ee

  1. Open Git Bash
  2. In any directory you like: git clone https://gitlab.freedesktop.org/mesa/mesa.git; mkdir mesa/flibitBuild
  3. Close Git Bash
  4. Extract contents of Win flex-bison to a conveniently-located folder, add said folder to $PATH
  5. Open an appropriate Developer Command Prompt
    • For PC: x64 VS Developer Command Prompt
    • For console: Xbox One Gaming Command Prompt or Scarlett Gaming Command Prompt
  6. py -m pip install mako
  7. cd to mesa/flibitBuild/ folder

For PC...

  1. meson .. -Dgallium-drivers=d3d12 -Dgallium-d3d12-video=disabled -Dzlib=disabled --backend=vs
  2. msbuild mesa.sln /m (or build with Visual Studio)

For console...

  1. Write this to a file called gdkx.txt:
[target_machine]
system = 'Gaming.Xbox.XboxOne.x64'
cpu_family = 'x86_64'
cpu = 'x86_64'
endian = 'little'

Pay very close attention to the system property! Adjust this if you are building for Scarlett!

  1. meson .. -Dgallium-drivers=d3d12 -Dgallium-d3d12-video=disabled -Dzlib=disabled -Dc_winlibs=[] -Dcpp_winlibs=[] --backend vs --cross-file gdkx.txt
  2. Build flibitBuild/mesa.sln with Visual Studio

Final Packaging

These are the files you want to make the full D3D12 driver:

  • mesa/flibitBuild/src/gallium/targets/libgl-gdi/opengl32.dll
  • mesa/flibitBuild/src/gallium/targets/wgl/libgallium_wgl.dll
  • PC Only: dxcompiler.dll and dxil.dll, from the DXC release you downloaded

Enjoy!

glon12

@ryannecas
Copy link

ryannecas commented May 29, 2025

Would you happen to have ever done a Windows/VS 32-bit build? I tried making a cross file, but it seems to have no effect

@LB--
Copy link

LB-- commented May 30, 2025

Would you happen to have ever done a Windows/VS 32-bit build? I tried making a cross file, but it seems to have no effect

In my experience 32-bit is the default, I always have to manually change the generated project files to x64 or such in order for things to work properly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment