Commit Graph

5744 Commits

Author SHA1 Message Date
abc0bd8842 Merge pull request #758 from abnalstlll-byte/restore/old-10012-versioned-root-sig-deserializer
Merging.

**Why merged:** OLD-10012: d3d12_xs exports D3D12CreateVersionedRootSignatureDeserializer and ordinal #7, forwarding to the host with the Xbox RTS0 flags cleared on a copy (the existing copy_rts0_blob_clear_xbox_flags guard). d3d12_xs_surface.md is updated. SweatierKey verified an earlier head, and trigger337's redundant-checksum finding is fixed in this head, with a zero-hash test.

**Why it's good:** root_sig passes both plain and under validation.

Tested on Windows 11 / RTX 4070 SUPER (NVIDIA 621.24), VS 2022 + Ninja RelWithDebInfo, Vulkan SDK 1.4.363.0. Merged alone onto main 66d4f5aa3, its ctests pass both plain and with LEONIDA_VK_VALIDATION=1. Cumulative of this batch (13 PRs) on main 0b45fdc21: the repo-consistency set gives 573 passed / 5 skipped / 0 failed, compileall is clean, and full ctest is 314/316 with the same 11 skips. The only failures are main's: d3d12_depth_resolve (pre-existing) and d3d12_close_parity (the #510 regression, fixed by #1286). All d3d12_* tests under validation show 0 VUIDs. git merge-tree against current main 6261ca916: 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 16:26:57 -05:00
fed33beaf5 rdna2spirv: flush literal MAD denormals (SHADER-LITERAL-MAD-DENORM) 2026-11-24 22:16:22 +01:00
6261ca916e Merge pull request #957 from quartz-heron-58/vopc-dpp
Merging.

**Why merged:** SHADER-VOPC-DPP decodes and translates VOPC compares in DPP16/DPP8 form. `shader_disasm` gets a second llvm-mc pass that patches the word llvm-mc rejects to a `v_max_f32` stand-in, then restores the name and encoding. KernelSmoker approved it, Timon360SB ran it on Blackwell native and w64, and kawaii-shakal ran all 2,684 CS programs of the real library through it.

**Why it's good:** on the RTX 4070 SUPER, `scripts/run_gpu_tests.py --filter cs_dpp`:
- native: 9/10 pass, and `cs_dpp_w64` is skipped (no 64-wide compute subgroup on this device);
- with `LEONIDA_W64_EMULATE=1` under the Khronos validation layer: 10/10 pass, with no VUIDs;
- `cs_dpp_cmp` reads the expected `3 2 3 2 1 0 1 0`, and all 10 shaders pass spirv-val.

Own tests (dpp_compare, dpp_eager_subgroup, rdna2_decode, shader_disasm, run_gpu_tests*, docs): 207 passed, 0 skipped. The llvm-mc cases ran with a real AMDGPU llvm-mc.

Tested on Windows 11 / RTX 4070 SUPER: merged alone onto main 66d4f5aa3. With it in, the repo-consistency set gives 573 passed / 5 skipped / 0 failed, and check_no_game_data is clean. git merge-tree against current main: no conflicts. Security read of the three-dot diff: decoder and translator branches plus the tool changes above, with no binaries, downloads, network calls or CI changes. Heads-up from the PR body: this conflicts with #281 in `shader_disasm.py`, so #281 will need a rebase.

AI-assisted (Claude Code, Claude Opus 5.5).
2026-11-24 16:04:56 -05:00
ac55444709 Document radio track label keys and count matches
Describe the marker-derived keys and add a local checker that reports
title and artist coverage for a single text table. Use hand-built
fixtures to verify aggregation and path-free errors.

The translator suite reproduced two upstream baseline failures.

Co-Authored-By: Codex <codex@openai.com>
2026-11-24 22:01:47 +01:00
c8f7515e2e d3d12: supply directly indexed heaps to compute dispatches (RT-DIRECT-HEAP-COMPUTE)
Compute shaders using direct resource indexing received a zero heap
pointer. Snapshot each bound heap offset after the explicit inline root
arguments on direct and indirect dispatches, so each command retains the
bindings it had when recorded. When the explicit arguments leave no
SGPR, keep them and report the missing heap slot once.

The placement is a hypothesis with partial evidence. Of 2,959
direct-indexing compute entries, seven could be paired with recorded
layouts. All seven resource reads agree with the predicted slot. The
other 2,952 have no paired layout, and no paired sampler read
establishes the relative heap order. tools/compute_heap_layout_census.py
reproduces the count, with synthetic tests for agreement, disagreement
and missing evidence.

Built gta6rt and d3d12_compute_test with clang-cl. The Proton Vulkan
fixture passed 64 buffer reads and 64 null controls on an RTX 4070. With
the rollback switch, all 128 controls read zero. Both runs check the
recorded arguments for bundle inheritance, indirect heap rebinding and
the last inline SGPR. The synthetic SPIR-V fixture passed validation.

AI-assisted (Codex and Claude Code agents).

Co-authored-by: Plaaasma <47513553+Plaaasma@users.noreply.github.com>
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-24 15:01:43 -06:00
a7eb878251 docs: write each CTest report to a new file (DOC-DASH-CTEST-JUNIT)
With a fixed path, an aborted CTest run left the previous report in place and the dashboard recorded it again.
2026-11-24 21:52:00 +01:00
94f2773c1f Merge main into RT-XMEM-LEASE (#375)
One conflict, runtime/test/xs_proxy_mock_test.cpp, neighbours added on both
sides, both kept: the mock's `held` (this branch, slot 5 private data for the
committed-resource leases) next to main's `max_level` (FEATURE_LEVELS answer),
and this branch's five checks in main()'s list before main's
check_presentation_wiring().

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-24 15:51:38 -05:00
180824ba51 docs(tools): document public metadata export and limitations 2026-11-25 00:51:30 +04:00
66d4f5aa36 Merge pull request #1074 from Moriz82/split/rt-input-script-length
Merging.

**Why merged:** RT-INPUT-SCRIPT-LENGTH: the shim's env() reader now handles values of any length (64 characters or more used to read as unset). The PR also adds the LEONIDA_INPUT_SCRIPT keyboard-pad scheduler (`button@seconds`, 300 ms presses), documented in docs/gameinput.md. That's a second topic, but the body says so, and both parts were reviewed. sodove checked 14/14 runs across lengths, with the control failing 12/12, and kawaii-shakal's harness follow-ups were addressed.

**Why it's good:** gameinput_host, gameinput and the new gameinput_script pass; with validation, gameinput_script passes and logs "8 accepted / 11 rejected". The parsing is bounded (strtod with end-pointer and finiteness checks) and reads only its own env var.

Tested on Windows 11 / RTX 4070 SUPER (NVIDIA 621.24), VS 2022 + Ninja RelWithDebInfo, Vulkan SDK 1.4.363.0. Merged alone onto main, its ctests pass both plain and with LEONIDA_VK_VALIDATION=1. Cumulative: #517, #907, #927, #954 and #1074 merged onto main 32a5d9698 (after aslan2142's runtime merges). There the repo-consistency set gives 573 passed / 5 skipped / 0 failed, compileall is clean, and full ctest is 314/316 with the same 11 skips. The 2 failures are d3d12_depth_resolve (pre-existing) and d3d12_close_parity, which fails on plain 32a5d9698 too: a regression from #510, reported there, not from these PRs. 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 15:44:44 -05:00
cf6a451661 run_wine_session: initialize and stop the prefix with $WINE
The session script ran wineboot and wineserver from PATH while
run_wine_tests.py runs the tests with $WINE. With WINE set to Proton's or
UMU-Proton's files/bin/wine, the prefix was initialized by another Wine, or
the script stopped at 'wineboot: command not found' on a host without a
system Wine, and the exit trap stopped the wrong wineserver.

Run "$WINE" wineboot --init and stop $WINESERVER, else the wineserver next
to $WINE, else wineserver on PATH; report a missing $WINE with status 127.
2026-11-24 21:42:19 +01:00
9b8707c03d RT-DIRECT-HEAP-GRAPHICS: graphics draws supply the directly indexed heaps after their root arguments
With CBV_SRV_UAV_HEAP_DIRECTLY_INDEXED / SAMPLER_HEAP_DIRECTLY_INDEXED a console program reads the
resource heap's address in the dword after its root arguments and the sampler heap's in the next,
from s8 in VS/PS/GS and s16 in mesh shaders (DadaCap, issue #14 comment 7143020922), as #1064 does
for compute. DrawInstanced, DrawIndexedInstanced and DispatchMesh now record them at
RootArgumentLayout::graphics_arguments_end; a mesh shader reads the same push dwords through the
#974 window. Nothing is written for a signature with parameters in the argument block or under
LEONIDA_GRAPHICS_ROOT_LAYOUT=pc (no slot is measured there); LEONIDA_GRAPHICS_DIRECT_HEAPS=0 restores
the previous arguments. d3d12_mesh_test checks a vertex and a mesh draw, a rebind, a signature ending
at s30 and a spilled one.
2026-11-24 21:38:59 +01:00
f35d045cc2 Merge pull request #848 from Taffyyy-ops/docs/restore-exe-fail-fast
docs: restore exe_fail_fast.md for current main and extend import_fail_fast tests (DOC-EXE-FAIL-FAST)
2026-11-24 21:31:54 +01:00
32a5d96980 Merge pull request #821 from Taffyyy-ops/fix/vk-pipeline-cache-seed
vk_pipeline_check: match runtime device features and restore pipeline_cache_seed test (RT-PIPELINE-CACHE-SEED)
2026-11-24 21:31:43 +01:00
39bd93a769 Merge pull request #878 from kawaii-shakal/d3d-stencil-face-masks
d3d12: separate front and back stencil masks (D3D-STENCIL-FACE-MASKS)
2026-11-24 21:31:32 +01:00
dbc43270f8 Merge pull request #947 from ubiquitarianism/claude/bl1-tls-index0
BL-1: tests and docs for the /GA index-0 TLS stop that main already clears (no loader change)
2026-11-24 21:30:59 +01:00
531aa4f54b Merge pull request #913 from kawaii-shakal/bl2-feature-level
d3d12_xs: ask the host D3D12CreateDevice for feature level 11_0 (BL-2)
2026-11-24 21:30:48 +01:00
7430be3869 GPU-RX9070XT-REFRESH: RX 9070 XT record on 58be9cd, build.py and check.py measured for the first time
AMD proprietary 26.11.2 (LLPC), Windows 11. run_gpu_tests.py 236/252 pass, 16 skipped, 0 failed, native
and with LEONIDA_W64_EMULATE=1 (261 shaders translated and spirv-val clean). build.py exits 0 and
check.py passes 219 of 222 with 3 mesh fixtures skipped, both ways. ms_wave_info_s3, which the
2026-11-23 record had failing on every native run, passes with 4096/4096 exact pixels in the full
runs and in 3 of 3 isolated reruns each way.
2026-11-24 21:29:36 +01:00
7a5270a1b4 anim_glb: bind weighted bones outside the skeleton as extra rest-pose joints
A clothing part whose weighted cloth or accessory bones are not in the master skeleton was refused whole. Each such hash now becomes a joint bone_0x<hash> under the skeleton root with identity local transform and the root's inverse bind, so the rest pose is unchanged; clips can still drive it.
2026-11-24 21:29:07 +01:00
bfe8d5c4d8 Merge commit 'refs/pull/1064/head' of https://github.com/ubiquitarianism/leonida into feat/direct-heap-graphics 2026-11-24 21:16:09 +01:00
f41c931602 docs: drop the sections a merge duplicated in three pages
animation.md repeated the whole `MoVE` state-machine section, gbuffer.md
repeated the `OSG1` census table and section 2 (leaving a `## 3` heading whose
body began mid-sentence), and testing.md repeated the 128-byte push-constant
section back to back after a list item. The copy dropped in each page is the
older one: the surviving `MoVE` text adds "747 child states total" and the
surviving `### Arithmetic` text carries the 256-of-256 / 2-of-256 round trip.

🤖 Generated with Codebuff
Co-Authored-By: Codebuff <noreply@codebuff.com>
2026-11-24 21:14:16 +01:00
bc245e5046 Merge remote-tracking branch 'origin/main' into vcc-tuple-resync
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-24 21:09:02 +01:00
30450e0e96 Merge #596's head (091cd9680); restore_vcc_tuples decodes for the shader's wave size
#596 walks only reachable offsets. The resync after a restored tuple now runs inside that walk, follows swallowed
branches, and drops the rest of a run when a branch targets an instruction's interior. decode_bytes gets the
program's wave size, so a swallowed VOP3 compare writes an SGPR pair in wave64 (reported on #674).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-24 21:09:01 +01:00
ea0b6bbe40 docs: restore exe_fail_fast.md for current main and extend import_fail_fast tests (DOC-EXE-FAIL-FAST) 2026-11-24 21:07:39 +01:00
e2c13db54a vulkan_replay: sRGB render-target clears are encoded in the layer, as WARP encodes them (D3D-CLEAR-SRGB-ENCODE)
ClearRenderTargetView on R8G8B8A8_UNORM_SRGB and B8G8R8A8_UNORM_SRGB handed the linear float to
vkCmdClearColorImage or vkCmdClearAttachments and the GPU encoded it. D3D permits FLOAT -> SRGB 0.6 of a step of
tolerance and each implementation puts the steps between two codes somewhere else, so the byte depended on the GPU:
against WARP, d3d12_clear_formats differed in 10 clears and d3d12_srgb_uav in 2 on an Intel Iris Xe (0.5 is bb
there and bc on WARP), and an RTX 4060 passed because the five colours miss the values it encodes differently (3 648
of 60 000 random ones; the Iris Xe 6 649, never more than one code).

render_target_clear_color now encodes the colour channels itself (srgb8_from_linear) the way WARP was measured to:
the value to 12 bits with x * 4095 in single precision rounded half up, then the nearest code of the sRGB curve. All
255 floats at which WARP's byte changes are the ones this gives, and 84 582 further values agree. Vulkan gets the
linear value of that code (srgb8_linear), which both GPUs store as that code for all 256. Alpha is unchanged.

A GPU's own D3D12 driver encodes as its Vulkan driver does, so the layer now differs from that driver where it
differs from WARP, as it does for UNORM ties and D24. d3d12_state_sweep_test compares with that driver and cleared
its sRGB targets to 0.2, 0.4 and 0.6 (0.2 is 124 on WARP, 123 on the Iris Xe); it now starts them from the values of
codes 124, 170 and 203.

clear_color_test pins 38 values to WARP's bytes, the round trip of every code and the result under each rounding
mode. d3d12_clear_formats_test clears the sRGB formats to the value of every code and of every place halfway
between two codes as well: 178 of 352 cases differed from WARP on the Iris Xe and 170 on the RTX 4060 before, none
after.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-24 20:37:02 +01:00
04d43e620f gpu-test-results: RTX 3080 10 GB (Ampere, 580.178.04, Ubuntu 26.04) — 257 translated, 197/248 native + 229/248 emulated, 2 known #31 failures 2026-11-24 13:32:38 -06:00
16ac8f3041 docs(audio_hal_exe_calls): fill the argument gaps the page left open (AUDIO-IMPORT-CALL-SHAPES) 2026-11-24 16:30:32 -03:00
d69a50c240 Keep prop counts stable at matrix and buffer boundaries 2026-11-25 00:23:28 +05:00
a8ed98c231 d3d12: report copy queue timestamp support from Vulkan queue capabilities 2026-11-25 00:17:38 +05:00
f6691db3e2 perf: read grass and prop instance lists in bulk in instance_lists
(cherry picked from commit 24ac126846)
2026-11-25 00:15:35 +05:00
e7aca7e293 tools: compare JUnit runs with private aggregate triage (JUNIT-TRIAGE) 2026-11-24 20:14:38 +01:00
7c47fd946b d3d12: supply directly indexed heaps to compute dispatches (RT-DIRECT-HEAP-COMPUTE)
Compute shaders using direct resource indexing received a zero heap
pointer. Snapshot each bound heap offset after the explicit inline root
arguments on direct and indirect dispatches, so each command retains the
bindings it had when recorded. When the explicit arguments leave no
SGPR, keep them and report the missing heap slot once.

The placement is a hypothesis with partial evidence. Of 2,959
direct-indexing compute entries, seven could be paired with recorded
layouts. All seven resource reads agree with the predicted slot. The
other 2,952 have no paired layout, and no paired sampler read
establishes the relative heap order. tools/compute_heap_layout_census.py
reproduces the count, with synthetic tests for agreement, disagreement
and missing evidence.

Built gta6rt and d3d12_compute_test with clang-cl. The Proton Vulkan
fixture passed 64 buffer reads and 64 null controls on an RTX 4070. With
the rollback switch, all 128 controls read zero. Both runs check the
recorded arguments for bundle inheritance, indirect heap rebinding and
the last inline SGPR. The synthetic SPIR-V fixture passed validation.

AI-assisted (Codex and Claude Code agents).

Co-authored-by: Plaaasma <47513553+Plaaasma@users.noreply.github.com>
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-24 13:13:09 -06:00
75cf835c3d docs(d3d12_vulkan): what the title does with GetDescriptorHandleIncrementSize
Measured the executable's indirect calls through device slot 15
(offset 0x78): 943 sites, 10 of which reach the device global; all five
D3D12_DESCRIPTOR_HEAP_TYPE values are passed and sizes, divisions and
GPU handle strides are derived from the return. Records the table and
the consequence for the layer: return the host increment, not a
constant. Keeps the numeric console values Open.

D3D12-DESCRIPTOR-INCREMENTS
2026-11-24 16:11:26 -03:00
7ede77471a docs: re-measure the RX 6600 record at 6293c1c4f and add ctest
run_gpu_tests.py: 235/252 passed, 17 skipped, no failures, native and
with LEONIDA_W64_EMULATE=1; the two imgload tfe fixtures pass since #892.
ctest: 292 passed, 12 skipped, 4 failed.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-24 22:11:03 +03:00
f9ba70b4de gameinput: keyboard pad input scripts of any length (RT-INPUT-SCRIPT-LENGTH)
Main had no keyboard pad script scheduler. Add timed button presses with
a full-length environment reader so entries beyond byte 63 reach the pad.
Combine scheduled and physical presses. Reject malformed entries and
report their count when the script is read on the first pad update.

Build gta6rt and gameinput_test. Exercise a long script, rejected items,
focus loss, configuration reload and release under Wine. Restore only the
old environment reader to reproduce the missing presses.

Co-authored-by: Plaaasma <47513553+Plaaasma@users.noreply.github.com>


AI-assisted (Codex and Claude Code agents).

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-24 12:57:22 -06:00
00fc23b9a9 D3D-448-GRAPHICS: a graphics signature past the console window keeps its inline part; the rest goes to the argument block
On the console the parameter that does not fit and every one after it go to the argument block behind
s[0:1], the ones before stay inline. No VS, PS or GS of 1.0.2.1 reads s[0:1] as an address
(root_spill_census), so the graphics bind point now lays the inline part out from s8 and stores nothing
for the rest (rt::rootsig::Spill::block), instead of giving the whole signature the PC layout. A write
to such a parameter is dropped before kNoSgpr plus an offset could wrap to dword 0. The retail start-up
signatures (25 and 30 dwords, every parameter visible to every stage, #974 review) are the case; the
per-visibility log line is gone, LEONIDA_GRAPHICS_ROOT_LAYOUT=pc stays. Compute still refuses a spill.
2026-11-24 19:53:18 +01:00
c640232b8b tools/awc_opus: honor empty chunk budgets in streamed music
Carry the full deficit across an empty budgeted block and preserve overlap state across empty blocks without a budget. Read packet payloads through views for metadata-only scans, and stop measuring packet durations at the declared budget.

Cover both empty-block cases and the packet-copy and duration-scan regressions.

Co-authored-by: OpenAI Codex <codex@openai.com>
2026-11-24 12:52:53 -06:00
370e52b8cb Merge branch 'main' of https://github.com/ubiquitarianism/leonida into xapu-connect-layouts 2026-11-24 19:45:45 +01:00
8c1b8da152 Merge main into d3d12/barrier-into-undefined
main gained its own Part K in vk_command_replay_test and a sentence in the
same bullet of docs/d3d12_vulkan.md (D3D-838, pull request 751). Both stay as
they are on main; this branch's release test becomes Part L, and the doc
bullet for LayoutAfter = UNDEFINED names it so.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-24 12:45:05 -06:00
a0d23ff85b docs: GPU-test record for AMD Radeon RX 6600 (GPU-RX6600)
Add gpu-test-results/RX6600.txt and its row in docs/gpu_test_results.md:
run_gpu_tests.py on the AMD proprietary Windows driver 26.11.2, native
and with LEONIDA_W64_EMULATE=1, measured at 8f05e09e2.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-24 21:42:58 +03:00
cec2c7074c tests: GPU readback for 38 scalar ALU ops on run-time operands (GPU-SALU-EXT)
No fixture in runtime/test/shaders ran s_sub_i32, s_andn2_b32, s_orn2_b32, s_xor_b32, s_ashr_i32, s_mul_hi_u32,
s_lshl3_add_u32, s_lshl4_add_u32, s_pack_ll_b32_b16, s_pack_hh_b32_b16, s_abs_i32, s_bcnt0_i32_b32, s_bitset0_b32,
s_bitset1_b32, s_brev_b32, s_flbit_i32, s_flbit_i32_b32, s_sext_i32_i8, the six s_cmp_*_i32, s_cmp_gt_u32,
s_cmp_le_u32, s_bitcmp0_b32, s_bitcmp1_b32, s_addk_i32, s_mulk_i32, s_cmovk_i32, s_ashr_i64, s_lshl_b64, s_lshr_b64,
s_bcnt0_i32_b64, s_bitset0_b64, s_cmov_b64 or s_ff0_i32_b64.

cs_w32_salu_ext gets sixteen operand words in s4..s19 from VKC_SGPRS, so each op reaches the driver as SPIR-V and
is not folded by the translator as an op on literals is. One thread stores every destination and four words of SCC
bits: SCC after each op that writes it, run on operands that set it and on operands that clear it, each compare
both ways, and SCC after each op that must keep it, set to 1 and to 0 in turn before them.

The 73 expected words are literals in check.py, derived in the fixture's header. tests/test_gpu_salu_ext.py
recomputes them from the fixture's own instruction lines with the reference of tools/salu_diff.py, checks that
every op that writes SCC is seen with both values, and checks the readback and both runners' verdicts.

The fixture is the first in the folder with bit 15 set in the immediate of a signed SOPK op (s_addk_i32 s52,
0x8000). tools/rdna2_decode.py gives that immediate sign-extended and llvm-mc 23.1.4 prints the same word as
0x8000, so test_parity_with_llvm_mc_on_shader_fixtures failed on it. That test now compares the immediates of the
ten signed SOPK ops as the 16 bits they are, as it already does for SOPP branch offsets, and a hand-encoded test
pins which of the sixteen ops the decoder sign-extends.

No translator, decoder or runtime change.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-24 12:40:29 -06:00
9ca049ebc3 Merge pull request #751 from abnalstlll-byte/restore/old-10048-sync-copy-clear-stage
Merging.

**Why merged:** OLD-10048: SYNC_COPY maps to COPY|CLEAR, so WriteBufferImmediate (vkCmdUpdateBuffer) and the query zero-fill are ordered before later copies. moffington reproduced the read-after-write hazard on the base, and Timon360SB and SweatierKey checked it independently. Part K of vk_command_replay_test covers it.

**Why it's good:** vk_command_replay, d3d12_state_map and replay_query_edges pass both plain and under validation.

Tested on Windows 11 / RTX 4070 SUPER (NVIDIA 621.24), VS 2022 + Ninja RelWithDebInfo, Vulkan SDK 1.4.363.0. Merged alone onto main 32950551e, its ctests pass both plain and with LEONIDA_VK_VALIDATION=1. Cumulative: #516, #535, #751, #935 and #662 merged onto main 955d9be34. There the repo-consistency set gives 571 passed / 5 skipped / 0 failed, compileall is clean, and full ctest is 307/309. The 2 failures are the same pre-existing ones as main (d3d12_execute_indirect_validation, d3d12_depth_resolve), with the same 11 skips. git merge-tree against current main 71f99e224: no conflicts, and none of these touch the files #891/#882 changed. 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 13:38:42 -05:00
3f20394739 Merge pull request #516 from sodove/fix/d3d12-clear-depth-range
Merging.

**Why merged:** D3D-CLEAR-DEPTH-RANGE: enables VK_EXT_depth_range_unrestricted where the device has it, so depth clears outside [0,1] (and NaN) behave like D3D12 instead of being clamped. Without the extension it keeps clamping, and NaN becomes 0. Four independent passes; on AMD (660M, 7900 XTX), d3d12_clear still fails only on the NaN rows, which is the driver issue tracked in #307, not this PR.

**Why it's good:** On the 4070 SUPER with validation on, main's d3d12_clear_test exits 1 with 4x VUID-VkClearDepthStencilValue-depth-00022. With this PR it exits 0 with no VUIDs, and the 1.5 / -0.5 / NaN clears match WARP. The new d3d12_clear_restricted_depth passes, and so do d3d12_clear and d3d12_clear_formats.

Tested on Windows 11 / RTX 4070 SUPER (NVIDIA 621.24), VS 2022 + Ninja RelWithDebInfo, Vulkan SDK 1.4.363.0. Merged alone onto main 32950551e, its ctests pass both plain and with LEONIDA_VK_VALIDATION=1. Cumulative: #516, #535, #751, #935 and #662 merged onto main 955d9be34. There the repo-consistency set gives 571 passed / 5 skipped / 0 failed, compileall is clean, and full ctest is 307/309. The 2 failures are the same pre-existing ones as main (d3d12_execute_indirect_validation, d3d12_depth_resolve), with the same 11 skips. git merge-tree against current main 71f99e224: no conflicts, and none of these touch the files #891/#882 changed. 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 13:38:18 -05:00
6f9ee9a815 FramePacer: BL-6 statistics count a frame the bounded queue replaces
The pacing statistics are recorded at PresentX, before the frame is queued, so a frame replaced in a full queue
(never shown) still counts as a present with its real present-to-present interval; the replacement adds and removes
no interval. frame_pacer_test pins that at latency 1: four presents, two replaced, three intervals with known
nearest-rank percentiles and mean, two origin-to-present latencies (the replaced token included), and the shown
frames keep their vblanks. docs/d3d12_vulkan.md says the intervals are between PresentX calls, not frames shown.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-24 13:32:17 -05:00
d5304a83b4 Merge upstream main into frame-pacer-bounded-queue (after #891, BL-6)
# Conflicts:
#	runtime/src/frame_pacer.h

Both branches added a private helper in the same place: queue_flip_locked (the bounded queue) and
record_present_timing_locked (BL-6 pacing statistics). Both are kept; note_untokened_present records its timing
first and then queues through queue_flip_locked.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-24 13:28:54 -05:00
71f99e2244 Merge pull request #882 from quartz-heron-58/bl5-corpus-count
fssm_unpack: count containers and programs apart, per stage (BL-5)
2026-11-24 19:24:26 +01:00
3ba069ebea Merge pull request #891 from SweatierKey/feat/bl6-frame-pacing-drift
runtime: frame pacing drift and latency percentile reporting (BL-6)
2026-11-24 19:24:15 +01:00
9c6cbbcf12 runtime: xapu.dll as a command queue with the console's layouts, audio silent
xapu.dll moves out of xapu_chad.cpp into xapu.cpp; chad.dll is unchanged.

The signatures, structure layouts, command kinds, option bits and error
codes come from Marvisak/VIctory (GPL-3.0-or-later,
crates/victory-hle/src/modules/apu.rs at ffe310e), which runs the retail
executable through these calls. Only facts are used, no code
(docs/related_projects.md). They settle what the old header left open:
XApuConnect's first argument is an input (processing kind, streams,
commands per stream, memory bytes, frames per output, options), and the
dword the title reads at +0x34 of a result is its output byte count.

- XApuConnect validates the input, allocates the memory the title asks
  for (zeroed) and, with option 0x8, an auto-reset result event; any
  processing kind but Opus decoding is E_NOTIMPL.
- Each accepted command gives one result in command order, with the
  console's error codes; an unknown kind, a stream out of range or a full
  stream is refused with no result.
- A process result carries the frame count of the Opus packet's TOC byte
  (RFC 6716, section 3.1), clipped from first_frame, to frame_count and to
  the output, and zeros in the output. Nothing is decoded.
- xapu_chad_test covers result order, the full queue, the error codes,
  frame counts, silence and the event.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-24 19:22:58 +01:00
ddcffa634e runtime: order consecutive buffer copies on the same queue (RT-STREAM-TRANSFER-BARRIER)
Vulkan transfer writes can overlap a later read or write when D3D12 submits
plain buffer copies in sequence.

Emit the transfer memory dependency from natterman12's #354 (GPL-3.0) before
every plain buffer copy. Allow an explicit rollback for comparison, and
record the access masks in the synthetic replay fixture.

The base failed both copy-ordering assertions. The child passed both replay
fixtures, and the rollback control observed no ordering barrier.


AI-assisted (Codex and Claude Code agents).

Co-authored-by: Plaaasma <47513553+Plaaasma@users.noreply.github.com>
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-24 12:20:51 -06:00
955d9be340 Merge pull request #533 from sodove/test/pipeline-library-own-format
Tests: separate pipeline library blob validation from host parity (TEST-PIPELINE-LIBRARY-OWN-FORMAT)
2026-11-24 19:20:43 +01:00
48d5a1d42a Ignore rpf9-explorer's index cache when it lands in the checkout
rpf9dump models and rpf9dump textures save a full-scan index through
RecoveryIndexCache in third_party/rpf9-explorer. On Linux, when the local
application-data folder does not exist, .NET returns an empty path for it
and the index is written to RpfPreview/Indexes under the current directory.
The index holds the archive's full path and the names of its recovered
entries, so from the repository root it is untracked game data.

Ignore RpfPreview/ and say in docs/design.md where the index goes.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-24 12:14:04 -06:00