Contribute
Leonida is built in the open by a few hundred people: GPU testers, reverse engineers, graphics programmers and writers. There’s room for you, whatever your hardware.
Three rules
They keep the project safe to host. A pull request that breaks one is closed.
No game data, ever
That covers archives, the executable, carved files, shaders in any form, textures, models, audio, videos, and logs that quote them. Check git status before you commit.
No keys, decryption or protection workarounds
And no links to where to get them. The tools only read files that are already plain on disk.
Facts are fine, code is not
Other projects’ format observations can be reimplemented in your own words. Their source can’t be copied in unless its licence allows it.
Short excerpts needed to explain a format, like a few header bytes or one instruction sequence, are fine in docs and comments.
The easiest first contribution: test your GPU
The translator is checked by small hand-written RDNA2 programs. Running them on your card and posting the counts tells the project where it’s right and where it isn’t. You don’t need the game.
Build the test programs
On Windows, from a Developer PowerShell for VS 2022:
scripts\build_runtime.ps1Or download the
runtime-windowsartifact of the Runtime workflow for the commit you’re on.Run the whole suite
python -I scripts/run_gpu_tests.pyOn a 32-wide GPU (NVIDIA, Intel), set
LEONIDA_W64_EMULATE=1to run every wave64 check too.Post your counts
Use the template at the top of #166: GPU, driver, subgroup range, OS, the commit you built, tool versions and the counts each script printed. Counts and pass or fail lines only, never shaders or logs from the game.
Picking up work
Claim before you start, so two people don’t build the same thing. Found something that needs doing but won’t do it yourself? Post finding: <one line> in the same issue, with where it is and why it matters.
Claim it
Open the coordination issue, check its tables and the open pull requests, and post claiming: <ID>. For something not listed yet, post a one-line description.
Build and test
Python tools run with python -I and use only the standard library. A new translator rule goes into the contract table in docs/design.md with how it was confirmed, and comes with a small hand-written test.
Open a pull request
Put the ID in it, and say what you tested and on which GPU. When two pull requests overlap, the one that lands first is merged and the other is asked to rebase.
The biggest open pieces
The Xbox D3D12 to Vulkan layer has its own board in #313: the critical path, who builds what, and which methods are still open.
The shader translator on hardware
Compute, mesh and geometry shaders translate. Still open: the vertex-shader input layout, and wave64 cross-half code in vertex, pixel and geometry shaders on 32-wide subgroups.
Read the translator contractXbox D3D12 to Vulkan
The d3d12_xs command list and descriptor heap model. Issue #313 tracks the critical path, who builds what, and which D3D12 methods are still open.
Open the D3D12 boardModel layouts
Some model layouts are still rejected by the decoder. Each one decoded is more of the world exported correctly.
Read the model notes
Running the tests
The CPU tests need no game data. Tests that need the retail package read LEONIDA_GAME_DIR in place and print SKIP when it isn’t set. Never copy or commit those files.
Antivirus that blocks newly written executables can stop loader_test. Exclude its folder in %TEMP%, or set LEONIDA_TEST_DIR to one it skips.
One unit test (CI runs them all)
python -I tests/test_<name>.pyThe translator tests
python -m unittest discover -s tests/semantic -vConfigure the runtime
cmake -S runtime -B runtime/buildBuild it
cmake --build runtime/build --config RelWithDebInfoRun its tests
ctest --test-dir runtime/build -C RelWithDebInfo --output-on-failureCheck the tools compile
python -m compileall -q make_game.py tools tests
Talk to the team
Questions about where to start go in the Discord. Bugs go in the issue tracker. Never attach game files, extracted assets or generated shaders to either.
