Recompiler: fix Direct DXIL live double-ext scan and movrel VGPR range #3266
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/3266"
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?
Imported from ivall/xcl. Originally posted by Foniass on 2026-11-29T02:18:34Z.
Note: the suite and smoke results below replace an earlier set that, by a test-setup mistake (shared cargo target directory), came from another PR's build. These were run with a forced rebuild of this head.
Overlaps #2037 and #2227 (movrel range / double-ext flags, both conflicting with main): this is amd-dev's version (
aac43438, raylitebull). Maintainers, keep one.Two direct DXIL fixes (#1894, #1890):
Module::uses_double_extensionslooked at every instruction ever built, so f64 ops removed by the optimizer still set theDoubleExtensionsshader flag. It now looks at the live ones (asinsts_use_typedoes).init.touchedis empty, soLw::top_vgprmissed VGPRs that a relative move can reach. It now includesmax_vgprover the whole program, andv_movrels/v_movreld/v_movrelsdmask M0 to M0[7:0] as RDNA2 does.What is in it
crates/xcl/src/gpu/dxil/module.rs,kernel.rs,lower.rs,lower_wide.rscrates/xcl/src/gpu/dxil/core_tests.rs:compute_movrel_uses_program_max_vgpr_and_masks_m0Tested
cargo test --workspace --no-fail-fast -- --test-threads=4on4a20b256: 2605 passed, 4 failed, 49 ignored. The 4 failures aregpu::dxil::fuzz_tests::fuzz_validate_and_gpu_0..3:E_OUTOFMEMORYfromCreateComputePipelineStateat seeds 70 / 545 / 1019 / 1507, the same as on main on this machine; they pass on Kalmarv's RTX 5070 Ti, so they come from this machine's driver / setup, not the code. SKIPPED GPU tests: 30, almost allno wave64.movreltest's shader stored nothing, so main's DCE removed what it checks (found by Kalmarv). It now stores the result, as in amd-dev's laterf089a9df.-StartupTimeoutSeconds 3600for the cold pipeline rebuild new DXIL needs.Regression run
main:
this PR:
Not tested
AI use
aac43438(raylitebull, from2c33f9f2, written with Antigravity (Gemini 4 Neon High)); ported without the neighbouring test offcbd0d14.🤖 Generated with Claude Code
Imported from ivall/xcl. Originally posted by Kalmarv on 2026-11-29T03:23:07Z.
merge-check
base:
fa204595a4head:
4a20b25637merge: clean onto main and with the 7-PR stack.
build: cargo build --workspace -> ok; cargo build --release -p xcl -> ok.
tests: tested in the clean 7-PR stack (#3250+#3261+#3263+#3264+#3265+#3266+#3268) on main
fa204595:cargo test --workspace --no-fail-fast -- --test-threads=4(DXC 1.9.2609.5;-p xcl --librerun skipping the 2 knownmain#3187uma_drivermixed-window testsa_refused_gpu_upload_segment_becomes_customandmixed_window_keeps_its_bytes_and_the_gpu_sees_every_segment) -> 2620 passed, 0 failed, 49 ignored (2481 lib + 139 integration, 25 SKIPPED notices; all 4fuzz_validate_and_gpu_0..3passed); failing: none.compute_movrel_uses_program_max_vgpr_and_masks_m0ran and passed. 150 sxcl-smoke(ea3b5e4d,XCL_PREPARE=0, RTX 5070 Ti) on the combined 8-PR stack:exit: 0x0,2096frames shown,0device removals,0crashes,0display System events,32049 MBpeak commit.review: none (whole diff read:
uses_double_extensionsscans reachableself.blocksinstead of deadself.insts;max_vgprscanned up front inkernel.rsandm0masked& 0xFFinlower_wide.rsforv_movrel*outsideEntry::Kernel).performance: negligible: one linear VGPR scan at translation time; no runtime frame-time or memory cost.
verdict: safe to merge
hardware / tool and model: NVIDIA GeForce RTX 5070 Ti 16 GB (wave32 only), Windows 11, DXC 1.9.2609.5 via XCL_DXC_DIR; Antigravity (Gemini 3.5 Pro) ran the merges, builds, workspace test suites, 150 s title smokes, diff reviews, and drafted this check.
Imported from ivall/xcl. Originally posted by KOLESNiii on 2026-11-29T22:39:24Z.
Review: COMMENTED
Static review of
a343eafcfor the stack in the #3041 comparison.The relative-VGPR range fix still misses registers accessed only indirectly. The range is bounded by the largest register the program names directly. A relative write to
v[0 + 7]followed by a relative read of that slot omitsv7if no instruction names it directly. This is an existing hole that remains in the measured revision and in the rebased copy under #3269. Tested loweringReview assisted by Codex (GPT-6, exact variant unavailable). No new build or GPU run for this review.