Commit Graph

1249 Commits

Author SHA1 Message Date
e352ad3d37 Merge remote-tracking branch 'origin/pr/9753' 2026-11-23 17:24:50 -05:00
b055a73352 Merge remote-tracking branch 'origin/pr/9712' 2026-11-23 17:24:39 -05:00
e6b8e21d3e Merge remote-tracking branch 'origin/pr/9705' 2026-11-23 17:24:37 -05:00
d578b4806e Tests: GPU coverage for ds_wrxchg*_rtn_b64, ds_or_rtn_b64, ds_min_f32 and ds_max_rtn_f32
docs/design.md marks the 64-bit LDS exchanges not GPU-verified, and
cs_lds_atomics_ext.asm (#9494) leaves ds_or_b64 and the f32 min/max
forms out. cs_lds_xchg64_ext.asm runs one lane through
ds_wrxchg_rtn_b64 (both dwords left and the returned pair),
ds_wrxchg2_rtn_b64 at offsets 0/2 (four old and four new dwords),
ds_wrxchg2st64_rtn_b64 at offsets 1/2 (512-byte steps), ds_or_rtn_b64,
ds_min_f32 with a quiet NaN in memory and ds_max_rtn_f32 ordering -0.0
below +0.0. The eight expected words are derived in its header from
the rows. Registered in check.py and run_gpu_tests.py next to
cs_lds_b64_cmpst; the wrxchg row notes the GPU check (the min/max and
bitwise b64 rows get theirs in #9494, to keep the two PRs apart).
2026-11-23 14:09:15 -08:00
629704a775 Merge PR #9604 2026-11-23 17:09:00 -05:00
f475ea37f1 Merge PR #9581 2026-11-23 17:08:22 -05:00
84d40f32f7 Merge PR #9580 2026-11-23 17:08:21 -05:00
98d99cfca0 Merge PR #9570 2026-11-23 17:08:03 -05:00
ad6e5d6bbe gta6rt: --init/--run stop with a clear message on a host without AVX
The game runs AVX code from its TLS callbacks on, so a CPU or OS without
AVX (a QEMU qemu64 guest) died with a bare 0xC000001D. Check CPUID.1
AVX/OSXSAVE and XCR0 YMM state first, print one line and exit 4 (3 is
LEONIDA_UNIMPLEMENTED=stop). --dry-run is unchanged and
LEONIDA_SKIP_CPU_CHECK=1 skips the check.

AI-assisted.
2026-11-23 23:07:51 +01:00
196ca722bb build_runtime.ps1: the cl.exe fallback compiles every gta6rt source CMake has
xg_xs.cpp (already missing on main), acphal.cpp, xapu_chad.cpp and
d3d12_xs_pso_stream.cpp were in CMake's add_executable(gta6rt) but not in
the fallback's list. pso_stream is called from d3d12_xs_device.cpp (link
error); the others register their shims at startup, so a fallback build
would have run without them. tests/test_build_runtime_fallback.py checks it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-23 22:07:49 +00:00
e688f7df1c Merge PR #9548 2026-11-23 17:07:12 -05:00
a30edd1ad5 Merge PR #9538 2026-11-23 17:06:58 -05:00
8b8de98803 Merge PR #9529 2026-11-23 17:06:44 -05:00
a7d211723a Merge PR #9521 2026-11-23 17:06:35 -05:00
0c4b9f436d Merge PR #9520 2026-11-23 17:06:34 -05:00
1cd7eb9e7c build_runtime: the cl.exe fallback builds vk_sandbox and vk_ps_sweep (EGEN-FALLBACK-SANDBOX-SWEEP)
tools/sandbox.py starts runtime/build/vk_sandbox.exe (without it the tool ends at 'unsupported: vk_sandbox is not built'), and tools/ps_sweep.py --exe / tools/ab_control_flow.py --all-attachments start runtime/build/vk_ps_sweep.exe. CMake builds both in its Vulkan tools loop; the fallback built neither, so a fallback build had no harness for either pixel check of translated shaders.

tests/test_build_runtime_fallback.py collects the harness names every Python tool under tools/, scripts/ and runtime/test/shaders/ starts and requires the fallback to build them: vk_sandbox and vk_ps_sweep fail on 5d74c272 and pass with the two cl lines.
2026-11-23 22:59:31 +01:00
75e158bfc3 run_wine_tests: name missing required tests in the summary table
A required test the Windows build never listed fails the job, but the
--summary table only iterated the results, so the step summary showed no
row explaining the failure. Add one 'missing' row per such test, once
even when --require repeats it.
2026-11-23 16:58:21 -05:00
bef7488733 Merge #3976 into own/slot67
regen_fixtures finds its sources by marker on main, so the two ds_append
sources carry the marker instead of a SHADERS entry. ds_append and
ds_consume join wave64_emulate_opt's always-barrier ops (autogenes-sudo's
fix on #3976): under --wave64-emulate they exchange through a barrier
round, and a guarded one in a multi-wave group hit the translator's assert.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-23 21:49:07 +00:00
040f6aadce Report guest scene output directory creation failures 2026-11-23 15:38:35 -06:00
920b781090 merge_check: keep gitlink updates out of text comparison 2026-11-23 21:35:44 +00:00
2471e0487f run_wine_tests: map checkouts at the Windows drive root 2026-11-23 16:33:34 -05:00
e597d90c12 GPU test cs_w32_partial_permute: ds_permute_b32 in a partial wave32
A 20-thread group is one wave32 with lanes 20-31 never launched. A launched
lane whose source lane is missing gets 0, and a send to a missing lane is
lost. cs_w32_permute and cs_w64x_permute run full waves only. The expected
words are measured with a raw 20-thread hw_oracle kernel on gfx1036.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-23 22:32:20 +01:00
9a0a1a2d5f Preserve exact integral decimal counters in shader statistics 2026-11-23 13:30:44 -08:00
5b88d58495 merge_check: report Git blob read failures
Use the diff to identify new files and surface required blob read failures through the existing Git error exit.
2026-11-23 21:28:27 +00:00
cc01a77eac bench_wave64: add emulated-only mode (BUILD-3860) 2026-11-23 22:24:08 +01:00
3746a6ff0b feat: select semantic test files by glob pattern 2026-11-24 00:23:58 +03:00
f967225be8 runtime/shims: shim bcrypt.dll provider lifecycle and RNG with deterministic seed support
Refs: https://github.com/ItsNotRexed/Leonida/issues/9065#issuecomment-7114352737
2026-11-24 04:23:26 +07:00
9a71bb4b2a run_wine_tests: resolve a relative Wine executable before changing directories 2026-11-23 16:23:12 -05:00
c18faa47d5 run_wine_tests: give test processes EOF on stdin 2026-11-23 16:22:59 -05:00
aa2dc43f70 Test fragment color modulation through a constant buffer descriptor table 2026-11-24 05:22:56 +08:00
ced87bf258 runtime/shims: shim api-ms-win-core-com-l1-1-0..3 lifecycle and helpers
Refs: https://github.com/ItsNotRexed/Leonida/issues/9065#issuecomment-7114294575
2026-11-24 04:21:05 +07:00
ccd36246f7 runtime: acphal.dll shim with APU heap management and SHAPE context allocation (RT-5, ASSET-587)
- Resolve Stop 28 boot blocker preventing GTA 6 from launching: acphal.dll!ApuCreateHeap and AcpHalAllocateShapeContexts.
- Implement genuine APU physical memory management (ApuCreateHeap, ApuAlloc, ApuFree, ApuIsVirtualAddressValid, ApuMapApuAddress, ApuMapVirtualAddress):
  - Support cached and non-cached heap allocations with flags routing (flags=2 to non-cached, flags=1/0 to cached).
  - Genuine block tracking allowing proper memory reclamation and reuse upon ApuFree.
  - Disjoint APU 32-bit physical address space mapping with round-trip address conversions.
- Implement IAcpHal interface in AcpHalCreate:
  - Slot 0 (connect): S_OK.
  - Slot 1 (disconnect): S_OK.
  - Slot 2 (submit_command): S_OK (unblocks fatal int3 at +0x43ad94e at boot).
  - Slots 3 and 4 (pop_message, get_num_messages): return 0.
  - Slot 5 (release): releases object.
- Implement GDK SHAPE_CONTEXTS and exact layout:
  - Six context counts and arrays: SRC, EQCOMP, FILTVOL, DMA, XMA, PCM.
  - Structure alignment with xmaContextArray at offset +0x38, matching retail executable measurement (350 contexts x 64 bytes).
  - AcpHalReleaseShapeContexts releases allocated context arrays.
- Classify acphal.dll HRESULT imports in registry.cpp and update unimplemented_policy_test.cpp.
- Add acphal_test in runtime/CMakeLists.txt and python verification test tests/test_acphal_abi.py.
- Update fallback file list in scripts/build_runtime.ps1.

No game data. AI-assisted.
2026-11-23 22:19:47 +01:00
cb242d0209 run_gpu_tests: ps_heap_index is run by d3d12_heap_index_test, so skip it there
The heap-indexing pixel fixture reads the bound CBV/SRV/UAV heap's base from
its root arguments and loads through s[24:27], which vk_harness cannot give it:
it needs a D3D12 device, the layer's root arguments and the code base. Without
an OTHER_HARNESS entry the pixel fallback in the judging loop reaches its
"no checker defined" branch, so the suite reports

  FAIL  ps_heap_index  no checker defined

and exits 1 on every host, Linux included, even though the shader translates
and spirv-val accepts it. ps_heap_index.asm (runtime/test/shaders) names
d3d12_heap_index_test as its owner, as the other OTHER_HARNESS entries do.
2026-11-23 22:14:53 +01:00
a443ab5574 Tests: GPU coverage for ds_mskor, ds_and/xor_b64, ds_add_rtn_f32 and ds_inc/dec/rsub_u32
docs/design.md lists these LDS atomics as not GPU-verified: the
instructions were measured with tools/hw_oracle and the translations
CPU-checked, but the translated SPIR-V never ran on a GPU.
cs_lds_atomics_ext.asm runs one lane through ds_mskor_b32 (DATA2 bits
outside DATA ORed in), ds_mskor_rtn_b32, ds_xor_rtn_b64 then ds_and_b64
on the same element, ds_add_rtn_f32 (1.5 + 2.25), and ds_inc_rtn_u32,
ds_dec_u32 and ds_rsub_u32 at their edge cases. The eight expected
words are derived in its header from the design.md rows. The fixture
is registered in check.py and run_gpu_tests.py next to
cs_lds_b64_cmpst, and the four rows note the GPU check.
2026-11-23 13:14:04 -08:00
0e4dd78f82 tests: GPU fixture cs_imgload_d16_tfe, the d16 form of cs_imgload_tfe
Under d16 one component fills one VGPR and the tfe status follows it, so vdata is v[7:8] / v[11:12]. Same 1000 seeds and the same check as cs_imgload_d16 (vk_store_test load-d16, saturation row included). Suggested by nnonno91, who ran this companion on gfx1036 and an RTX 5090.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-23 17:45:09 -03:00
1c3e043167 Merge remote-tracking branch 'pr/8591' into own/main
# Conflicts:
#	docs/d3d12_vulkan.md
2026-11-23 20:25:18 +00:00
30173c3cfa run_gpu_tests: report cs_fmt_d16_xyz once
run_suite appended two results for cs_fmt_d16_xyz, "80/80 dumped words
exact" and "128/128 dumped words exact", from one fmt_d16_xyz_test call.
The fixture has 80 words (len(FMT_D16_XYZ_WORDS)), so the 128/128 line
was a leftover: the test printed twice and the suite counted one test
too many (241 instead of 240).
2026-11-23 20:53:27 +01:00
21016cf7ae fix(merge-check): detect duplicates across retained blank lines 2026-11-23 16:53:02 -03:00
0121666d83 check_no_game_data: catch the player's saves and world_build's LPK1 packs
docs/saves.md says never to commit or attach real saves, but a save
under another name passed the check: none of its three containers was
among the magics. Neither was the staging pack world_build.py writes,
which holds positions, normals, UVs and indices of the game's models.

- JSAV story save ("JSAV" at 0)
- ASAV save record, profile and settings ("ASAV" at 0)
- SLAYER1 packed save ("SLAYER1\0" at 0)
- LPK1 world staging pack ("LPK1" at 0, world_build.py _write_pack)

No tracked file in the repository starts with any of them.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-23 22:52:48 +03:00
97430d6cbc Register the opt-in guest scene CTest for Wine cross-builds 2026-11-23 19:52:11 +00:00
9c4c5f92a8 tests: GPU fixture cs_imgload_tfe for the tfe status VGPR on image_load (SHADER-1266)
No GPU fixture set tfe or lwe, so run_gpu_tests.py never reached the
status write a SHADER-1266 fix adds. cs_imgload_tfe is cs_imgload with
tfe on both image_loads: each status VGPR is seeded with 1000 and added
into the stored sum, so a stale status moves every texel by 2000 while a
correct one (0, every texel resident) gives cs_imgload's result, checked
by vk_store_test's unchanged load mode.

Registered next to cs_imgload in check.py and run_gpu_tests.py, and in
the two unit tests that list the vk_store_test fixtures. Red on main
until a SHADER-1266 fix lands; green with #8771's change on an RTX 4060.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-23 16:51:28 -03:00
8d460a57f9 check_no_game_data: report an unreadable file as one stderr line and exit 2, not a traceback
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-23 20:50:57 +01:00
f37693fe39 build_runtime.ps1: the cl.exe fallback links gta6rt with the same /BASE as CMake 2026-11-23 20:49:19 +01:00
717f011a00 GPU fixtures for computed writes to exec_lo / exec_hi (SHADER-1264) 2026-11-23 20:45:50 +01:00
ced3615124 local: merge #7584 (docs conflict: ours) 2026-11-23 13:34:47 -06:00
a1751a9f0e ladder-frame: build_runtime.ps1's cl.exe file list keeps its ForEach-Object tail
The #7516 merge resolution left a stray "`" fragment at the end of the $files
list and dropped its ForEach-Object tail, so PowerShell rejected the script.
Reported by ScarionWorkspace and tugasky on #7154; the parser reports 0 errors.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-23 20:16:58 +01:00
4cd82fe3fa vs_layout_census: confirm legacy non-NGG VS per PAL hardware stage; measure the 195 ES variants (#6558)
Squash-merged after diff review of PR #6558
2026-11-23 12:45:04 -06:00
8644ce10dc Merge branch 'pr7516' into ladder-frame
# Conflicts:
#	runtime/shims/d3d12_xs_device.cpp
#	scripts/build_runtime.ps1
2026-11-23 19:35:07 +01:00
68fc04b6d7 Merge remote-tracking branch 'origin/main' into ladder 2026-11-23 18:52:02 +01:00
3ae065426b BUILD-2172: check development CLI flags against each producer (#6590)
Squash-merged after diff review of PR #6590
2026-11-23 11:21:40 -06:00