Commit Graph

4248 Commits

Author SHA1 Message Date
51639a60f2 Merge pull request #440 from oddmaniv/docs/gameinput-host-diagnostics
Why merged: an 8-line docs note telling native GameInput host failures apart, worded cautiously.
Why it's good: no game data; docs tests and check_no_game_data pass on main d42773d plus this PR.

AI-assisted (Claude Code, Claude Opus 5.5).
2026-11-24 02:40:41 -05:00
a2e85b6e8d Merge pull request #436 from luckyteagirl/codex/doc-index-gpu-results
Why merged: a one-line docs index link to the GPU test results page.
Why it's good: the link target exists; docs tests (links, encoding, tables, i18n) and check_no_game_data pass on main d42773d plus this PR.

AI-assisted (Claude Code, Claude Opus 5.5).
2026-11-24 02:40:26 -05:00
0163aa3251 Merge pull request #467 from EdenBendheim/ubiq/opus-tags-duplicate-headers
Why merged: repeated tagging columns in either CSV are refused (exit 2) before any Ogg file is modified, and the docs say so.
Why it's good: security-reviewed; tested on Windows 11 merged onto main c023a36: 3 new tests (11 subtest failures on main), all passing on the merge. The one remaining failure, test_cli_reports_incomplete_directory_discovery (a Windows path repr), fails the same way on main.

AI-assisted (Claude Code, Claude Opus 5.5).
2026-11-24 01:58:29 -05:00
63250e6c6a Merge pull request #378 from lines9686-rgb/build-refuse-percent-path
Why merged: the build scripts now refuse a checkout or -Temp folder whose path contains '%' up front, instead of failing later in confusing ways; the reviewer nit (a relative -Temp) was fixed in 2a4f650.
Why it's good: security-reviewed (only path guards and a test: no URLs, downloads, elevation or policy changes). Tested on Windows 11 (RTX 4070 SUPER) merged onto main 8f481cf: build_llvm_mc/build_runtime tests 14 passed on main -> 17 passed with this PR; compileall clean; in Windows PowerShell 5.1 a path with '%' and '-Temp a%b' are refused while normal paths pass the guard. The earlier CI failures (macos/linux-gpu-tools MoltenVK shader tests) are unrelated to these scripts.

AI-assisted (Claude Code, Claude Opus 5.5).
2026-11-24 01:32:15 -05:00
d85e326eb7 opus_tags: reject duplicate CSV headers used for tagging 2026-11-24 00:46:14 -05:00
929ec5f255 docs: link GPU test results from the documentation index 2026-11-23 21:18:03 -08:00
31e2ad84c1 docs: distinguish native GameInput host failures (DOC-GAMEINPUT-HOST-DIAG) 2026-11-24 16:17:08 +11:00
5dbd92b92d build scripts: refuse a folder with % in its path up front
cmd.exe expands %...% on every line of the generated _build.cmd (twice on a CALL line), and cl.exe rejects a % in the
path-valued /D definitions of the runtime's test targets (D8038) however it is quoted, so a checkout with % in its path
failed in configure, or a few hundred Ninja steps in once the batch was escaped (@ezbyDev's measurements in the original repository).
build_runtime.ps1 now stops before looking for Visual Studio when the checkout path has a %, and build_llvm_mc.ps1 when
-Temp has one, each naming the folder; docs/testing.md gets a Known-problems row. tests/test_build_percent_path.py runs
both scripts with such a path, with git, python and vswhere hidden so that a missing check can't start a real build.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-24 07:09:02 +03:00
91575fda3a d3d12_xs: device slots 25/26 take the title's C-ABI struct return
The retail executable calls GetCustomHeapProperties (device slot 26) with the
C convention: the hidden return buffer in RCX and the device in RDX. The
proxy's generic forwarder assumed the PC C++ form (this in RCX, buffer in
RDX), took the buffer for the device and crashed on its vtable right after
D3D12XboxCreateDevice.

Slots 25 (GetResourceAllocationInfo, same rule, inferred) and 26 (measured)
now get thunks that accept either form: whichever of the first two arguments
is the device proxy is `this`. The runtime's own code still calls the proxy
through d3d12.h in the PC form. device_proxy_test calls both slots in both
forms against WARP.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
(cherry picked from commit 5dbc30bed7)

Adapted to main by Mumogg: slot 26 keeps the thunk it already has (86b8e04e4), so of this commit's two thunks
only slot 25's is installed.
2026-11-23 21:54:29 -06:00
9e6f8ae133 d3d12_xs: device slot 48 creates a command queue proxy from the 32-byte Xbox description
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
(cherry picked from commit 0cde63d618)

Adapted to main by Mumogg: main already routes slot 48 through its Xbox slot table (LEONIDA_XS_QUEUE_X_SLOT),
so the route now calls proxy_create_command_queue_xbox instead of a fixed slot 48 branch, and xs_proxy_mock's
check_xbox_slots and the environment case pass the console's 32-byte description.
2026-11-23 21:48:33 -06:00
c4954581ae d3d12_xs: device slot 26 takes the console's struct-return form
The retail executable calls GetCustomHeapProperties with the return buffer in RCX and the device in RDX. The forwarder took RCX for the proxy and faulted.

AI-assisted.

(cherry picked from commit 86b8e04e4c)
2026-11-23 21:46:43 -06:00
c07ec72c49 Merge pull request #227 from bhimio1/feat/linux-native-support
Linux: versioned llvm-mc, Build.sh/Mods.sh, case diagnostic, portable runtime tests, docs/linux.md
2026-11-23 22:36:28 -05:00
fabe844cd8 Merge pull request #131 from Mumogg/restore-directstorage
runtime: restore the console DirectStorage shim, with the typed-error inflate it needs (RT-DSTORAGE-RESTORE, #47)
2026-11-23 22:36:12 -05:00
268389e20d Merge pull request #263 from kotekompotek/contribution/wave64-emulate-barrier-sync
rdna2spirv: wire Wave64 emulate barrier/sync optimization pass
2026-11-23 22:28:16 -05:00
1c7f5b5106 Merge pull request #246 from Mouad-Scriptz-0/gpu-results/intel-mtl
GPU results: Intel Meteor Lake graphics (ANV, Mesa 26.2.7) on main 84347bb (GPU-INTEL-MTL)
2026-11-23 22:10:26 -05:00
388f2fcda6 Merge pull request #149 from natterman12/dashboard/d3d-issue-lookup
progress_dashboard: find the D3D12 tracking issue by title, not as #313 (DASH-D3D-ISSUE)
2026-11-23 22:10:18 -05:00
9674d530a0 Merge pull request #56 from natterman12/docs/contributor-links-current-repo
docs: contributor guidance points at this repository, not the private original (DOC-REPO-LINKS)
2026-11-23 22:09:48 -05:00
e496300e10 Merge pull request #44 from Mby159/docs/cube-store-contract
docs/design.md: the cube storage image contract (DOC-CUBE-STORE)
2026-11-23 22:09:44 -05:00
afef4770a9 docs/gpu_test_results: record Intel Meteor Lake graphics (ANV, Mesa 26.2.7) on main (GPU-INTEL-MTL)
The first Intel entry in gpu-test-results/: Xe-LPG, subgroup 8..32, no
64-wide subgroup. On main 84347bbb6: build.py 279/279 translated and
valid; check.py 177/219, 40 skipped; run_gpu_tests.py 194/248 native
(52 skipped) and 226/248 with LEONIDA_W64_EMULATE=1 (20 skipped), where
all 32 tests that need 64 lanes run and pass.

The only failures, in every run, are cs_imgload_tfe and
cs_imgload_d16_tfe (#31), with the 780M's words; both pass with #98
applied to the same main. The seven TEST-399 texture fixtures, recorded
as crashing on Mesa 26.2.7 on Iris Xe, pass with Fedora's 26.2.7 here.
2026-11-24 02:52:08 +00:00
84347bbb61 Merge pull request #24 from ddddddddwp/fix/shader-1264-exec-computed
rdna2spirv: a computed value written to EXEC sets the lanes of its bits (SHADER-1264)
2026-11-23 21:37:41 -05:00
6883da46ba progress_dashboard: find the D3D12 tracking issue by title, not as #313
--github read the D3D- table with `gh issue view 313`. That number was the
tracking issue of the repository the project started in. Here no such
issue exists, so the D3D12 panel was empty without a word, and once this
repository reaches that number the tool would read an unrelated item.

The issue is now the open one whose title starts with "D3D12 → Vulkan
layer" (looked up like the coordination issue), or the one --d3d-issue N
names. When there is none, or it cannot be read, the sources list says so
(github_d3d12: missing / invalid) and no other issue is read.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-23 21:28:55 -05:00
584b2679ae make_game, progress_dashboard: name this repository, not the private original
ensure_submodule() told a user with a ZIP download to
git clone https://github.com/ItsNotRexed/Leonida, which is private since
23 November 2026, and progress_dashboard.py --github read that repository by
default, so its pull-request, CI and coordination panels came back empty.

Both now name ubiquitarianism/leonida, as the README's clone command does.
Two tests tie the hint and DEFAULT_REPO to that README line, so a later move
fails a test instead of a user.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
(cherry picked from commit a837d9a616)
2026-11-23 21:27:53 -05:00
e6ca5cb29e Merge pull request #19 from moffington/contrib/pipeline-library-upstream
Add slot-67 pipeline-library shader build and runtime loading
2026-11-23 21:27:26 -05:00
2d7be48dec runtime: restore the console DirectStorage shim (DStorageGetFactory) on main
The merge that brought the mirrored pull requests into main (6dece9231) left the DirectStorage shim out, noting
that it "needs the typed-error zlib inflate". The shim's commits (f87d05fdd, ac1843da2, 00551ba00, by
mariuslozo-boop and Kelebek) are ancestors of main, but its files are not in the tree, so the retail
executable's XCRDAPI.dll!DStorageGetFactory import is unimplemented (issue #47, stop 5 of
docs/retail_boot_chain.md).

- shims/dstorage.cpp, shims/dstorage_xs_abi.h, test/dstorage_test.cpp and docs/directstorage.md are back as
  those commits left them.
- leonida::zlib_inflate reports why it failed through an optional ZlibError* (header, data, checksum, limit),
  which the shim turns into its E_DSTORAGE_ZLIB_* codes. This is the same interface the shim was written
  against, added to main's current table-driven inflater; callers that pass no pointer behave as before.
- registry.cpp classes xcrdapi.dll!DStorageGetFactory as an HRESULT import, the retail spelling #47 found
  missing.
- CMake and scripts/build_runtime.ps1 build the shim into gta6rt, and CMake builds and registers dstorage_test.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HxBQf4pXH8PWpC5oZsM4bt
2026-11-23 20:23:21 -06:00
642880a217 shaders: translate pipeline library in parallel and align clash/doc details 2026-11-23 21:20:34 -05:00
bbfacade3e docs: contributor guidance points at this repository, not the private original
CONTRIBUTING.md, AGENTS.md, the French contributing page and the issue
template's build link sent contributors to ItsNotRexed/Leonida, which went
private on 23 November 2026: the claims search, the gh command an agent is
told to run, #166 and #313 all led nowhere.

They now use ubiquitarianism/leonida, say that older #N numbers are from the
original tracker, and name what replaces them here (#18, #17,
gpu-test-results/, docs/d3d12_vulkan.md). Adds the done: line and the main
target from the coordination issue.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-23 21:08:34 -05:00
a5a22ad7a9 docs/design.md: the cube storage image contract 2026-11-24 10:06:37 +08:00
d8db7715c7 docs/shader_validation.md: salu_diff has 117 opcodes in OPS and draws from 104 by default 2026-11-24 07:31:31 +05:30
51c61df441 docs/README.md: the fspx row gives 20 of 29, the latest count in fspx.md 2026-11-24 07:31:20 +05:30
0e87fa3fb5 docs/design.md: the pc-tail-ubo row drops its stale shader counts; the GPU test programs bind the block, the D3D12 layer does not yet 2026-11-24 07:31:19 +05:30
b7fb698e51 docs: clarify the default salu_diff opcode pool 2026-11-24 07:30:17 +05:30
be64e8c7af docs: salu_diff generates 99 opcodes by default; v_pack_b32_f16 abs is implemented (#5519, #5517) 2026-11-24 07:30:17 +05:30
8e9708fd5f docs(linux): a Linux page: what runs natively, the packages, Build.sh, the runtime under Wine
docs/linux.md gathers what a Linux user needs in one place: which pieces
run natively and which run under Wine or Proton, with the CI job that
checks each; the Ubuntu 26.04 packages for each stage (no .NET 8 SDK is
packaged there, and the .NET 10 SDK builds rpf9dump through global.json's
roll-forward); ./Build.sh; the clang-cl + xwin cross-build of gta6rt; and
why there is no native Linux gta6rt (imports bind to host Windows DLLs,
Windows x64 ABI, RtlAddFunctionTable, the TLS host DLL, a vectored
exception handler), which is the work Wine already does.

README's How to build and Platforms rows and docs/README.md link it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-23 20:59:34 -05:00
5a8af54cbd build(linux): add Build.sh and Mods.sh, the shell counterparts of Build.bat and Mods.bat
Linux and macOS had no one-command entry point: Build.bat and Mods.bat are
cmd.exe scripts. Build.sh and Mods.sh find Python 3.12 or newer (the
versioned python3.N first, since a distribution's python3 can be older)
and run make_game.py or the mod manager's window with -I, passing every
argument through. They install and download nothing.

tests/test_shell_launchers.py runs both against stub interpreters on a
private PATH. The mod manager's missing-Tkinter message now names the
distribution package off Windows.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-23 20:51:04 -05:00
fca3be703c fix(linux): find a versioned llvm-mc and give Linux install hints
Debian and Ubuntu's llvm-<N> packages install llvm-mc only as llvm-mc-<N>
and /usr/lib/llvm-<N>/bin/llvm-mc. With LLVM_MC unset, the build looked
for the plain name alone and stopped with Windows advice
(scripts\build_llvm_mc.ps1, WSL), while tests/conftest.py already found
the versioned install, so the pytest suites passed where make_game.py
failed.

mc_command() now keeps the plain llvm-mc when it is on PATH (the name a
work folder's disassembly record holds) and otherwise takes the newest
versioned install, by version number. install_hint() gives each OS its
own advice; the preflight, shader_disasm.py and not_found() use it, and
the SPIRV-Tools hint names the distribution package off Windows and macOS.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-23 20:51:04 -05:00
1b15cd2316 rdna2spirv: a computed value written to EXEC sets the lanes of its bits (SHADER-1264)
`s_lshl_b32 exec_lo, 1, s5`, `s_add_u32 exec_lo, ...` and `s_bfm_b32 exec_lo, ...` reached EXEC
through the generic SALU destination path, which tested the value for non-zero. A computed
32-bit value is not a lane mask: lane L takes bit L of it, so `s_lshl_b32 exec_lo, 1, s5` sets
lane 3, not all 32.

Gen.exec_bit takes that bit, and Gen.dst now routes the wave32 `exec`/`exec_lo` writes and the
wave64 `exec_lo`/`exec_hi` writes through it. The other paths into EXEC (mask_dst, put_mask,
exec_half_write's constant form, s_mov_b32's mask_src, the saveexec/wrexec forms) already give
a per-lane mask or bit and are unchanged; a real mask (0 or ~0 per lane) answers the same
under bit extraction.

The words are the GPU's, already recorded in runtime/test/shaders/cs_w32_exec_computed.asm and
cs_w64_exec_computed.asm (RTX 5070), and tests/semantic/test_exec_computed.py replays them
through the CPU interpreter. docs/design.md's constant-lane-masks row records the rule.
2026-11-24 09:48:23 +08:00
9ec34cdff4 Merge pull request #11 from wavehs/proc-544-quickstart-stage-order
docs/i18n: the nine quickstarts say the stages run together, not in a chain
2026-11-23 20:40:36 -05:00
ee2b087b66 shaders: add library_shaders build stage and guard NONE compute states
Add the build-side pipeline-library translation stage to make_game.py on top of the .state emission already merged in tools/shader_library.py, and fix a TypeError when a compute pipeline record has a NONE (0xFFFFFFFF) state index.

- tools/shader_library.py: filter NONE program/state indices when building cs_state so records without a state blob do not crash with TypeError.
- make_game.py: add LIBRARY_ARCHIVE, LIBRARY_TOOLS, library_settings(), and library_shaders() to the shaders() stage (unpacking cs programs with --disasm and --carve, translating via rdna2spirv.py, validating fspx_key_clash against non-dict/unreadable indexes, cleaning stale unpacked artifacts, and writing library_build.json).
- docs/fspx.md, docs/shader_library.md: document library_shaders(), .state emission, and runtime loading of library/index.json.
- tests/test_shader_library.py, tests/test_library_shaders_stage.py: add NONE-state cleanup and shared-code/distinct-state regression tests plus full stage reuse, invalidation, stale-artifact cleanup, clash, malformed-index, and real-tool tests.
2026-11-23 20:38:06 -05:00
7bbd5f5694 docs/i18n: the nine quickstarts say the stages run together, not in a chain
Since #1797 check runs first and then shaders, assets and runtime run
together when selected (they do not depend on each other); pipelines
starts once the translated shaders are ready. The nine translated
quickstarts still described the old check -> shaders -> assets ->
runtime -> pipelines chain. fr is left to RT-946.

(cherry picked from commit 9b03635428)
2026-11-24 03:31:32 +02:00
20c7188efd saves: reject JSON nested deeper than 512 levels explicitly
Python 3.14's json decoder is iterative, so a 100,000-level JSAV body no
longer raises RecursionError: parse_jsav accepted it, info printed
JSAV (...), verify said OK and extract died with a 1,027-line traceback
and exit 1 (json.dump recurses). The tests already expected a validation
error and noted that the C decoder's limit differs by platform; the tool
now checks the nesting depth itself (JSON_NESTING_LIMIT = 512, brackets
inside strings ignored) in parse_jsav, in verify's per-block check and in
the packed index, so a malformed save is one error line and exit 2 on
every Python.

(cherry picked from commit 79da3a9161fb0a238ddf4fd5179559bcd69c44a0)
2026-11-24 03:30:06 +02:00
7c7b5c73e7 Merge main into integrate-mirrors 2026-11-23 20:14:27 -05:00
6dece92317 Merge TreXito's unmerged PRs: translator fixes, fuzzers, CPU emulation, xapu/chad shims
Merged from the TreXito/mangrove copy of the original repository, which carried
contributor pull requests that were never merged here.

Kept: rdna2spirv fixes (ds_append/ds_consume, v_ldexp_f16 under MODE.FP_ROUND,
thread-group SGPR, fma exact), the differential fuzzers (dot, vint, wint, vrel, cvt,
f16misc, salu, mode) with their tests, the exe/import fail-fast and int3 cause tools,
Zen 2 instruction emulation (cpu_emulation.h) and the xapu.dll/chad.dll shims.

Not taken, because they conflict with different implementations already on main:
the D3D12 Xbox-ABI layer, xmem, acphal, loader TLS, f64_diff, DirectStorage (needs the
typed-error zlib inflate), and the copy's own MANGROVE.md and README changes.
2026-11-23 19:42:33 -05:00
f9c68577e3 d3d12: slot 133 textures answer GetGPUVirtualAddress with the title address
A retail title places a 256x256 R32_FLOAT texture through Xbox device slot 133
and then clears it through the value GetGPUVirtualAddress returns, used as a CPU
pointer. The layer answers 0 for a texture, as D3D12 does, so the title wrote
256 KB at address 0. XCL measured the same clear and returns the address the
title placed the resource at (its PR #168).

A slot-133 placed texture still gets its committed fallback image, but records
the title address and reports it from GetGPUVirtualAddress. Ordinary textures
still answer 0 and buffers are unchanged. The pixels do not alias the title's
pages yet, so a write through the address is not uploaded; that is the
page-mapper work and is called out in docs/d3d12_vulkan.md.

Tests: d3d12_existing_heap_test checks that the RENDER_TARGET layout and the
COMMON retry both answer the title address; it exits 0, and gta6rt links.

AI-assisted: DeepSeek V4.1 Flash 1017 (Alibaba Token Plan); coordinated by Qwen4 Max Preview.
2026-11-24 01:29:22 +01:00
a8b7ddbd50 Make main's tests green, part 2: docs drift, bvh_slot_check, find_hash_lookup (#10002)
Seven more test files that fail on main at d083a2c, after #9896:

- test_docs_repeated_lines: tests/semantic/README.md's command block is a fenced block, which the check skips;
  its indented form put two lines with the same 40-character opening three lines apart
- test_docs_repo_paths: docs/retail_boot_intel_host.md names #8554's frame-loop notes instead of a path that
  is not in the tree
- test_docs_env_vars: runtime/README.md documents LEONIDA_RNG_SEED (runtime/shims/bcrypt_rng.cpp)
- test_docs_design_rows: docs/README.md gets one row each for strand_grooms.md and ped_catalogues.md (two
  rows each were merged in), and design.md escapes the pipe in `prim_cnt << 12 \| vtx_cnt`
- test_docs_cli_flags: docs/testing.md passes llvm-mc through LLVM_MC, so `brew --prefix` is no longer read as
  a bench_wave64.py flag; pt-PT's quickstart points to the web checker that replaced tools/pc_checker.py
  (5125a01), as README.md does; the spirv-opt passes docs/embedded_shaders.md quotes join FOREIGN
- test_bvh_slot_check: bvh_match.model_geometries() yields six fields since the render bucket was added;
  unpack the two it needs
- test_joaat_agreement (find_hash_lookup's half): hash over the Latin-1 bytes like hashdict.joaat, as #6254 and
  #7820 proposed

Still red, for a separate change: test_joaat_agreement's leonida_mods half (it hashes UTF-8 bytes like
runtime/src/mods.h, so both sides change together), test_f64_conversion and test_f64_output_modifiers (they
expect the output scaling #6314 gated by MODE) and test_bvh_shaders_stage.
2026-11-24 00:28:18 +01:00
7067ff2f2b Merge pull request #5038 from ray3242/fix/i18n-es-quickstart-sync
docs(i18n/es): sync quickstart with current README (issue #4737)
2026-11-24 00:13:34 +01:00
c1f6b5bb52 Merge pull request #3637 from ray3242/devin/1795381635-design-leftovers-2
docs/design: remove the duplicated image-query contract row
2026-11-24 00:12:17 +01:00
e56d97950f Merge pull request #2498 from iasmitionsalvatore/pr/footprint-base-offset
d3d12: GetCopyableFootprints aligns from BaseOffset
2026-11-23 23:47:26 +01:00
bacf6f4e2a Merge remote-tracking branch 'origin/pr/8953' 2026-11-23 17:41:05 -05:00
2c9d676b24 Merge remote-tracking branch 'origin/pr/8957' 2026-11-23 17:41:04 -05:00
a5c9e54bf5 Merge remote-tracking branch 'origin/pr/8982' 2026-11-23 17:40:57 -05:00