Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
48 commits
Select commit Hold shift + click to select a range
32038ef
runtime: CMake presets, LEONIDA_DIAGNOSTICS option, one d3d12_xs_stub
orkan1k Nov 25, 2026
a998d13
runtime: split CMakeLists.txt into five included files
orkan1k Nov 25, 2026
cfd3313
runtime: settings table in core, leonida.toml and `gta6rt config`
orkan1k Nov 25, 2026
c1fa082
runtime: host_cpu.cpp and pe_loader.cpp read their settings from the …
orkan1k Nov 25, 2026
8962c3d
runtime: registry.cpp reads LEONIDA_UNIMPLEMENTED from the settings t…
orkan1k Nov 25, 2026
44d986b
runtime: bcrypt_rng.cpp reads LEONIDA_RNG_SEED from the settings table
orkan1k Nov 25, 2026
aab18fc
runtime: xgameruntime.cpp reads its six settings from the settings table
orkan1k Nov 25, 2026
8e33454
runtime: the other three xgameruntime files read from the settings table
orkan1k Nov 25, 2026
8af4b81
runtime: d3d12_xs.cpp and d3d12_xs_device.cpp read from the settings …
orkan1k Nov 25, 2026
5b7d200
runtime: xbox_present.cpp reads its two settings from the settings table
orkan1k Nov 25, 2026
e48ce96
runtime: gameinput.cpp reads its ten settings from the settings table
orkan1k Nov 25, 2026
2c5eb8f
runtime: d3d12_vulkan_device.cpp reads its ten settings from the sett…
orkan1k Nov 25, 2026
458c527
runtime: main.cpp reads paths.shaders from the settings table
orkan1k Nov 25, 2026
59687f2
runtime: the presenter gets its capture settings from the settings table
orkan1k Nov 25, 2026
779267a
runtime: gta6rt sets the int3 switch of the startup trace from the se…
orkan1k Nov 25, 2026
bb88d7e
runtime: the Vulkan device takes its device filter from the settings …
orkan1k Nov 25, 2026
abdaf16
runtime: README no longer calls the move to the settings table unfini…
orkan1k Nov 25, 2026
4073f16
docs: add the ztrx gap analysis (phase A)
orkan1k Nov 25, 2026
9dbbad1
d3d12 vulkan: fall back to staging copies when a host-transfer image …
orkan1k Nov 25, 2026
b9f59de
d3d12 tests: do not compare mixed-category heaps with a resource heap…
orkan1k Nov 25, 2026
8a27ff8
d3d12 tests: skip d3d12_dxr_validation_khr before its buffers when no…
orkan1k Nov 25, 2026
acfd9ff
d3d12 tests: set the directly-indexed flags in the RTS0 header when t…
orkan1k Nov 25, 2026
ad9d51b
d3d12 tests: hold the layer to a WARP that keeps the footprint alignm…
orkan1k Nov 25, 2026
06372ec
d3d12 tests: check the fallback where the driver cannot bind a buffer…
orkan1k Nov 25, 2026
ca40e0a
core: add the log layer with levels and the setting log.level (LEONID…
orkan1k Nov 25, 2026
9de6302
shims: move the log lines of bcrypt, xgameruntime and xbox_present to…
orkan1k Nov 25, 2026
d701c94
shims: move the log lines of gameinput to the log layer
orkan1k Nov 25, 2026
0da2ed6
loader: move the log lines of pe_loader to the log layer
orkan1k Nov 25, 2026
b212b11
shims: move the log lines of registry and d3d12_xs to the log layer
orkan1k Nov 25, 2026
7c9516e
shims: move the log lines of d3d12_xs_device to the log layer
orkan1k Nov 25, 2026
baaca7b
shims: move the log lines of d3d12_vulkan_device to the log layer
orkan1k Nov 25, 2026
08257ce
gta6rt: move the log lines of main.cpp to the log layer
orkan1k Nov 25, 2026
7a91c2f
shims: move the log lines of d3d12_com to the log layer
orkan1k Nov 25, 2026
a8b8c29
shims: move the log lines of xmem to the log layer
orkan1k Nov 25, 2026
fc8ed18
shims: move the log lines of process to the log layer
orkan1k Nov 25, 2026
6c7fea8
shims: move the log lines of xgameruntime_store to the log layer
orkan1k Nov 25, 2026
95428ac
shims: move the log lines of library_loader to the log layer
orkan1k Nov 25, 2026
72aae4d
shims: move the log line of acphal to the log layer
orkan1k Nov 25, 2026
595245c
shims: move the log line of xg_xs to the log layer
orkan1k Nov 25, 2026
66d0473
shims: move the log line of dstorage to the log layer
orkan1k Nov 25, 2026
039c307
shims: move the log line of dxgi_com to the log layer
orkan1k Nov 25, 2026
3c43cbf
shims: move the log lines of winhttp_offline to the log layer
orkan1k Nov 25, 2026
521a29b
shims: move the log line of d3d12_com_object.h to the log layer
orkan1k Nov 25, 2026
e8266ca
runtime: move the log line of cpu_emulation.h to the log layer
orkan1k Nov 25, 2026
df72058
runtime: move the log lines of vulkan_backend.h and vulkan_present.h …
orkan1k Nov 25, 2026
4ecdc6b
runtime: frame-event sink on the Xbox device proxy's slots 78/79/80 (G7)
orkan1k Nov 25, 2026
387cc16
runtime: present sink on the Xbox queue proxy and the setting d3d12.p…
orkan1k Nov 25, 2026
90d5d9f
docs: bring the ztrx gap analysis up to date with G7, G8 and the test…
orkan1k Nov 25, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ method, scope and caveats. No game data is included.
|---|---|
| [design.md](design.md) | Overall project design, asset status, translator contract and open blockers. |
| [related_projects.md](related_projects.md) | Prior art we may read and the licence boundaries on it. |
| [ztrx-gap-analysis.md](ztrx-gap-analysis.md) | ztrx against the runtime, from source: licence, gap table; not run. |
| [rpf.md](rpf.md) | RPF9 archive layout, the carve tools and the unreadable encrypted TOC. |
| [linux.md](linux.md) | Linux in one page: what runs natively and what runs under Wine or Proton, the Ubuntu packages, `Build.sh`, the runtime cross-build, and why there is no native Linux `gta6rt`. |
| [testing.md](testing.md) | Running the GPU tests on your own GPU: setup per OS, wave64 emulation, running without a GPU on Mesa llvmpipe, and known problems. |
Expand Down
11 changes: 8 additions & 3 deletions docs/d3d12_vulkan.md
Original file line number Diff line number Diff line change
Expand Up @@ -2455,7 +2455,9 @@ The trace will enumerate them.
created with `VK_IMAGE_USAGE_HOST_TRANSFER_BIT_EXT` when the device supports that usage with the requested
image format and flags, moved to
`GENERAL` and zero-filled on the host at creation, and copied with `vkCopyMemoryToImageEXT`/
`vkCopyImageToMemoryEXT` while they stay in `GENERAL` (D3D12's `COMMON`). Every other case (no extension, a
`vkCopyImageToMemoryEXT` while they stay in `GENERAL` (D3D12's `COMMON`). A driver can accept the usage and then
name no memory type for the image (NVIDIA 582.66 on a GTX 1070 Ti: `memoryTypeBits` 0 with the usage, 0x82
without it); the image is then made again without the usage. Every other case (no extension, such an image, a
texture a barrier has moved, a default-heap texture, which D3D12 does not allow but the layer copies and logs) is
a `CopyTextureRegion` from or to a host-visible staging buffer, replayed on the device's queue and waited for, so
the layout tracker and a first use's zero fill behave exactly as for the application's own copies.
Expand Down Expand Up @@ -2511,7 +2513,10 @@ The trace will enumerate them.
device does on purpose (`d3d12_vulkan_device_test` fails on a `TRUE`). The PC runtime answers differently: on an
RTX 4090 (driver 621.14) and on WARP it reports the capability as supported, and a list with `Offset` 16 and
`RowPitch` 260 for an `R8G8B8A8_UNORM` footprint closes with `S_OK` (measured with a stand-alone D3D12 program,
Windows 11 26200). The layer cannot simply say the same: Vulkan takes a copy's buffer offset as a multiple of
Windows 11 26200). An older PC runtime keeps the rule: on Windows 10 22H2 (`d3d12.dll` and `d3d10warp.dll`
10.0.19041.3636) the query for `D3D12_FEATURE_D3D12_OPTIONS13` answers `E_INVALIDARG`, and WARP and a GTX 1070 Ti
close such a list with `E_INVALIDARG`, as the layer does; `d3d12_close_parity_test` counts its three cases as
matches on such a WARP. The layer cannot simply say the same: Vulkan takes a copy's buffer offset as a multiple of
the texel block size and its row length in texels (VUID-vkCmdCopyBufferToImage-dstImage-07975), while the
capability lifts D3D12's two alignments and is not documented as keeping offsets and pitches texel multiples
(not tested here), so a footprint that is not texel-aligned would have to be repacked through scratch memory
Expand Down Expand Up @@ -2557,7 +2562,7 @@ The trace will enumerate them.
`d3d12_clear_test` (renamed from `d3d12_uint_clear_test` in #525, D3D-45) compares full and rectangular D3D12
readbacks with WARP over eleven integer input sets on every UINT and SINT render-target format it lists, beside
the UNORM/SNORM/FLOAT and depth/stencil cases. ctest runs only its `--rgb9e5` mode (`d3d12_rgb9e5_rtv`), so the
WARP comparison is run by hand until #521's 0.5 tie rounding lands (`runtime/CMakeLists.txt`).
WARP comparison is run by hand until #521's 0.5 tie rounding lands (`runtime/cmake/d3d12_vulkan.cmake`).
`clear_color_test` checks both replay paths without a GPU, including unchanged float values.
This does not add typed-view reinterpretation of typeless resources or new integer formats.
- **RGBA8 typeless RTV clears:** explicit UNORM, SRGB, UINT, SINT and SNORM RTVs on a
Expand Down
2 changes: 1 addition & 1 deletion docs/design.md
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ SPIRV-Tools 2026.1 validates this fixture. Version 2025.1 reports a known error
It sets up MSVC through `vcvars64.bat` and builds at BelowNormal priority on half the cores, writing to `runtime\build\`.
If VS's "C++ CMake tools" component is installed, it uses CMake and Ninja. Otherwise it calls `cl` directly. That
component may not be installed, and the devkitPro MSYS `cmake` on PATH can't build MSVC projects. When you
add a source file, add it to `runtime\CMakeLists.txt` and to the file list in `build_runtime.ps1`.
add a source file, add it to `runtime\cmake\windows_runtime.cmake` and to the file list in `build_runtime.ps1`.

## Asset status (no exe needed)

Expand Down
2 changes: 1 addition & 1 deletion docs/directstorage.md
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ The first boot with the executable settles most of this: the dry-run report show
7. a zero size: a success that touches no memory (an assumption: the reference does not say);
8. a range past the end of the file (`E_DSTORAGE_END_OF_FILE`), then a destination or source the process cannot
access (`E_DSTORAGE_ACCESS_VIOLATION`; the worker survives it). This needs asynchronous exceptions under
clang-cl, so `runtime/CMakeLists.txt` builds `dstorage.cpp` with `/EHa` there; MSVC always catches it.
clang-cl, so `runtime/cmake/windows_runtime.cmake` builds `dstorage.cpp` with `/EHa` there; MSVC always catches it.

Step 7 does not apply to a zlib request (its `DestinationSize` is never 0 after step 5); its stream fails as
described next.
Expand Down
9 changes: 5 additions & 4 deletions docs/pipeline_check.md
Original file line number Diff line number Diff line change
Expand Up @@ -306,8 +306,8 @@ A driver compiles on the thread that creates the shader module or the pipeline,
the shader's control-flow nesting. On Windows a thread that asks for no stack size gets the reserve written in the
executable's PE header, 1 MB by default. That is the checker's main thread and every `std::thread` worker.

`vk_pipeline_check` is linked with an **8 MB** reserve: `/STACK:8388608` in `runtime/CMakeLists.txt` and on the
checker's `cl` line in `scripts/build_runtime.ps1`. The CTest `vk_pipeline_check_stack` reads `SizeOfStackReserve`
`vk_pipeline_check` is linked with an **8 MB** reserve: `/STACK:8388608` in `runtime/cmake/vulkan_tools.cmake` and on
the checker's `cl` line in `scripts/build_runtime.ps1`. The CTest `vk_pipeline_check_stack` reads `SizeOfStackReserve`
back from the built file (`runtime/test/check_stack_reserve.cmake`; the program is not run), and
`tests/test_build_runtime_fallback.py` keeps the two numbers the same.

Expand Down Expand Up @@ -336,8 +336,9 @@ Not measured: other AMD GPU families, other vendors' Windows drivers, and a corp
(`runtime/shims/d3d12_vulkan_device.cpp`), so there the compiler runs on a game thread. The entry thread has 8 MB
from `run_entry` (`runtime/shims/process_shim.h`). A thread the game starts with `dwStackSize` 0, a thread-pool
thread and a `std::thread` of the shims get the reserve in `gta6rt.exe`'s header, because the game's `CreateThread`
is Windows' own. `gta6rt` is therefore linked with the same 8 MB (`GTA6RT_STACK` in `runtime/CMakeLists.txt`, and
the loader's `cl` line in `scripts/build_runtime.ps1`). The CTest `gta6rt_stack` reads the header, and
is Windows' own. `gta6rt` is therefore linked with the same 8 MB (`GTA6RT_STACK` in
`runtime/cmake/windows_runtime.cmake`, and the loader's `cl` line in `scripts/build_runtime.ps1`). The CTest
`gta6rt_stack` reads the header, and
`run_tiny_game_stack` asks Windows from inside a program the loader runs: the entry thread and a thread created
with `dwStackSize` 0 both report 8 MB. Not covered: a thread the title creates with an explicit smaller size keeps
that size. Which threads the game creates pipelines on is not known without its executable.
Expand Down
5 changes: 4 additions & 1 deletion docs/retail_boot_chain.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,10 @@ and `state = 0xFFFFFFFF`, which isn't a valid PC state. At the first call, `va`
range the title had just reserved, and `desc` is a buffer of that range's size with Xbox bits in `Flags` above
the PC flags. The shape matches the console `CreatePlacedResourceX`. A buffer on those pages is imported with
`VK_EXT_external_memory_host` where the driver allows it, so the title's writes are the GPU's reads; a driver that
refuses falls back to a committed buffer. A texture gets a committed texture whose `GetGPUVirtualAddress` is the
refuses falls back to a committed buffer. So does a buffer placed inside a page at an offset the driver cannot bind
it at: NVIDIA 582.66 on a GTX 1070 Ti binds such a buffer only at a multiple of 256 bytes, so one placed 64 bytes
into a page is not imported there (`d3d12_existing_heap_test`).
A texture gets a committed texture whose `GetGPUVirtualAddress` is the
title's address (the console behavior: a title clears a texture through that pointer), but its pixels do not alias
the title's pages yet. Both paths limit `Flags` to the PC bits; the buffer path also makes the Xbox layout word
`ROW_MAJOR`.
Expand Down
Loading
Loading