Repository navigation
Recompiler: skip VGPR scans without relative indexing - #1539
philip-roy-jones wants to merge 1 commit into
Conversation
|
Updated NVIDIA check for the new head Tested
Regression run (RTX 3090, clean release builds of the PR's base and head, 60 s on the same retail title, shared DXIL cache) Base PR head Frames -1.1% and peak commit +0.1%, one run each. Both trees drew only with translated pipelines (0 skipped). Not tested
AI use
|
|
Independent native-wave64 AMD check of Tested
Not tested Retail shaders, retail title runs, release builds, and translation timings. The output comparison used six synthetic programs. AI use OpenAI Codex (GPT-6 family, exact variant unavailable) wrote the temporary probe, ran the checks, and drafted this report. |
|
Verification on RTX 3060 Ti (Windows 11), branch merged with current
Thanks! |
ab24c38 to
5773e5b
Compare
Only M0-indexed vector moves and swaps need the register bound for their switch. Skip the operand scan for other programs. The regression covers all five indexed vector opcodes and a register referenced later in the program. Assisted-by: Codex (GPT-6)
5773e5b to
8845240
Compare
|
Re-verification on RTX 3060 Ti (Windows 11), new head merged with current
Thanks! — Devin |
|
Tested head
Not tested: retail title. AI-assisted (Claude Code, Claude Sonnet 5.5 ran the tests; Claude Opus 5.5 checked and posted). |
|
Independent desktop NVIDIA verification of PR #1539 at head Environment
Targeted release tests & build (
|
| Command | Result |
|---|---|
cargo test --release -p xcl --lib relative_vgpr_limit_is_only_needed_for_indexed_vector_registers -- --nocapture (3 consecutive runs) |
1 passed; 0 failed; 0 ignored; 1331 filtered out × 3 (0.00s × 3) |
cargo test --release -p xcl --lib gpu::recomp::emit:: (3 consecutive runs) |
4 passed; 0 failed; 0 ignored; 1328 filtered out × 3 (0.24s, 0.23s, 0.23s, 0 skipped) |
cargo test --release -p xcl --lib gpu::recomp:: -- --test-threads=4 (3 consecutive runs) |
399 passed; 0 failed; 20 ignored; 913 filtered out × 3 (6.40s, 6.41s, 6.65s; 376 executed on RTX 4060 + 23 expected Wave32-only/env skips) |
cargo build --release -p xcl |
Clean build (1m 07s, exit 0, 0 new warnings) |
Paired quiet 60 s retail smoke (title: 29640639)
Exact parent & merge-base (08db8020d323bf478964fcc586152cce54959cfc, cached baseline on the same machine):
xcl-smoke v1
commit: 08db8020d323bf478964fcc586152cce54959cfc
gpu: NVIDIA GeForce RTX 4060
title: 29640639
seconds: 60
exit: 0x0
frames shown: 1588 (PresentX 1588)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 14000 MB
PR #1539 (88452400fe19f2cb2a03b73ac82fb98e80cc083c):
xcl-smoke v1
commit: 88452400fe19f2cb2a03b73ac82fb98e80cc083c
gpu: NVIDIA GeForce RTX 4060
title: 29640639
seconds: 60
exit: 0x0
frames shown: 1633 (PresentX 1633)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 14011 MB
Runtime log observations (xcl.log)
9223log lines,0[ERROR]/ device-removal / panic lines.- Final draw/memory telemetry in log:
19639 draws with translated pipelines (0 skipped, 0 with PC pipelines), 1024 dispatches (0 skipped); last memory sample14011 MB committed by the process; video memory 6115 MB local, 4683 MB non-local.
Limits of coverage
- Skipping VGPR scans when no relative vector-register indexing is present was verified via
relative_vgpr_limit_is_only_needed_for_indexed_vector_registers(3/3),gpu::recomp::emit::(4/4× 3), andgpu::recomp::(376executed +23expected Wave32-only/env skips × 3 on desktop RTX 4060). - The 60 s retail smoke ran with warm shader caches on
title: 29640639and confirms zero runtime regression rather than benchmarking cold shader-recompilation time (frame-count delta vs. cached parent reflects single-run startup variance, not this PR).
AI disclosure: test execution and report drafting assisted by Google Antigravity (Gemini 4 Neon).
|
Independent test report under Wine/Proton (not native Windows) for head Setup
Tests (debug,
Retail title, 300 s (release, every run from a copy of the same warm-cache snapshot;
Not tested
AI use
|
|
Running a native Windows AMD check of head |
|
AMD RDNA3 report for #1539, head Hardware / software: AMD Radeon RX 7800 XT (RDNA3, native wave64), driver 32.0.31035.1003; Ryzen 7 5700X3D, 64 GB; Windows 11 build 26200; Rust 1.100.0 (stable-x86_64-pc-windows-msvc); tests debug, smoke release. Native Windows, no Wine, Tested
Regression run (
Head is 98.3 % of base's frames, 100.0 % of its peak commit. One run each. Not tested
AI use
🤖 Generated with Claude Code |
Part of #1269. Only vector moves and swaps indexed through M0 need the highest VGPR number used by a shader. The translator was enumerating every register operand to find it, including for the 48 of 54 sampled programs that used only fixed vector registers.
What is in it
Tested
08db8020d323bf478964fcc586152cce54959cfc. The published head is88452400fe19f2cb2a03b73ac82fb98e80cc083c.git range-diffmarks the old and new patches equivalent. Windows 11 Pro 25H2 (26200.9974), Ryzen 7 7700X, Radeon RX 580 (31.0.21925.1001), Rust 1.100.0 MSVC, DXC/validator 1.9.2609.5.cargo build --locked --workspace,cargo build --locked --release -p xclandcargo test --locked --workspace --no-runpassed on both.xcl-gpu run cargo test --locked --workspace --no-fail-fast -- --test-threads=4 --show-outputexited 101 on both revisions. The RX 580 driver (amdxc64.dll) ended the library process at0xc0000005. The remaining workspace targets ran, and the full library inventory was rerun in matching four-thread batches with the crashing case isolated. Main totaled 1,342 passed, 86 failed, 47 ignored, 1 process crash and the PR 1,342 passed, 87 failed, 47 ignored, 1 process crash. 67 distinct explicit skips are included in each pass total. Both crashed ongpu::dxil::lanes::ps_ballot_tests::gpu_direct_ps_masks_hold_helper_lanes_on_triangle_edges. The extra head failure washle::d3d12x::list_x::tests::a_dispatch_with_a_pipeline_still_building_waits_at_the_submit(407 command-list segments, expected 421). It passed in three isolated runs and three repeats of its original four-thread test group on each revision..\scripts\test.ps1 --skip test_title_runs_and_game_folder_is_untouchedsuccessfully. Main reported 1,428 passed and the PR 1,429 passed, each with 0 failed, 47 ignored, 1 filtered and 211 distinct explicit skip names. PR job · Main jobFocused RX 580 command
All 67 explicit RX 580 skip names on this main and head
Previous verification on `5773e5bb` against `50a9fdef`
5773e5bb08c3e230a9f2e4686db6ad261ed45cc9against mergedmainat50a9fdef81cb796b8756a31defb0648301d002ce. Windows 11 Pro 25H2 build 26200.9974, Ryzen 7 7700X, Radeon RX 580 (31.0.21925.1001), Rust 1.100.0 MSVC, DXC/validator 1.9.2609.5.cargo build --locked --workspace(debug) andcargo build --locked --release -p xclpassed on both.xcl-gpu run cargo test --locked -p xcl --lib -- <filters> --test-threads=1 --nocapture, the four original VGPR tests and two upstream tests (compute_globallycoherent_only_when_needed,gpu_ps_readfirstlane_loop_on_a_primitive_edge_ends) all passed on RX 580, zero skipped. Release builds emitted byte-identical HLSL for 36 fixtures covering fixed registers, all five indexed opcodes, late high reads and writes, and native wave32, native wave64 and split wave64 (1,930,662 bytes).xcl-gpu run cargo test --locked --workspace --no-fail-fast -- --test-threads=4 --show-outputreported 1,170 passed, 119 failed, 46 ignored on main and 1,171 passed, 119 failed, 46 ignored on the head. Both returned 101 with the same 119 failures and 78 distinct RX 580/runtime skips included in the pass totals. 110 failures on each revision reported device suspension (0x887A0005).xcl-gpu run .\scripts\test.ps1 --skip test_title_runs_and_game_folder_is_untouchedstopped in the library on both revisions with WARP and Windows SDK DXC 1.8.2502.11. The testgpu::recomp::lower_dxil::tests::a_bridged_mask_write_where_one_half_is_elsewhere_meets_no_barriercounted three group barriers and expected one. Main reported 1,219 passed and the head 1,220 passed, with one failure and 26 ignored on each.lower_dxil.rs:1155. PR job · Merged main jobAll 78 tests that printed SKIPPED on the RX 580 (both revisions)
Measurements and independent reports from the original PR revision
ab24c38aa5db171c10a697d5292a78852f93b18dagainstmainat9e3831e. Radeon RX 580 (31.0.21925.1001), Ryzen 7 7700X, Windows 11 Pro 26200.9974, Rust 1.100.0 MSVC and DXC 1.9.2609.5.recomp::translateon 54 retail VS/PS/CS programs (28,379 instructions, four memory windows). Median time per batch went from 86.63 to 83.84 ms (3.2% less). Each build ran 36 timed batches across four processes, after warmup. Selection used the first six distinct, translatable programs per stage in each native-code size band of 64–511, 512–4095 and 4096–16383 bytes. A separate allocator-counting build recorded 29,369 fewer allocations/reallocations per batch. All 7,571,624 HLSL bytes matched, including on the six programs using relative indexing. Six coldconsole_to_dxil_inbuilds also produced byte-identical DXIL. Timing covers RDNA2-to-HLSL translation.cargo test -p xcl --lib -- relative_vgpr_limit_is_only_needed_for_indexed_vector_registers v_swaprel_b32_uses_the_m0_relative_switch gpu_v_swaprel_b32 gpu_packed_math_dots_movrel --test-threads=1 --nocapturereported 4 passed, 0 failed, 0 ignored, 0 skipped. The new regression failed with the unconditional scan onb7aa9f3.cargo build --workspacesucceeded on both.cargo test --workspace --no-fail-fast -- --test-threads=4lost the library test process on both. Running the remaining cases completed the inventory. Main reported 754 passing, the PR 755. Both had 21 failures, 1 process crash and 41 ignored. The same 22 cases were unsuccessful, and three reported passes on each were hardware skips (two mesh, one heap windows)..\scripts\test.ps1 --skip test_title_runs_and_game_folder_is_untouchedpassed locally with WARP and Windows SDK DXC 1.8.2502.11. It reported 776 passed (215 explicit skips), 0 failed, 41 ignored and 1 filtered.ab24c38on an RTX 3090 and checked the five relative-indexing opcodes and the two uses ofmax_vgpr. Independent RTX 3090 test reportab24c38on AMD integrated graphics. Cargo reported 777 passes (one hardware skip), 0 failures and 41 ignored. All 18 native-wave64 dispatches produced the expected register values. AMD test reportmainon an RTX 3060 Ti. The library suite passed single-threaded. They saw the same intermittent parallel failure on unmodifiedmain. The report gives no merge SHA or test name. RTX 3060 Ti reportRegression run
xcl-gpu run .\scripts\smoke.ps1 -Game <retail folder> -Title Retail -Seconds 60 -Xcl .\target\release\xcl.exe -OutDir <run directory>. All 60-second runs used the source-built offline release loader, the same title and RX 580, fresh title data, no input and the HLSL path. Both arms setXCL_DXC_THREADS=1and disabled async PSOs, PSO preload, the translated-shader cache and the PSO disk cache.The first pair ran the head first from matching copies of the previous 1,044-entry DXIL cache. Main showed 448 frames at 11,057 MB peak and the head showed 14 at 10,662 MB, with 0/0 device removals and 0/0 crashes (main/head). A main-first repeat reset both arms to the same initial cache. Main showed 381 frames at 10,945 MB and the head showed 58 at 10,724 MB, with 0/0 removals and 0/0 crashes. The head fell below 80% of main’s frames in both orders from this seed. The cause of the startup delay remains open.
Both revised builds populated new cache entries during the first pair. The blocks below use two byte-verified copies of main’s resulting 1,928-entry cache. All 823 entries newly produced by both first runs matched byte for byte.
Main
PR head
Previous smoke on `50a9fdef` and `5773e5bb`, including the default-worker memory and device failures
xcl-gpu run .\scripts\smoke.ps1 -Game <retail folder> -Title Retail -Seconds 60 -Xcl .\target\release\xcl.exe. All runs used clean release builds, the RX 580, no network or input, fresh title data, and the HLSL path withXCL_ASYNC_PSO=0,XCL_PSO_PRELOAD=0,XCL_TRANSLATED_CACHE=0andXCL_PSO_DISK_CACHE=0.With the default compiler worker count and 952 identical initial DXIL cache entries, main showed 1,636 frames at 16,597 MB peak and head showed 1,651 at 22,980 MB. Both exited cleanly, but the head exceeded the 125% memory limit. All 74 new cache entries produced by both runs matched byte for byte. Repeating in reverse order from identical copies of their combined 1,044-entry cache produced the same driver error (
0x887a0020) on both revisions, at 46.6 s on the head and 59.0 s on main.The runs below started from that same 1,044-entry cache with
XCL_DXC_THREADS=1on both revisions to limit concurrent compiler work.Main
PR head
Not tested
XCL_SAMPLE_*variables were unset for the workspace suite. The retail translation timings above were measured on the original revision.AI use
gpt-6.2-astra) at maximum reasoning effort (max) to write the change and regression test, run the comparisons and prepare this PR.gpt-6.2-astra) resolved the rebase, reviewed the full diff on Philip’s behalf, ran the checks and updated the description. The dispatch did not expose its reasoning effort.gpt-6.2-astra) at maximum reasoning effort (max), rebased the existing commit after Tests: check divergent block barriers in a_bridged_mask_write #2420, reviewed the full diff on Philip’s behalf, ran the comparisons and updated the evidence.