Recompiler: compress batched DXIL replacement chains #2069
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
goal:world-load
good first issue
help wanted
invalid
keep-open
off-goal
question
stale
test-only
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/xcl-dev--xcl!2069
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-2069"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@ifBars on GitHub · 2026-11-25 02:46 UTC · original
ifBars:shaders/compress-replacements→main· +71 −5 · 2 files · 1 commits · openCascaded trivial phis can make
Module::replace_useswalk the same replacement tail for every operand. Resolve encountered chains once in a local map, preserving the caller's map and output. Part of #1269 and #1833. Scope and measurements plan.What is in it
gpu/dxil/module.rs: iterative path compression in a local map copy; unmapped operands still take one lookup.gpu/dxil/tests.rs: chained/shared replacements, repeated uses, metadata and caller-map preservation, checked against flattened maps and DXIL validation.Tested
scripts/test.ps1 --nocapture(workspace build andcargo test --workspace -- --test-threads=4 --nocapture): 1,155 passed, 0 failed, 46 ignored. 24 SKIPPED messages: 20 native-wave64 cases, 3 existing per-lane instruction refusals, 1 heap-window case. Main: 1,154/0/46 with the same skips.Module::replace_uses, setup/serialization excluded, alternating order: 1,024-link synthetic chain 23.85 → 0.144 ms (5 trials); 16,384 links 8,153.92 → 3.149 ms (3 trials). Flat-map control at 16,384 entries: 1.740 → 2.031 ms (9 trials), a regression from copying the map. All 36 generated bitcode pairs identical, including the 1,024-entry flat control.Regression run
Retail regression blocked. Clean main and head both fault during startup at title offset
+0xb5a5f8, reading0x68. No world-load or driver-compile improvement measured. Command on each revision:scripts/smoke.ps1 -Game <title> -Seconds 60 -Xcl <release exe>, withXCL_DIRECT_DXIL=1 XCL_PER_LANE=1, Agility SDK configured, separate fresh data/cache roots; the script disables networking. The unchanged generated blocks follow.Not tested
XCL_SAMPLE_*suite cases (variables unset).AI use
@Parakeet-Wheat on GitHub · 2026-11-25 04:18 UTC · original
NVIDIA RTX 3070 on native Windows, head
9d2758fon its basecbc296a(currentmain): the new test passes on the head and, as expected for a change that keeps the output the same, on the base too; the whole suite passes and the smoke pair is within the limits. The first independent run on this PR.Tested
610.88, 32-lane waves), Ryzen 5 5600X, 32 GB, Windows 11 26300, Rust 1.95.0stable-x86_64-pc-windows-msvc, DXC 1.8.2502.11, retail 1.0.2.1. Head9d2758f(one commit onmaincbc296a), checked out clean. Tests in the debug profile, smoke in release.cargo test -p xcl --lib replacement_chains_match_flattened_maps -- --nocapture --test-threads=1:cbc296awith only the PR'stests.rscopied in: 1 passed, 0 failed (0.14 s). It does not fail without the change, because the output is meant to be identical; it checks that the new code keeps it so (chains of 1, 32 and 1024 against the flattened maps, the caller's map unchanged, DXIL validation);9d2758f: 1 passed, 0 failed (0.02 s). One run each, so the two times are an observation, not a measurement..\scripts\test.ps1(cargo build --workspace, thencargo test --workspace -- --test-threads=4) on9d2758f: 1155 passed, 0 failed, 46 ignored, exit 0. SKIPPED, 25: 20 ×no wave64, 3 × per-lane form refused (V_CVT_F16_F32,V_PK_MUL_F16,V_MUL_F16: "its #1426 semantics differ from the console's"), 1 ×no heap windows, 1 × cannot disable the driver cache (Windows Developer Mode required).Regression run (
scripts/smoke.ps1 -Game <folder> -Seconds 60, the same title, back to back, menus, no input; unedited).maincbc296a:PR head
9d2758f:That is 94 % of
main's frames and 103 % of its peak commit. One run each; I did not repeat either, so the 6 % is within what I would expect between two runs of the same build, but I have not shown that.Not tested
no wave64skips above), the tests on game data (XCL_SAMPLE_*not set).AI use
@DavidM1911 on GitHub · 2026-11-25 05:09 UTC · original
Verification on RTX 3060 Ti (Windows 11), branch merged with current
main:cargo test -p xcl --lib: all passed, 0 failed, ~26 ignored. (Intermittent single-test flake / 0xc0000005 abort under parallel scheduling — tracked in #1978; clean on single-threaded rerun.)Thanks!
@oni-swr on GitHub · 2026-11-25 14:49 UTC · original
amd-win test report for head
9d2758fa31d482ad8a89473ca8df02d760d1ee92Setup
main06c9f5505f63f10c5ec49ef932d75b2c28177324(merge commitb0a250ba3b411b1a6f0ae2cbcfe285c3db66c1f8; it merged without conflicts). That is not the PR head itself, so the smoke block below names the merge commit.Tests
cargo build --workspacethencargo test --workspace --no-fail-fast -- --test-threads=4: 1265 passed, 1 failed, 46 ignored, 7SKIPPEDlines (f16/f32 per-lane form, no heap windows)gpu::dxil::fuzz_tests::fuzz_validate_and_gpu_1(seed 722:res[30]GPU 0x1 vs CPU 0x7fffffff). It fails the same way onmain(1264 passed, 1 failed, 46 ignored), so it is not caused by this PR.gpu::dxil::tests::replacement_chains_match_flattened_mapspasses.Regression run (60 s, same title, networking off;
mainfirst, then the merge)Exit code 0x0 on both. The full
xcl-smokeblocks are not pasted because of the merge-commit caveat above.Not tested
AI use: this run and report were done by Claude Code (Claude Sonnet 5.5).
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.