Open source mtgpu driver.
Find a file
2026-11-29 17:15:01 -05:00
dripatch dripatch64: stop MT's GL driver recompiling shader variants at random (Megabonk 9 -> ~62 fps) 2026-11-29 12:45:41 -05:00
glxwrap README: rewrite short and current; move glxwrap and Steam details into their own READMEs 2026-11-29 17:15:01 -05:00
graphics Validation: boots and runs with three monitors on the S80 (D-009 installed) 2026-11-27 18:04:44 -05:00
ideas Split the build: make builds a source-only package from git alone, make full the complete one from the SDK 2026-11-29 16:40:24 -05:00
kernel Split the build: make builds a source-only package from git alone, make full the complete one from the SDK 2026-11-29 16:40:24 -05:00
libdrm32 Split the build: make builds a source-only package from git alone, make full the complete one from the SDK 2026-11-29 16:40:24 -05:00
original Foleosoft: driver package 1:1.0.0-Foleosoft with the closed core built from source 2026-11-27 02:13:10 -05:00
pkg Split the build: make builds a source-only package from git alone, make full the complete one from the SDK 2026-11-29 16:40:24 -05:00
reference Split the build: make builds a source-only package from git alone, make full the complete one from the SDK 2026-11-29 16:40:24 -05:00
SDK mtgpu: standalone project - builds the DEB and RPM from the SDK and this repo alone 2026-11-27 17:19:20 -05:00
src Split the build: make builds a source-only package from git alone, make full the complete one from the SDK 2026-11-29 16:40:24 -05:00
steam README: rewrite short and current; move glxwrap and Steam details into their own READMEs 2026-11-29 17:15:01 -05:00
toolchain steam: compatibility tool "Proton Experimental (MTT S80)" + driver-less odbc32 2026-11-28 22:39:34 -05:00
tools Split the build: make builds a source-only package from git alone, make full the complete one from the SDK 2026-11-29 16:40:24 -05:00
torpm mtgpu: standalone project - builds the DEB and RPM from the SDK and this repo alone 2026-11-27 17:19:20 -05:00
.gitignore mtgpu: standalone project - builds the DEB and RPM from the SDK and this repo alone 2026-11-27 17:19:20 -05:00
build-core.sh Split the build: make builds a source-only package from git alone, make full the complete one from the SDK 2026-11-29 16:40:24 -05:00
build-deb.sh Split the build: make builds a source-only package from git alone, make full the complete one from the SDK 2026-11-29 16:40:24 -05:00
build-open.sh Split the build: make builds a source-only package from git alone, make full the complete one from the SDK 2026-11-29 16:40:24 -05:00
DEVIATIONS.md D-011: real va_lists in mtgpu_debug_printf and two other variadic wrappers 2026-11-28 20:30:47 -05:00
Makefile Split the build: make builds a source-only package from git alone, make full the complete one from the SDK 2026-11-29 16:40:24 -05:00
package.sh Split the build: make builds a source-only package from git alone, make full the complete one from the SDK 2026-11-29 16:40:24 -05:00
README.md README: rewrite short and current; move glxwrap and Steam details into their own READMEs 2026-11-29 17:15:01 -05:00

mtgpu

https://www.foleosoft.com/software/mtgpu

A driver for Moore Threads GPUs (tested on the MTT S80, kernels 6.8 .. 6.18) whose closed kernel core, which Moore Threads ships only as a binary, is compiled from decompiled C. Everything in this repository is source; Moore Threads' binaries are never committed.

Build

make          # DEB/mtgpu-open_*.deb: from this repository alone
make full     # DEB/musa_*.deb + RPM: the complete driver, from the Moore Threads SDK you supply
  • make: the mtgpu kernel module (DKMS) with the core built from source, mtgpu-mode, and this project's userspace fixes. You still need Moore Threads' GPU firmware (/lib/firmware/mthreads) and, for compute, their MUSA userspace (libmusa, libmusart).
  • make full: the same, plus everything Moore Threads ships (firmware, MUSA, OpenGL/Vulkan, video, the X driver). Put MUSA_SDK_4.2.0.CC2.1.zip (and optionally MUSA_SDK_4.3.0.CC2.1.zip) in SDK/.

Needs docker, dpkg-deb and python3 (plus unzip and fpm for make full). The two packages conflict.

Use

sudo mtgpu-mode display   # desktop, OpenGL, Vulkan on the GPU
sudo mtgpu-mode compute   # headless compute (MUSA); the default
mtgpu-mode status

A mode change takes effect after a reboot. Steam (Windows games): run steam/install.sh once, see steam/README.md.

What is fixed beyond Moore Threads' driver

  • Builds and runs on modern kernels (kernel/).
  • Native 32-bit OpenGL: MT's i386 GL driver on this project's 32-bit libdrm_mtgpu (libdrm32/); needs libxcb-dri2-0:i386.
  • Direct3D 10/11 under WineD3D and several MT GL driver bugs (glxwrap/).
  • GL driver crashes and slowdowns, patched at load time (dripatch/): e.g. Unity games on OpenGL no longer crash, and shaders are no longer recompiled at random.

Layout

Path What
src/ The core as decompiled C, its data as assembler (coredata/). Changes are logged in DEVIATIONS.md.
original/ The core source as it first built, unmodified.
kernel/ The module's DKMS tree: MT's Dual MIT/GPL driver layer plus this project's build files and headers.
glxwrap/, dripatch/, libdrm32/, steam/ Userspace fixes (each has a README or notes).
pkg/ mtgpu-mode, mtgpu-gl, package scripts.
tools/, toolchain/ The core build (GCC 9.4 in docker, as MT used).
build-open.sh, build-deb.sh, package.sh, build-core.sh make, make full, the core.
graphics/, ideas/ Investigation notes and future work.

Changing the core

Edit src/, mark the change Foleosoft D-NNN, and log it in DEVIATIONS.md. If the build reports names missing from src/coredata/, run make coredata (needs the SDK).

make full with SDK 4.3.0 also installs an alternative graphics set (mtgpu-gl 430); it is not usable for the desktop yet (see ideas/32bit-gl.md).