Skip to content

Instantly share code, notes, and snippets.

@flibitijibibo
Last active July 23, 2025 05:48
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

@martin-slater
Copy link

Thanks for this, I am trying to get it building for xbox and hitting errors such as
94>W:\mesa\src\gallium\drivers\d3d12\d3d12_dxgi_xbox_screen.cpp(80,4): error C2065: 'IDXGIDevice1': undeclared identifier

The GDK with xbox additions is installed. Any ideas?

@LB--
Copy link

LB-- commented Jun 30, 2025

Open the generated project files in Visual Studio and use the Configuration Manager to add a new solution platform for the Gaming.Xbox platform you want, otherwise it will not work. I don't know of any automated way to make this fix.

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