Commit Graph

943 Commits

Author SHA1 Message Date
dbdef2efd7 mesh-serial-waves: a GPU fixture whose two waves run loops of different length
ms_w64x_wave_loops: each wave loops while a wave-wide count is not 0, 5 iterations in wave 0 and 9 in
wave 1, so under --wave64-emulate the waves reach different numbers of workgroup barriers. Written after
stalls were reported with the serial form on an RTX 2070 SUPER (issue 1608). On an RTX 4080 (NVIDIA
621.24) it draws 4096/4096 pixels exact side by side and in series; that does not explain the stalls.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-27 17:29:50 +08:00
fbceecf042 mesh-serial-waves: unit tests, the design row, the GPU runner's switch
tests/test_mesh_serial_waves.py: the module shape of a program that
qualifies (64 invocations, the pass loop, the index from the built-in,
the exchange's own place, per-pass copies of the exports, one
OpSetMeshOutputsEXT), that every initialised Function variable is set
again per pass, and that ms_wave_info_s3 (LDS), a 32-thread program,
native wave64 and --mesh-compute are unchanged by the flag.

LEONIDA_MESH_SERIAL_WAVES=1 is read by scripts/run_gpu_tests.py, like the
other translation switches, and no longer by rdna2spirv.py itself.
docs/design.md and docs/testing.md say what the flag does and how it is
tested; conftest gives ms_w64x_wave_votes its 128-vertex PSV0.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-27 11:29:22 +08:00
e954dc8c16 mesh-serial-waves: a GPU fixture whose waves vote differently; no memory writes in a serial program (work in progress)
ms_w64x_wave_votes: two waves take different branches, each with its own
ballot count (and a v_readfirstlane in the second), and the triangle's
vertices come from threads 0 and 1 of the first wave and thread 64 of the
second, so ms_tri's picture needs both waves to have run their own branch
with their own votes. It passes in the side-by-side form and with
--mesh-serial-waves on an RTX 4080 (NVIDIA 621.24).

A program with a store or an atomic to memory keeps the side-by-side
form, as one with LDS does: its waves could pass each other something.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-27 11:13:58 +08:00
2d43417d49 Merge pull request #1647 from OreoFR/shader-vopcx-dpp
rdna2spirv: translate v_cmpx in DPP form (SHADER-VOPCX-DPP)
2026-11-26 19:54:03 +01:00
ee47019246 Improve first-run input diagnostics 2026-11-26 17:49:58 +01:00
071ec8449c address guard: the two programs set errors='replace' on stdout
tests/test_tool_stdout_encoding.py requires it of every program's __main__ block.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-26 09:23:38 -05:00
6d3904860e Merge #2144 from klikso: a scripted press can be held longer, button@seconds:hold (INPUT-SCRIPT-HOLD)
Head 7bd4cec02.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-26 09:17:34 -05:00
399ecdd511 Merge #2044 from BubsMcgee: decode Opus packets through a Rust sidecar (RT-XAPU-OPUS-DECODE), with #1144 from nicoco23: xapu.dll as a command queue (RT-XAPU-CONNECT-LAYOUTS)
Head 4cfbdfc0b, which contains #1144's head 6ee7ef89b.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-26 09:16:29 -05:00
1156672942 rdna2spirv: --address-guard checks every heap_base access against the runtime's page table
Every Gen.host_addr access (buffer, global_, scalar and BVH loads, stores and atomics) calls one
%guard_fn with its sign-extended 48-bit heap offset, kind and span. Below the arena's size it passes
after a compare; elsewhere the 4 KiB pages of its first and last byte are looked up in a two-level
page table (level 1 by offset bits 47..32, level 2 one bit per page). A refused load reads the zero
area, a refused store or atomic the dump area (an atomic returns 0), and the refusal is counted in
the guard header. Without the header's magic every access passes; without the flag the module is
unchanged byte for byte.

tools/address_guard.py is the Python reference of the table and the check. cs_address_guard is the
fixture of the translator test and of scripts/run_address_guard_gpu_test.py, which runs it on a heap
where every address it touches is real memory, so no run can fault.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-26 09:07:52 -05:00
7bd4cec026 gameinput: boot.ps1 names the :hold form; rewrap the script header comment
Review follow-up (MoonEyes): the InputScript help in boot.ps1 now says
each press is held 300 ms and that button@seconds:hold holds it longer.
The header comment in gameinput_script.h is wrapped at 120 like the rest
of the file. Comments only; no code change.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-26 13:09:17 +00:00
7b1fe62850 Keep main's watchdog switch and say where the peek default went
f0611b752 took the executable's addresses out of the code. Two behaviours
changed with it; the removal stays, the changes are now explicit:

- runtime/src/main.cpp: the watchdog kick runs again only with
  LEONIDA_TITLE_WATCHDOG=0, as on main; LEONIDA_TITLE_WATCHDOG_KICK only
  supplies the two RVAs it needs. Either variable alone leaves the
  watchdog armed and the loader says so once (before this commit the kick
  ran whenever LEONIDA_TITLE_WATCHDOG_KICK was set).
- scripts/windows-boot/boot.ps1 no longer has the game- and
  session-state RVAs built in, so LEONIDA_PEEK has no default and the
  RESULT states read "?" unless LEONIDA_GAME_STATE_RVA and
  LEONIDA_SESSION_STATE_RVA are set. The script now warns when they are
  not, and runtime/README.md (LEONIDA_PEEK, LEONIDA_TITLE_WATCHDOG and
  _KICK rows), scripts/windows-boot/README.md and docs/first_run_ui.md
  say so.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-25 21:55:15 -05:00
8d686309b0 Merge main into integration/boot-combined (RT-BOOT-COMBINED)
Conflict in runtime/shims/d3d12_xs_device.cpp, proxy_copy_descriptors_simple:
keep this branch's copy_null_rtv_marks call and main's fsdraw::enabled()
gate for the descriptor-copy diagnostic.

tools/rdna2spirv.py merged without a textual conflict, but #1662 on main
calls restore_dot4_inline_sel in the exact re-anchoring path, which this
branch had deleted. The merge puts main's function back so that call
resolves; the next commits reconcile it with the dot4 op_sel rule.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-25 21:49:53 -05:00
d9bb374655 Fix the third red check, and guard the scripts that landed since (#1561 review)
- test_tool_stdout_encoding: three scripts merged since this PR opened
  (check_compute_journal_overlay.py and compute_workers_win.py with #2098,
  corpus_watch.py with #817) get the same stdout guard as the tools here.
- test_runtime_paths: the runtime workflow's two path filters now include
  tools/conformance/**, which runtime/CMakeLists.txt names. The change is
  #1673's (xel1uz), carried here since #1673 duplicates this PR.

With it, test_tool_stdout_encoding, test_runner_calls_all_tests and
test_runtime_paths all pass on main.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-25 19:54:10 -05:00
3a2820b3bf Merge main c1e1ef0b8 into RT-POST-LOAD-GPU-MEMORY (#2098)
Two conflicts:

- d3d12_com.cpp, note_direct_heap_indexing: main's console_descriptor_table_va(cbv_srv_uav_base_) for the tracked
  table, with this branch's per-site once() flag instead of note_once on every draw.
- d3d12_vulkan_device.cpp, PipelineState::build_compute: this branch's body (build_compute_pipeline, journal, compile
  helper). main's dev_status::Build around the compute create moves into build_compute_pipeline, next to the
  pipeline_profile::DriverCall, so the status line still names the compute pipeline in the driver.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-25 18:36:19 -05:00
c5f1807515 rdna2spirv: translate v_cmpx in DPP form (SHADER-VOPCX-DPP)
Extend #957's DPP VOPC compare to v_cmpx: the same lane selection, with the
result written to EXEC. v_cmpx prints no destination, so src0 is its first
operand. Only the forms where every lane writes its bit are taken, as for
v_cmp. 78 pipeline-library pixel shaders of 1.0.2.1 were refused for it; all
78 now translate and pass spirv-val.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-25 23:36:00 +01:00
b739685995 Merge pull request #730 from aslan2142/build589-vs-layout-census-guard
OLD-8645: restore old upstream PR 8645 - vs_layout_census: refuse a --json that is an input or a directory before survey() (BUILD-589)
2026-11-25 23:27:04 +01:00
eaa3792fd8 Merge pull request #713 from aslan2142/audit-shader4-limit-zero
OLD-7087: restore old upstream PR 7087 - audit_shader4_regs: --limit must be at least 1; 0 audited nothing and printed a zero report
2026-11-25 23:23:29 +01:00
bffc6395b1 Merge main into RT-POST-LOAD-GPU-MEMORY (#2098)
main d3b8251bc brings #1889 (large compiles within a memory budget), #1987 (unbound T# reasons), #1759, #1860
and others under this branch. Conflicts:

- d3d12_vulkan_device.cpp, includes: both (pipeline_cache_journal.h and large_module_gate.h).
- d3d12_vulkan_device.cpp, fix_console_slot's T# branch: main's form (counts refused_reasons, #1987), with this
  branch's comment on why a slot that is no T# is nulled. The same reason count is added to console_tsharp_check,
  the GPU console-heap path's T# registration, so its log line has the reasons too.
- d3d12_vulkan_device.cpp, the heap log: both blocks (the release filter / GPU heap lines and main's "unbound T#s by
  reason" line).
- d3d12_vulkan_device.cpp, PipelineState::build_compute: this branch's body (build_compute_pipeline, journal, compile
  helper) behind main's entry: the `Work` argument and enter_build, so a large module takes its place at
  big_compile_gate() before variants_mutex_, as #1889 requires (a thread that waits for memory holds no PSO lock).
  build_compute_pipeline's own big_compile mutex now follows main's BigCompiles: taken only with
  LEONIDA_SERIAL_BIG_COMPILES=1 (it was on by default here), so the default is main's budget, not one at a time.
- d3d12_vulkan_device.cpp, queue_locked: this branch's Build-state jobs (claim, defer, finish). main's
  `requested_`/`publication` mechanism they replace is not kept. build_variant passes Work::speculative for a
  "warmup" build and Work::demand otherwise, as main's queue_build did.
- vulkan_replay.h, ComputePipeline: main's comment on `large`, and this branch's `await`.
- vulkan_backend.h: this branch's LEONIDA_SUBMIT_ASYNC block, with main's lock order in the state_mutex_ comment
  (state_mutex_ -> pipeline_mutex_ -> resource_mutex_ -> tracker_mutex_ -> submit_mutex_).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-25 17:21:25 -05:00
b4ae8916ef Merge pull request #653 from aslan2142/pe-inspect-linux-classes
OLD-7084: restore old upstream PR 7084 - pe_inspect: classify system DLLs on Linux through the Wine prefix, bundled names without case
2026-11-25 23:19:58 +01:00
865e2d7912 Merge commit 'refs/fix2/main' into fix2-653 2026-11-25 16:51:53 -05:00
0bae6f545a Merge main into wave64-partial-wave-zero
scripts/run_gpu_tests.py: main added cs_w32_wrxchg2_ext and
cs_w32_wrxchg2st64 to the same name list; keep main's list and add
cs_w64x_partial_swizzle to it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-25 16:37:28 -05:00
d96b3a8644 Merge pull request #857 from ohshitwaddup/tests/gpu-wrxchg2-b32
tests: GPU fixtures for the ds_wrxchg2_rtn_b32 pair cases and ds_wrxchg2st64_rtn_b32 (TEST-WRXCHG2-B32-EXT)
2026-11-25 22:28:36 +01:00
fb5796b8ed Merge pull request #609 from TuroYT/fix/gpu-runner-tbuffer-verdict
run_gpu_tests: record the cs_tbuffer_store verdict (GPU-RUNNER-TBUFFER-VERDICT)
2026-11-25 22:27:40 +01:00
72006d61d5 Merge pull request #817 from fitzypopper/corpus-watch-tool
CORPUS-WATCH: add counts-only corpus regression watch tool and tests
2026-11-25 22:06:45 +01:00
1c5aa29a36 Merge branch 'integration/translator-fixes' into local/boot-combined
# Conflicts:
#	runtime/src/main.cpp
2026-11-25 16:06:19 -05:00
9f98dcc617 Improve post-load GPU memory and pipeline handling (RT-POST-LOAD-GPU-MEMORY)
Fall back to a dedicated buffer allocation when the shared arena fills.
Update console descriptors and resource backing, preserve pipeline cache
entries, and replay mesh records using bounded indirect arguments. Keep
scripted input available until read and cover the runtime and translator
paths with synthetic tests.

Co-authored-by: Plaaasma <47513553+Plaaasma@users.noreply.github.com>
Co-authored-by: ivanepsilondelta <264061546+ivanepsilondelta@users.noreply.github.com>
2026-11-25 14:30:51 -06:00
721a3b85ae Merge main into wave64-partial-wave-zero
Conflict in scripts/run_gpu_tests.py: the dump-test name list gained
cs_w64x_cmp_sdst on main and cs_w64x_partial_swizzle here; both are kept.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-25 14:37:20 -05:00
4cfbdfc0b2 Merge remote-tracking branch 'origin/main' into rt-xapu-opus-on-1144 2026-11-25 14:12:01 -05:00
30a2a1862c run_semantic_tests: terminate process tree on Windows via taskkill and increase sleep margin (SEMANTIC-RUNNER-INTERRUPT)
- On Windows, terminate child processes using taskkill /F /T /PID to ensure
  launcher processes (e.g. venv python.exe wrappers) terminate all child workers.
- Increase synthetic sleep duration in tests from 5s to 10s and timeout margin to
  eliminate timing flakiness under high machine load.

AI-assisted (Claude Code).
2026-11-25 19:55:46 +03:00
542c046c50 run_semantic_tests: stop active subprocesses and cancel queued modules on interrupt (SEMANTIC-RUNNER-INTERRUPT)
Catch KeyboardInterrupt in run_semantic_tests.py, cancelling queued test modules via pool.shutdown(wait=False, cancel_futures=True) and terminating active child subprocesses so that no orphaned zombie processes or queued modules run after Ctrl+C. In serial mode (-j 1), terminate the discover subprocess on interrupt.

Return exit code 130 and output 'interrupted' to stderr without printing a false success summary.

Adds regression and lifecycle tests in tests/test_run_semantic_tests.py.

AI-assisted (Claude Code)
2026-11-25 19:11:41 +03:00
77baf90627 Merge pull request #1703 from OreoFR/rt-dual-source-blend
d3d12: dual-source blending reads SV_Target1 at Location 0, Index 1 (RT-DUAL-SOURCE-BLEND)
2026-11-25 14:46:46 +01:00
597cf76623 TOOLS-WINE-GAME-RUN: scripts/run_game_wine.sh, one bounded game run under Wine
The launcher runs gta6rt.exe --run once under Wine on Linux, headless on a
private kwin_wayland --virtual --xwayland session (Xvfb has no DRI3, so RADV
cannot present there) or on the current display with --visible. Sound is off
(Wine's audio drivers disabled, Pulse/PipeWire/ALSA pointed at nothing,
LEONIDA_AUDIO=silent for the runtime's silent output endpoint), --device pins
the Vulkan device through MESA_VK_DEVICE_SELECT, and a hard time limit, a lock
and full teardown bound the run. Every path comes from arguments or the
environment.

tools/game_run_summary.py prints counts only: run time, end, exceptions by
code, D3D12 calls by outcome, presents, the top failing calls and the [rt]
lines by category with numbers masked. It never prints a log line.

Tests need no game, Wine or GPU: the script against stubs, the summary on
synthetic run folders. docs/linux_proton.md describes the script.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-25 07:30:48 -05:00
6ee7ef89b9 Merge branch 'main' of https://github.com/ubiquitarianism/leonida into xapu-connect-layouts
main added its own runtime/shims/xapu.cpp: the boot stack's earlier xapu.dll stub, which gta6rt does not link and
xapu_test checks. This branch's xapu.dll command queue moves to runtime/shims/xapu_queue.cpp so both stay: gta6rt,
xapu_chad_test, the cl.exe fallback list in scripts/build_runtime.ps1 and the references in xapu_chad.cpp,
xapu_chad_test.cpp and docs/audio_hal_exe_calls.md name the new file; main's xapu.cpp and xapu_test are unchanged.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GnGkjYHUWx92TkwvwCnAMe
2026-11-25 12:09:55 +01:00
188207a9d4 run_gpu_tests: ps_m15_dual is run by d3d12_translated_draw_test, like ps_m15 (RT-DUAL-SOURCE-BLEND review)
The generic pixel-shader harness picked up the new fixture and lost the device on an RTX 4060: it has no second
colour target and no SRC1 blend. d3d12_translated_draw_test --dual-source owns that draw.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-25 12:08:24 +01:00
8b771908c3 Merge main into feat/gdk-lifecycle-window-hook (#769)
scripts/build_runtime.ps1 conflicted in the $files list of the build
without CMake: main added shims\silent_audio.cpp there (#1598) after this
branch had merged main, and this branch adds shims\lifecycle.cpp. Both
entries are kept, lifecycle.cpp where this branch had it. The branch's
other change in that file (user32.lib on the link line) merged cleanly.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-25 03:41:48 -05:00
f0611b752f Remove the title's executable addresses #984 brought in; read them from the environment
#984 (273b3bdf9) put RVAs and file offsets of the retail executable into code, docs and scripts.
The code paths that need one now read it from an environment variable and are off when it is
unset; the docs and examples say the location is measured locally.

- runtime/src/main.cpp: the hang-watchdog kick takes its trap and kick RVAs from
  LEONIDA_TITLE_WATCHDOG_KICK="<trap RVA>,<kick RVA>" (hex), still only when the trap
  instruction is at the first one. Unset, the watchdog stays armed, as before by default;
  LEONIDA_TITLE_WATCHDOG=1 keeps it armed, and LEONIDA_TITLE_WATCHDOG=0 without the RVAs says
  once that it needs them. The LEONIDA_PEEK example uses placeholders.
- runtime/shims/startup_trace.h: the transient-pool dump fires at the int3 that
  LEONIDA_POOL_DIAG_AT names (`<module>+0x<offset>`, as the trace prints it), off when unset.
- scripts/windows-boot/boot.ps1: LEONIDA_PEEK's default comes from LEONIDA_GAME_STATE_RVA and
  LEONIDA_SESSION_STATE_RVA (no peek when unset), and the RESULT digest matches those values;
  the examples and README use placeholders.
- runtime/README.md documents LEONIDA_TITLE_WATCHDOG_KICK and LEONIDA_POOL_DIAG_AT.
- docs/fspx.md, docs/d3d12_vulkan.md, docs/movies.md, docs/embedded_shaders.md and a comment in
  runtime/shims/d3d12_xs_alloc_size.h drop the addresses and offsets.

This follows the same change on the earlier integration branch (#1495).
2026-11-25 01:00:37 -05:00
d4ce33ed42 runtime: serve a silent output endpoint when the host has none
The title creates its MMDeviceEnumerator through CoCreateInstance. On a host with no
render endpoint, GetDefaultAudioEndpoint(eRender) is 0x80070490, the title's audio device
start leaves its own output-device lock held, the audio engine never mixes, and the boot
stops on an int3 about 47 s in. A console always has an output.

com_shim's CoCreateInstance now hands that class to shims/silent_audio.cpp. A host
enumerator with a default render endpoint is returned unchanged. Otherwise (no endpoint,
no enumerator, or LEONIDA_AUDIO=silent) render questions get an in-process endpoint:
IMMDevice with a read-only property store, IAudioClient/2/3 at 48 kHz float 7.1, and
IAudioRenderClient, IAudioClock, ISimpleAudioVolume and IAudioStreamVolume. A clock drains
the padding in real time and an event-driven stream's event is signalled every 10 ms.
Every sample is discarded; no host audio device is opened. Capture keeps the host's
answer. One [rt] line names the reason when the silent device is first served.

silent_audio_test covers stand-in hosts with and without an endpoint, no host, a render
stream over a few periods, and the CoCreateInstance hook with LEONIDA_AUDIO=silent.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-25 00:05:32 -05:00
f9792cc56d Merge remote-tracking branch 'ubiq/main' into feat/gdk-lifecycle-window-hook
# Conflicts:
#	scripts/build_runtime.ps1
2026-11-25 00:58:58 -03:00
7ae1dd3de3 Merge pull request #1226 from IlyassRS3/carry/old-9973-merge-check-rev-paths
Merging.

**Why merged:** merge_check passes git arguments after a `--` boundary, so a path or ref that starts with `-` can't be read as an option. xel1uz approved it.

**Why it's good:** Own tests: 24 passed.

Tested on Windows 11 / RTX 4070 SUPER: merged alone onto main b4b7756e8. With it in, the repo-consistency set (cmake/translator-deps, shader_stage_resume, runtime_paths, docs, make_game, no-game-data, run_semantic_tests, ctest_registration) gives 578 passed / 5 skipped / 0 failed, and check_no_game_data on the changed files is clean. git merge-tree against current main 3ff2a2adc (after #984): no conflicts. Security read of the three-dot diff: no binaries, game data, downloads, network calls or CI changes.

AI-assisted (Claude Code, Claude Opus 5.5).
2026-11-24 21:35:37 -05:00
0819cfec80 Merge main (3ff2a2adc) into the #939 merge
Fourteen commits main gained after #968: #413, #1114, #1090 and #1491. Two conflicts, both in the shader check lists: scripts/run_gpu_tests.py imports both sides' cases, and tests/test_shader_checks.py counts eight cases next to COMPUTE (main's cs_w32_salu_ext) and #939's IMAGE_STORE_CASES table in place of main's fixed seven store shaders.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-24 21:23:42 -05:00
a9761ab2f9 tests: GPU fixtures for the ds_wrxchg2_rtn_b32 pair cases and ds_wrxchg2st64_rtn_b32 (TEST-WRXCHG2-B32-EXT)
docs/design.md's ds_wrxchg2_rtn_b32 row names cs_w32_new_ops as its fixture, and that fixture
compares only the first returned word and data1 in LDS. Four things the row states were therefore
never checked on a GPU: the second returned word, data0, the st64 step, and vdst aliasing the data
VGRs. The row's own note also records the non-st64 step indirectly only on gfx1100.

Two branchless fixtures, one lane each (32 lanes on one LDS address would race):

  cs_w32_wrxchg2_ext   both offsets on one dword: the first exchange returns the old word and the
                       second returns data0, not the word the first wrote; a neighbouring LDS word
                       is untouched; with vdst aliased onto the data VGPRs the data is read before
                       the result is written, so vdst gets the old pair and LDS the new one.
  cs_w32_wrxchg2st64   the st64 unit is 64 dwords: base 0x80 with offsets 1/2 addresses 0x180 and
                       0x280. 0x84/0x88 (where a 4-byte step would land) and 0x140/0x2c0 (one step
                       either side of the real elements) are seeded and must come back untouched,
                       which is what pins the stride rather than assuming it.

Both are registered in check.py (CS_DUMPS, WAVE32_DUMPS, WAVE32_LANE_DUMPS) and
scripts/run_gpu_tests.py, and judge all eight words in hex.

Measured on a Radeon RX 6900 XT (RDNA2, GFX1030, RADV Mesa 26.2.4, Nobara Linux 44), main d0da7da:
  build.py          283 shaders: 283 translated, 283 pass spirv-val
  check.py          217 of 222 pass, 3 skipped, 2 failed
  run_gpu_tests.py  233/251 passed, 16 skipped, 2 failed (native and LEONIDA_W64_EMULATE=1 alike)
  --filter wrxchg2  2/2 PASS both modes, every word exact (16/16)
The two failures in the full runs are cs_imgload_tfe and cs_imgload_d16_tfe, the pre-existing
SHADER-1266/#31 pair, unchanged by this commit.

No game files, nothing online. AI-assisted (Hermes Agent).
2026-11-25 08:53:57 +07:00
871e4b8b99 Merge pull request #1090 from milk4sale/test-w64-sdst-pair-gpu
tests: a GPU fixture and whole-corpus counts for one-register wave64 mask destinations (TEST-W64-SDST-PAIR-GPU)
2026-11-24 20:50:01 -05:00
8a57b3b1d3 Merge pull request #1114 from milk4sale/gpu-test/salu-ext
tests: GPU readback for 38 scalar ALU ops on run-time operands (GPU-SALU-EXT)
2026-11-24 20:49:40 -05:00
38bd89d44e Merge the #984 result as of 71a783e56 into the #939 merge
Fourteen commits the #984 merge gained after 8a242efeb: its own failing tests (xmem_test under Wine, check_tls_index0, vk_bindless_grow, xs_present_lazy_test), the console-heap probe and the poke experiment behind their switches, Python tool fixes, and the title watchdog default. No conflicts.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-24 20:37:26 -05:00
154e4ec034 Merge the #984 result (main + RT-PROTON-STORY-LOAD) into #939
The base is 8a242efeb, the merge of main and #984. 68 files conflicted; they were resolved in seven groups by
one rule: the same change in two forms keeps the base's form, everything only #939 has is kept, and where the
two solve one problem in two ways the base's is the frame and #939's plugs into it.

A, the Xbox proxy (d3d12_xs_device.cpp/.h, d3d12_xs.cpp, d3d12_xs_pso_stream.cpp/.h, d3d12_xs_alloc_size.h,
d3d12_xs_desc_clean.h, device_proxy_test.cpp, queue_proxy_test.cpp): the base's files with #939's additions
ported in. Device slot 57 asks #939's NativeGraphicsFactory first and falls back to the base's
proxy_create_graphics_pipeline_from_native_code on E_NOTIMPL. Kept from #939: the providers (texture lease,
raw texture view, resource by address, constant view, descriptor mapping, depth-stencil UAV, texture pages),
the title-backed descriptor mirror, slot 13's feature answers, GPU labels on list slots 71/72. Dropped: #939's
duplicates of the boot ladder routes, its fallback window, its slot 133 stand-in.

A2 (xs_proxy_mock_test.cpp): the base's test with #939's slot 70 raw-buffer case; presentation cases follow
#939's rule that a device which ever had a handler has no queue fallback.

B1, the Vulkan device (d3d12_vulkan_device.cpp, d3d12_com.cpp/.h, shader_library.h, queue_families.h,
pipeline_cache_file.h, startup_trace.h): one lazy-pipeline mechanism, the base's; #939's pending_base_compile
and first_use_backend_pipelines dropped, prepare_on_bind and cold_graphics_compile kept. create_texture keeps
the base's signature; #939's deferred backing is folded into the base's placed-memory binder. #939's quad
lists as triangle indices.

B2, the D3D12 tests (d3d12_existing_heap, a8_dimensions, pipeline_cache_seed, title_va, rect_list,
shader_library, loader_tls_index0, draw, compute, xmem_placed, shader_library_corpus): the base's tests where
both carry the same case, #939's cases added (rebound tables, linear texture map, large vertex batch,
executable shaders, default A8 views).

C, the backend (vulkan_replay.h, vulkan_backend.h, vulkan_bindless.h, vulkan_scratch.h, vulkan_present.h,
rect_list_geometry.h, vk_test_device.h, vk_pipeline_check.cpp, vk_store_test.cpp, bindless_sizing_test.cpp,
replay_texture_barrier_test.cpp): the base's prepare_draw and lazy compute, its #1055 release rule and its
rectangle generator; #939's rectangle variants, GPU quad index expansion, 1D/3D and depth-stencil UAVs, the
label fence on the base's submit.

D, memory, services, presentation (xmem.cpp/.h, xg_xs.cpp, xg_xs_test.cpp, title_va_alias.h and its test,
main.cpp, frame_pacer.h, xbox_present.cpp/.h; xgameruntime_offline.cpp for one comment): the base's xmem with
#939's label hooks, file-backed sections and pin_mapped_data; both texture computers in xg_xs.cpp, the base's
answering first; --first-run-ui kept without host speech in its profile.

E, build, tools, docs (runtime/CMakeLists.txt, make_game.py, tools/rdna2spirv.py, tools/shader_disasm.py,
scripts, tests, docs; docs/README.md and tests/test_exe_shaders_stage.py beyond the conflicts): the base's
v_dot4 decode, #281's disassembler form and tests/semantic/test_fspx_dot4_op_sel_disasm.py dropped; the
base's executable-shader step with #939's cache fix; 366 registered tests.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-24 20:26:00 -05:00
100fed1b3d #984's Python tools: encoding=, the stdout guard, and --help that writes no file
Three conventions main's tests enforce and #984's new tools missed (all three tests fail on #984's head):

- tests/test_text_encoding.py: tools/build_dstorage_history.py read its stamp and its base history, and tools/dstorage_census.py its trace, in the locale's code page. They name UTF-8 now.
- tests/test_tool_stdout_encoding.py: the __main__ blocks of build_dstorage_history.py, dstorage_census.py, gen_bcpack_runtime_tables.py and scripts/translate_pipeline_compute.py did not set errors='replace' on stdout.
- tests/test_tool_startup.py runs every tool with --help. gen_bcpack_runtime_tables.py took its first argument as the output path whatever it was, so the test passed and left a 61 KiB file named '--help' in the working directory. The tool has an argument parser now (the tables file, or --profile JSON OUT, as before); the generated tables are byte-identical.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-24 20:09:32 -05:00
d033c3f74b build_runtime.ps1: the cl.exe fallback compiles console_registry.cpp
#984 adds shims/console_registry.cpp to gta6rt's sources in CMake but not to the cl.exe fallback's list, so the fallback would stop at link time and tests/test_build_runtime_fallback.py fails (on #984's head too).

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-24 20:07:37 -05:00
39879ce0fd Merge main into RT-PROTON-STORY-LOAD (#984)
Merges main at 1154976d4 into the integration branch at 273b3bdf9 (merge base ece4ba5b3). 42 files conflicted;
this commit is the resolution only. Build and test repairs follow in their own commits.

Rule of resolution: where both sides added different things, both stay; where both made the same change in two
forms, main's reviewed form stays and whatever #984's form did in addition is carried into it; where the two
changed the same code for different purposes, both purposes are kept.

Xbox proxy code (runtime/shims/d3d12_xs_device.cpp, d3d12_xs_device.h, d3d12_xs.cpp, d3d12_xs_alloc_size.h,
d3d12_xs_desc_clean.h, registry.cpp):
- d3d12_xs_device.cpp is #984's file with main's differing pieces ported in: env_slot and the configurable device
  routes, XboxQueueSlotRoutes, PresentationHandler / set_presentation_handler, the console caller rule for device
  slots 61 and 74 (#383, #385), route_xbox_device_slot, slot 81 as GetFrameStatisticsX, create_host_device, the
  console-form rule for slots 25 and 56, the console list IID of #359, and the forms of queue slot 18 (#403) and
  list slot 139 (#396).
- Kept from #984: the list proxy with handle translation, queue slots 16/17 as Signal/Wait, the fence's
  completed-value mirror, the shared FrameTokenSource, PresentX through queue_present_x when no handler is
  attached (slot 30, or 32 on a queue detected as the newer layout), slots 27/53/55/57/70/71/133, the wider
  pc_resource_desc, S_OK for queue slots past the PC table.
- Dropped: #984's GetFrameEventsX and LEONIDA_XS_FRAME_EVENTS_SLOT, its second-word rule for slot 61, its
  undetected-layout rule for queue slot 18, its list IID mapping to GraphicsCommandList6; main's copy of the base
  list proxy, its null-view slot 70 and its refusing slot 133.

Proxy tests (runtime/test/xs_proxy_mock_test.cpp, device_proxy_test.cpp, queue_proxy_test.cpp):
- Checks of both sides, each run once; main's forms of the render-target size and layout checks with #984's extra
  cases added; main's --env-slots-74 and #984's --env-slots-70.
- Adapted to the merged code: the queue tail answers S_OK, slot 73 answers an unknown IID with the list proxy,
  the queue slot 18 case installs a console caller. Dropped: #984's slot 81 GetFrameEventsX cases.

D3D12/Vulkan layer (runtime/shims/d3d12_com.cpp, d3d12_vulkan_device.cpp, runtime/src/command_list.h,
frame_pacer.h, shader_library.h, vulkan_backend.h, vulkan_replay.h, runtime/test/command_list_test.cpp,
d3d12_close_parity_test.cpp, d3d12_execute_indirect_validation_test.cpp, replay_texture_barrier_test.cpp,
vk_pipeline_check.cpp, vk_test_device.h):
- Resource::create_texture: #984's title images (deferred placed, pending streamed, title pool) and main's
  ordinary textures (#1413 shared blocks, #1364 staging fallback) are exclusive branches chosen by the texture's
  origin, so both pools run on disjoint sets of textures.
- frame_pacer.h is main's pacer (#402) with #984's FrameTokenSource as the token counter.
- main's forms kept for ExecuteIndirect (#1066, #377), the barrier into LAYOUT_UNDEFINED (#1055), the B4G4R4A4
  stand-in, per-face stencil masks, the unaligned tile staging (#528) and the device-lost flag (#980).
- shader_library.h: main's block inflate; #984's `bulk` parameter now defaults to true so main's callers keep it.
- Dropped: #984's B8G8R8A8 stand-in for B4G4R4A4 targets, its refusal of separate stencil masks, its zero-count
  refusal in ExecuteIndirect, its wider UNDEFINED -> UNDEFINED release and the test case for it.

Other shims (runtime/shims/dstorage.cpp, file_system.cpp, gameinput.cpp, xgameruntime_offline.cpp,
runtime/test/xgameruntime_offline_test.cpp, xmem_test.cpp):
- ReadFile and DirectStorage reads: #984's pinned kernel_writes read, then main's touch_pages retry on
  ERROR_NOACCESS. main's rt::fs::read_file is folded into #984's read_file.
- gameinput: main's strict LEONIDA_INPUT_SCRIPT parser with #984's rsup/rsdown entries.
- Speech synthesis: main's one silent voice and handle checks; #984's accept-anything form dropped.

Build, tools, docs (runtime/CMakeLists.txt, runtime/cmake/translator_deps.cmake, scripts/build_runtime.ps1,
make_game.py, tools/rdna2spirv.py, shader_disasm.py, shader_ir.py, shader_library.py,
runtime/test/shaders/cs_imgload_tfe.asm, cs_imgload_d16_tfe.asm, docs/README.md, boot.md, d3d12_vulkan.md,
runtime/README.md):
- Unions of the test, target and source lists; spirv_loop_guard.py added to translator_deps.cmake.
- rdna2spirv.py: main's DPP compare rule (#957), SMEM vcc base (#647) and widen_wave64_masks (#1021); #984's
  restore_skipped_instructions and restore_dot4_inline_sel. #984's duplicate widen_wave64_valu_masks dropped.
- shader_disasm.py and shader_ir.py: main's structure with #984's one-line-per-dword llvm-mc input and wave flags.
- shader_library.py: main's structure with #984's --compute-hashes and per-state compute variants.

One file that did not conflict is changed here: tools/rdna2_decode.py. Git kept both sides' decoders for a VOPC
compare with a DPP operand, and #984's narrower one shadowed main's; it is main's file again.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-24 19:38:04 -05:00
70d615b3bb Merge main into OLD-7084, pe_inspect Linux classes (#653)
No conflicts. Brings in main's owns_dll host list with ws2_32.dll and wsock32.dll (the
ws2_offline shim), which the next commit mirrors in pe_inspect.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-24 18:34:52 -05:00
1bedab24c3 Merge pull request #1000 from Okachamie/gpu-pin-exit-status
Merging.

**Why merged:** GPU-PIN-EXIT-STATUS: in check.py and run_gpu_tests, a helper that exits non-zero is always a failure, never a subgroup-pin SKIP, so a crashing helper can't hide as a skip. KernelSmoker approved it after an RTX 3090 GPU run, and the author compared it against #125.

**Why it's good:** run_gpu_tests, shader_checks and run_gpu_tests_paths: 177 passed.

Tested on Windows 11 / RTX 4070 SUPER: merged alone onto main 0f98d193c. With it in, the repo-consistency set (cmake/translator-deps, shader_stage_resume, runtime_paths, docs, make_game, no-game-data, run_semantic_tests, ctest_registration) gives 578 passed / 5 skipped / 0 failed, and check_no_game_data on the changed files is clean. git merge-tree against current main: no conflicts. Security read of the three-dot diff: no binaries, game data, downloads, network calls or CI changes.

AI-assisted (Claude Code, Claude Opus 5.5).
2026-11-24 18:22:17 -05:00