|
|
||
|---|---|---|
| dripatch | ||
| glxwrap | ||
| graphics | ||
| ideas | ||
| kernel | ||
| libdrm32 | ||
| original | ||
| pkg | ||
| reference | ||
| SDK | ||
| src | ||
| steam | ||
| toolchain | ||
| tools | ||
| torpm | ||
| .gitignore | ||
| build-core.sh | ||
| build-deb.sh | ||
| build-open.sh | ||
| DEVIATIONS.md | ||
| Makefile | ||
| package.sh | ||
| README.md | ||
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: themtgpukernel 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). PutMUSA_SDK_4.2.0.CC2.1.zip(and optionallyMUSA_SDK_4.3.0.CC2.1.zip) inSDK/.
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/); needslibxcb-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).