Review follow-ups on #2815 (RT-191):
- vk_pipeline_check reports shaders whose features or partner stubs are
unavailable as skipped rather than failed (vk_pipeline_check.cpp:8-9),
so the README now says the stage reports any it has to skip.
- make_game.py's module docstring still said the cache is saved "so the
first boot doesn't compile", which contradicts the README; it now says
the stage builds pipelines for every shader (not only compute), reports
rejected and skipped ones, and that the runtime doesn't load the cache yet.
Written with AI assistance (Claude, via OpenBot).
Tested: python -I tests/test_docs_*.py, test_i18n_index.py,
test_text_write_line_endings.py and every tests/test_make_game_*.py pass;
compileall clean (Windows 11, Python 3.14; no GPU involved).
Co-authored-by: OpenBot <335604065+openbotgit[bot]@users.noreply.github.com>
Three corrections from @romainveurrier's review (the D3D-178 owner):
- the translator reads all four triangle node types, TRI0-TRI3, with the barycentric remap byte
(#1525), while the GPU builder writes TRI0 leaves; the row said "TRI0/TRI1 leaves" for both;
- the XDXR-vs-KHR default is decided: the layer builds XDXR records by default and
`LEONIDA_RT_AS=khr` keeps #743's path (#1667), so only the rehydrate-or-rebuild question is
still open;
- the row now says that `PERFORM_UPDATE` refits instead of rebuilding (#1789), and that clone,
compaction and the compacted/current postbuild sizes work (#1844), checked against the CPU
reference on synthetic scenes.
The measured parts of the row (the recovered build descriptions, the packs, the 8 of 10 sampled
BLAS) are unchanged. Docs only: the documentation suites pass, with the same three duplicated-row
failures the parent commit has.
The README said the pipelines stage saves a pipeline cache "so the first
boot doesn't compile them". Nothing in runtime/src or runtime/shims reads
pipeline_cache.bin yet (only vk_pipeline_check in runtime/test writes it;
D3D-34 / #367 is meant to load it), so the sentence promised something the
runtime does not do.
Reword it to what make_game.py does: create every translated shader on the
GPU driver, check that they compile, and save the cache to
pipeline_cache.bin in --out, and say the runtime does not load it yet.
Claimed in #2716. Written with AI assistance (Claude, via OpenBot).
Tested: python -I tests/test_docs_{design_rows,links,list_items,repo_paths}.py,
tests/test_i18n_index.py and tests/test_text_write_line_endings.py pass
(Windows 11, docs only; no GPU involved).
Co-authored-by: OpenBot <335604065+openbotgit[bot]@users.noreply.github.com>
The status table had no row for acceleration structures. The new row covers the GPU builder in the console's XDXR BVH4 layout with the KHR alternative, the build descriptions recovered from XboxBvhBuilder.dll, the measured bvh4 packs and their rehydration, what the builder does not do yet, and the open questions tracked in #313.
AMD's Windows shader compiler for RDNA2 crashes (access violation in
vkCreateComputePipelines) on many --wave64-emulate compute shaders with LDS
(#857). auto turns emulation on when any device is 32-wide, so an Intel iGPU
next to an RX 6000 card gets emulated modules, and the runtime then runs them on
the RX 6000.
tools/vk_subgroup_info.py now reports vendor_id, device_id, driver_id and
rdna2_amd_windows for the runtime's GPU (RDNA2 by PCI device ID, AMD proprietary
driver). auto leaves emulation off when that GPU is one and runs wave64
natively; on and off are unchanged.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
--full-check is the one make_game.py flag with no mention in README.md,
docs/ or CONTRIBUTING.md; it only appears in --help. It is the way to
verify a copy's data with SHA-256, so add it next to --check in the
terminal command block.
Docs only, no game data, no CI change.
find_dumps() built its roots from the home folder only. With OneDrive's Known
Folder Move, Explorer's Desktop and Documents are ~\OneDrive\Desktop and
~\OneDrive\Documents, two levels below the home root, so a copy kept in them
was never found and Build.bat fell back to asking for the folder.
On Windows, add the folders SHGetKnownFolderPath reports for Downloads,
Desktop and Documents (ctypes, standard library) to the search roots. Folders
that aren't moved are the same as the home-folder roots and are visited once.
default_out() is unchanged, so the port and its work folder never land in a
OneDrive-synced folder.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Opens the system folder dialog (tkinter, standard library), re-asks until the
folder is a supported version, and fails with a pointer to --game when Tk or a
display is missing or the dialog is cancelled. --pick and --game are exclusive.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016AjctnXX86CYbSh3uZNaNy
Distributions that install LLVM as clang-cl-21, lld-link-21 and so on (Debian,
Ubuntu) were reported as having none of the five tools, so the runtime stage
was dropped or refused. Preflight now accepts the newest full set with one
version suffix and passes it to a new build folder as the toolchain's
CMAKE_<var> overrides (docs/testing.md). A runtime/build/windows whose cached
compiler still exists needs no tools on PATH: it keeps what it was configured
with.
- `translate()` takes `fallbacks` (the --no-float-controls/--bary-fallback/--texel-offset-fallback/--mesh-compute flags), keeps them in the shard plan, and passes them to every shard; shards finished under other flags restart.
- `shaders()` records the flags in spirv/translator_flags.txt like wave64_emulate.txt and re-translates when they change; `shader_outputs_reusable()` and `preflight()` count a folder with other flags as not reusable.
- New `--no-float-controls`, `--bary-fallback`, `--texel-offset-fallback` and `--mesh-compute` options; `fallback_flags()` maps them in a stable order.
- Tests: 13 new in tests/test_make_game_translator_flags.py (all 13 fail on main 426023a5 as the negative control); mocks in the resume/argparse suites take the new keyword.
Adds an "Other languages" entry as the first item of the README nav,
pointing at docs/i18n/README.md. The landing page had no link to the
community quickstarts; the index stays the source of truth for which
languages exist, so a new translation does not need another README edit.
Docs only: one line, no build/CI changes, no game data.
Off Windows the runtime stage refused to run without --runtime-build. It now
cross-builds gta6rt.exe and gta6rt_tls_host.dll into runtime/build/windows
with runtime/cmake/clang-cl-xwin.cmake (XWIN_DIR, or ~/.local/share/xwin-sdk
as in docs/testing.md), then packages them with the Wine launcher as before.
Preflight lists what the cross-build lacks (cmake, the LLVM tools, clang-cl
older than 19, an xwin splat without VC/Tools/MSVC or Windows Kits um/x64)
and then configures it, so any toolchain error stops the run before the
shader stage. Without the tools the default stages still leave runtime out;
asking for it lists what is missing. The pipelines stage's vk_pipeline_check
is built natively into runtime/build/linux at the end of preflight, for the
same reason.
Record the llvm-mc command and version after successful disassembly. If either changes, refresh disassembly and SPIR-V translation while reusing the extracted shader inputs.
AI-assisted with Codex. Covered by synthetic LLVM version-change and interrupted-resume tests on Windows and WSL.
The status row listed BC1, BC3, BC4 and BC5. tools/bcpack.py has rebuilt all
six codecs since #576, as docs/textures.md says; most BC6H and BC7 chunks
need a history table the repository does not ship.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
- PE loader and import shims: the GameInput shim on SDL3 (#680) and
gta6rt --trace-d3d12 (#701) are on main; neither was mentioned.
- Xbox D3D12 -> Vulkan: 3D render targets and texture views, depth- and
stencil-plane views, packed formats (B5G6R5, B4G4R4A4, R9G9B9E5),
predication and CPU-side texture reads and writes are on main. The
"not yet" list now also names placed resources and 1D textures, which
are still missing.
Each point checked against the code on main (b0befb4).
(cherry picked from commit 4f5559d3a91e7f8157004c29e54e815ea69320eb)
CreateQueryHeap makes one VkQueryPool per heap: occlusion (OCCLUSION and
BINARY_OCCLUSION queries), timestamp and copy-queue timestamp, and pipeline
statistics (all eleven Vulkan counters, whose order is the field order of
D3D12_QUERY_DATA_PIPELINE_STATISTICS). Other heap types are logged and
refused with E_NOTIMPL.
BeginQuery, EndQuery and ResolveQueryData are recorded in the command-list
IR with D3D12's rules for the calls, and replayed as vkCmdResetQueryPool +
vkCmdBeginQuery/vkCmdEndQuery, vkCmdWriteTimestamp at BOTTOM_OF_PIPE and
vkCmdCopyQueryPoolResults (64-bit, WAIT). Heap types, index ranges and the
destination buffer are checked before anything is written. A query that was
never ended resolves to zeros instead of stalling the GPU on WAIT_BIT.
GetTimestampFrequency is 1e9 / timestampPeriod. The devices enable
occlusionQueryPrecise and pipelineStatisticsQuery where the GPU has them.
Overlapping queries of one kind (valid D3D12, one active query per type in
Vulkan) are refused as unsupported, and binary occlusion is not clamped to
0/1 yet; both are written down in docs/d3d12_vulkan.md section 4.6.
Tested on an RTX 5070 (driver 621.01) under VK_LAYER_KHRONOS_validation.
AI-assisted (Claude Code).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
--runtime-build DIR takes a Windows build of runtime/ (gta6rt.exe and
gta6rt_tls_host.dll, e.g. the Runtime workflow's runtime-windows
artifact) instead of building it. Off Windows the runtime stage then
runs instead of failing: it copies both files into --out and writes
gta6rt.sh, which starts gta6rt.exe with wine (or $WINE). Without the
option nothing changes. Preflight checks the folder before any work.
README: Running the loader on Linux.
The runtime uses version 1.2 root signatures (D3D12_ROOT_SIGNATURE_DESC2),
which older SDKs such as 10.0.22621 don't declare, so the build failed
halfway through with a compiler error. The prerequisites now name the SDK,
docs/testing.md has a Known problems row for the error, and CMake checks
for it at configure time and stops with the fix.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
README: the GPU-test row counts the 30+ entries now in #166 (adds AMD
GCN3/RDNA1/RDNA4, Intel Gen9, llvmpipe) and drops the cs_w64x_partial
note that #204 fixed; the translation row says wave64 emulation makes
compute and mesh exact on 32-wide GPUs; the texture row names the
BCPack decoder from #312 and that the export doesn't use it yet; the
D3D12 row lists texture views, samplers and resolves (#228, #328).
docs/design.md: the TTPF row points at the decoder instead of calling
BCPack the hard blocker. docs/textures.md: drop the superseded
'no decoder is added' paragraph left above the new one.
AI-assisted.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01D7JEiKsTUaHQbCTdc4Eghy
CreateReservedResource (and 1 and 2) reserve the whole resource linearly, as
docs/d3d12_vulkan.md section 4.2 plans for the first boot: a committed
resource on a default heap underneath, so every tile is backed and starts
zeroed. D3D12's description rules are kept as measured on the PC runtime
(ROW_MAJOR buffers, 64KB swizzle layouts for textures, a format with a tile
shape; GetHeapProperties is E_INVALIDARG on a reserved resource). The Xbox
tiled layout word 0x101 is accepted as 64KB_UNDEFINED_SWIZZLE.
GetResourceTiling comes from src/resource_tiling.h: the standard 64 KiB tile
shapes, standard and packed mips, per-mip tile counts and the tile order. The
device test compares it with the host PC runtime for 18 buffer, 2D, array,
block-compressed and volume layouts; resource_tiling_test checks the same
arithmetic without a GPU. Packed-mip tile counts are the driver's choice and
are this layer's own rule (tight linear size in whole tiles).
UpdateTileMappings and CopyTileMappings log once and do nothing; what that
loses (aliasing, unmapped tiles keeping data) is written down in section 4.2.
Tested on an RTX 5070 (driver 621.01) under VK_LAYER_KHRONOS_validation.
AI-assisted (Claude Code).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>