Leonida Translates GTA VI's 26,503 Shaders Before It Runs a Single Instruction
A high-school student's static recompilation project maps the Xbox Series build without executing it, translating every GPU program offline. The game still does not boot, and the project says so first.

Grand Theft Auto VI (Xbox Series) running natively on Windows, built on your PC from your own copy.
- Leonida refuses to run any code it has not already translated, which turns static recompilation into a discipline of mapping first and executing last.
- 26,503 RDNA2 shaders are translated to SPIR-V offline and validated before the game boots, all aimed at one fixed bindless Vulkan layout.
- The bindless descriptor contract lets a single index serve every binding of its dimension, which is the handshake between the Python translator and the C++ runtime.
- The project says the game does not boot before anyone else can, and that candor is why the rest of its claims are easier to believe.
Most recompilation projects start by getting code to run. Leonida inverts that. It carves 26,503 GPU programs out of a game package, disassembles the Xbox Series RDNA2 instruction set with LLVM, and translates every one to SPIR-V offline, before the game executes a single instruction. Meanwhile its PE loader maps the executable into memory and resolves imports without running any of it. The whole project is built around one rule: nothing runs until you ask, and everything is translated before you ask.
The Game Is Data Before It Is a Program
The loader's core rule is written at the top of its own header: mapping an image never runs code from the image. Leonida maps the Xbox Series executable into memory, applies relocations, resolves imports, and installs thread-local storage without executing a single instruction of the game.
That discipline shows up as a three-mode escalation ladder. --dry-run maps images, applies relocations, binds imports, and installs TLS, but runs nothing. --init adds each DLL's TLS callbacks and DllMain(DLL_PROCESS_ATTACH). --run adds the EXE's TLS callbacks and entry point on a game thread. You climb the ladder on purpose, and each rung tells you something about what broke before the next one.
The binding report prints every import classified as shim, host, module, or UNIMPLEMENTED. That last category matters. It flags unimplemented imports that return an HRESULT, so a developer can tell which failures the game can survive and which ones stop it cold.
Shutdown is deliberate too. The runtime calls ExitProcess(code) instead of returning, because a normal return runs the CRT's atexit table, which the game shares with the runtime, and those handlers would run against a stopped game. That is a detail that only surfaces after real debugging.
26,503 Programs Translated Before Anything Boots
Before the game executes anything, the toolchain carves 26,503 GPU programs out of the package. It unpacks the native RDNA2 shader programs, disassembles them with LLVM, translates each one to SPIR-V, and validates every result with spirv-val. The README reports that all of them pass.
That is the scale reveal. A modern title ships tens of thousands of shader variants, and every one has to cross from AMD's RDNA2 instruction set to the portable SPIR-V that Vulkan consumes. Leonida does this offline, on the user's machine, from the user's own package, before a frame is ever attempted.
The honest limitation is right there in the README. 21,545 of those shaders use wave64. On 64-wide subgroups the translation is exact. On 32-wide subgroups, cross-half wave operations are approximate. The project states this plainly rather than burying it in a footnote.
- 26,503 shaders translated from RDNA2 to SPIR-V
- 21,545 of them use wave64, with exact behavior on 64-wide subgroups
- About 350 GB of working space on disk
- 0 frames rendered
A Contract Written in Descriptor Slots
The descriptor layout is where the Python translator and the C++ runtime shake hands, and it is the cleverest design in the repo.
AMD's hardware defines T# (texture) and S# (sampler) descriptors. Leonida's translated shaders convert each one into an index by looking it up in a hash table, binding 2 of set 0. That index is then valid in every binding of its dimension, and each dimension has its own index space. One image, one index, any binding.
The layout encodes this with a formula: 8 + 3·dim + class. Four dimensions (2D, 2D-array, 3D, 1D) times three component classes (float, uint, sint) gives twelve storage bindings, numbered 8 through 19, each with 256 slots. Index 0 of every array is a fallback. The counts are not decorative: vk_pipeline_check.cpp creates every translated shader against them.
The DLL That Exists Only to Hold a Slot
MSVC's __declspec(thread) compiles to a read of the thread environment block indexed by _tls_index. The OS loader assigns _tls_index values, and a manual mapper cannot assign one itself. This is the kind of constraint that stops a naive mapper dead.
Leonida's answer is a DLL that does nothing but exist. gta6rt_tls_host.dll declares a single thread-local variable so the OS reserves a module index. The loader loads it, reads the reserved index from its TLS directory, and patches the mapped image to use it. Each thread's TLS block is installed by swapping the helper's block for the image's template.
The constraint is documented rather than hidden: only one manually mapped TLS module can be live at a time. A second one is rejected instead of sharing and corrupting the slot. It is fragile, it leans on TEB layout, and the project keeps the workaround narrow instead of pretending it is general.
Built by Someone Who Cannot Rent a Car
The author is a high-school student who ports games to PC and web for fun. The GitHub profile describes an interest in exactly that, and lists Leonida alongside Hookshot, a native PC recompilation of the Switch 2 Ocarina of Time remake, and Blueshell.
The contributor list is real and active. Kam471 leads contributions, followed by slopgobblercobbler, BBareth, LouisRiverstone, and others. Pull requests show ongoing work on shader translation and GPU tests, including a wave64 change and a test measured on an RTX 4070 SUPER. The boldness of the target and the size of the community forming around it are the same story.
Why Leonida Is Not Like the Others
Several recompilation projects are playable or nearly playable. They target older consoles or different architectures, and they solve different problems. Leonida is the one aimed at a current-generation Xbox Series title and its RDNA2 shaders, and it is deliberately not playable yet.
| Project | Target | Approach | Status |
|---|---|---|---|
| Leonida | Xbox Series, GTA VI | Static recompilation; RDNA2 shaders translated to SPIR-V; Xbox D3D12 emulated on Vulkan | Does not boot. Shaders and assets translate; runtime incomplete |
| OpenShao | Original Xbox, Mortal Kombat: Shaolin Monks | Static recompilation from user's disc | Reported playable |
| LARecomp | Xbox 360, Midnight Club: Los Angeles | Recompiled to Windows via ReXGlue | Free roam and saves working |
| black-pc | Original Xbox, BLACK | Native run from user's default.xbe | Reported playable |
| SpaceAnimalsRecomp | Switch 2, Star Fox remake | Static ARM64-to-C++ recompilation | Earlier, smaller scope |
| Hookshot | Switch 2, Ocarina of Time remake | Native PC recompilation, same author | Related effort, different platform |
Leonida is the only entry targeting a current-generation console and translating its GPU ISA, and the only one that is not playable. That is not a weakness to apologize for. It is a different category of work.
What "Does Not Boot" Actually Means
The status table marks booting, story mode, and playability as No. The graphics layer has no shader views, pipelines, draws, or swapchain yet. What exists is the offline half: shaders translate, assets export, the loader maps and binds imports against reimplemented shims.
That makes Leonida research infrastructure, not a port. The README leads with the limitation instead of hiding it, and that framing is the reason to trust the parts that do work. When a project tells you first that it does not run, the claims about what it does translate are easier to believe.
Early. The game does not boot.





