Recompiler: load direct DXIL geometry ES inputs from the heap window #2383
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!2383
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/2383/head"
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?
@emusynths on GitHub · 2026-11-25 17:34 UTC · original
emusynths:verify_heap_windows_correctness→main· +61 −2 · 2 files · 1 commits · merged 2026-11-25 19:43 UTCFixes direct DXIL geometry-shader translation when
XCL_HEAP_WINDOWS=1is active with multiple memory windows. Part of #2088.When
HEAP_WINDOWSis set andmem_windows > 1,mem_windows()incrates/xcl/src/gpu/dxil/kernel.rsfillslw.memswith placeholderi32 0handles because all memory accesses are expected to go throughheap_raw_buffer_uav().geom_init()bypassed this and calledlw.s.raw_load(lw.mems[0], ...)to load pre-fetched ES vertex inputs (v9..v255), which failed DXIL generation (function dx.op.rawBufferLoad.i32 redeclared with another type).What is in it
crates/xcl/src/gpu/dxil/kernel.rs: lazily load the window-0 raw UAV fromResourceDescriptorHeap[MEM_HEAP_BASE]viaheap_raw_buffer_uav()ingeom_init()whenlw.heap_memisSome(coherent).crates/xcl/src/gpu/dxil/geometry_tests.rs: addgeometry_es_inputs_validate_and_run_with_heap_windows(fails before the fix; validates native + split wave64 forms and runs on the GPU after the fix).Tested
rustc 1.100.0 (0ef1bc386 2026-11-09), DXC 1.9.2609.5, debug (tests) / release (smoke).cargo test -p xcl --lib geometry_tests(rebased head25af00eon2898511): 4 passed, 0 failed, 0 ignored.cargo build --workspace && cargo test --workspace --no-fail-fast -- --test-threads=4(before rebase onto2898511): 1285 passed, 5 failed, 46 ignored.main50a9fdeon this adapter/DXC:gpu::dxil::fuzz_tests::fuzz_validate_and_gpu_0..3(CreateComputePipelineState: 0x8007000E) andgpu::recomp::lower_dxil::tests::a_bridged_mask_write_where_one_half_is_elsewhere_meets_no_barrier.SKIPPED: wave64-only GPU tests (no wave64 on RTX 5090), per-lane f16 refused tests,heap_window_out_of_memory_falls_back_to_the_switch_form(no heap windows in default run),pso_measurement_compiles_an_exact_synthetic_record(Developer Mode off).XCL_HEAP_WINDOWS=1 cargo test -p xcl --test gpu_compute_e2e -- --test-threads=1: 4 passed, 0 failed, 0 ignored (includingheap_window_out_of_memory_falls_back_to_the_switch_form).Regression run
60 s release runs of the same title with a warm local DXIL cache (
XCL_NETWORK=0, default runtime flags):Not tested
f05fe12).XCL_DIRECT_DXIL=1+XCL_HEAP_WINDOWS=1geometry shaders directly (covered by the new GPU unit test).AI use
@emirduran707 on GitHub · 2026-11-25 18:00 UTC · original
Independent AMD RDNA4 (native wave64) test report on exact head
f05fe12154e1009a15c0989c7ca108496513b967(clean detached checkout, no local changes).Tested
stable-x86_64-pc-windows-msvc), DXC 1.9.2602.17; tests debug, smoke release.cargo build --workspace && cargo test --workspace --no-fail-fast -- --test-threads=4: 1287 passed, 3 failed, 46 ignored; 8 SKIPPED (6 inlower_dxil::tests::{f16,f32}_programs_on_the_gpurefused by per-lane form;heap_window_out_of_memory_falls_back_to_the_switch_form;pso_measurement_compiles_an_exact_synthetic_record). All native wave64 GPU tests ran and passed.gpu::dxil::geometry_tests::geometry_es_inputs_validate_and_run_with_heap_windows.main68a284a:gpu::dxil::fuzz_tests::fuzz_validate_and_gpu_1(seed 722) andfuzz_validate_and_gpu_3(seed 1599) on this GPU, plusgpu::recomp::lower_dxil::tests::a_bridged_mask_write_where_one_half_is_elsewhere_meets_no_barrier(from50a9fde/ #2074).Regression run (60 s retail-title smoke,
XCL_NETWORK=0, release)(Matched
main68a284abaseline on the same machine today: 1573 frames, 14420 MB peak, 0 device removals, 0 crashes.)Not tested
AI use
@DarkPanda69 on GitHub · 2026-11-25 18:02 UTC · original · edited 2026-11-25 19:04 UTC
Update for head
25af00e: same result. Paired againstmain2898511withXCL_DIRECT_DXIL=1for the wholegpu::filter: on both cards the only difference is the newgeometry_es_inputs_validate_and_run_with_heap_windows(ok). RX 9070 XT 693 passed, 2 failed (the #2115 fuzz seeds, same onmain); RTX 3060 695 passed, 0 failed.AMD native wave64 run (listed as untested), plus an RTX 3060, paired against
mainwith the direct translator on for the whole GPU suite.Head
f05fe12applied onmain68a284a, debug, Windows 11 Pro 26200,XCL_DIRECT_DXIL=1 cargo test -p xcl --lib -- gpu:: --test-threads=4, onmainand on this PR for each card:mainPer-test comparison: on both cards the only difference is the new
geometry_es_inputs_validate_and_run_with_heap_windows(ok). No existing test changes result or skip state. The failures are onmainwithout this PR:a_bridged_mask_write_where_one_half_is_elsewhere_meets_no_barrieron both (fixed by #2379) and, on the RX 9070 XT, the #2115 fuzz seeds.Not tested: a title with
XCL_DIRECT_DXIL=1andXCL_HEAP_WINDOWS=1.AI use: Claude Code (Claude Opus 5.5) ran the tests on this machine and wrote this report.
@DavidM1911 on GitHub · 2026-11-25 19:12 UTC · original
Verification on RTX 3060 Ti (Windows 11), branch merged with current
main:cargo test -p xcl --lib: 1 real failure, deterministic (also fails--test-threads=1, 1219/1):The lowered program is missing an expected group barrier (or emits one where none is expected). Needs a fix before merge.
— Devin
@pvfreis on GitHub · 2026-11-25 19:15 UTC · original
Whole-suite NVIDIA run of
25af00e196b5f5282d59fe3bcc71b10a6893a526(this PR's head, whose parent ismain2898511a, so merging changes nothing) next to thatmain. RTX 3060, one run per tree. DarkPanda69's update above covers this head'sgpu::tests withXCL_DIRECT_DXIL=1; this is the whole workspace with that switch unset. No failure thatmainlacks.geometry_testsmain2898511a25af00e1geometry_es_inputs_validate_and_run_with_heap_windows, not SKIPPED: the split form ran on the GPU (no wave64 here). Test by test, nothing else differs.presentsassertion (e2e.rs:249,presents0):CreateSwapChainForHwndreturns0x887A0022in this session.a_bridged_mask_write_where_one_half_is_elsewhere_meets_no_barrierpassed on both. Its assertion at this head is "group barriers after entry branch" (lower_dxil.rs:1156, sincec828d8c0, in this head's base); "group barriers in the program" (:1155) is the text before that commit.fuzz_validate_and_gpu_*tests passed on both.Tested
cargo build --workspace --locked --offline, thencargo test --workspace --locked --offline --no-fail-fast -- --test-threads=4, as a separate sandbox user: non-interactive session, Low integrity, NVIDIA 32-lane waves only, no display, no audio device,XCL_NETWORK=0.heap_window_out_of_memory_falls_back_to_the_switch_form(no heap windows).Not tested
XCL_HEAP_WINDOWS=1(the test sets the option itself).AI use: Claude Code. Claude Opus 5.5 ran the two jobs, compared the logs and wrote this; a second Claude Opus 5.5 checked it against the logs and the live PR; Claude Fable 5.2 reviewed the text.
@emusynths on GitHub · 2026-11-25 19:20 UTC · original
Thanks for testing! That failure was a pre-existing
maintest regression inlower_dxil.rs(untouched by this PR) fixed onmainbyc828d8c(Tests: check divergent block barriers in a_bridged_mask_write) — your1219/1count looks like the earlierf05fe12commit before our rebase (1,220 lib tests vs 1,311 on current head25af00e).Verified on current head
25af00e(rebased onto2898511):a_bridged_mask_write_where_one_half_is_elsewhere_meets_no_barrierpasses (--test-threads=1: 1 passed, 0 failed), matching @DarkPanda69's25af00erun (695 passed, 0 failed on RTX 3060).@thehollowedone on GitHub · 2026-11-25 19:35 UTC · original
Independent Windows/NVIDIA integration check of #2383 head 25af00e on main 06055a7. The local
merge --no-commit --no-ffwas clean; its tree is0e52d9f56020485a44167271cd28ecf6add3d765. No commit or PR update was made. RTX 3080 Ti (621.35), Ryzen 7 9800X3D, Windows 11 build 26300, Rust 1.99.1 MSVC, SDK DXC/DXIL 1.8.2502.11. Offline Cargo;XCL_ADAPTER=RTX 3080 Ti,XCL_NETWORK=0, no sample data.Tested
cargo test --offline --locked -p xcl --lib geometry_tests --jobs 6 -- --test-threads=1 --nocapture, withXCL_DIRECT_DXIL=1 XCL_HEAP_WINDOWS=1 XCL_D3D12_DEBUG=1: 4 passed, 0 failed, 0 ignored, 0 skipped. The new ES-input test executed on the GPU and read back the three expected vertex words from heap window 0 plus the zero beyondnv.cargo build --offline --locked --workspace --jobs 6passed. With the three overrides above unset,cargo test --offline --locked --workspace --no-fail-fast --jobs 6 -- --test-threads=4 --nocapturereported 1,414 passed, 0 failed, 46 ignored, including 26 runtime skip notices.gpu_compute_e2erun with direct DXIL, heap windows and D3D12 debug enabled reported 4 passed, 2 failed. Both offline-cache failures reproduced with the same command after building unmodified main06055a7(4 passed, 2 failed). They are not evidence of a #2383 regression under those settings.Not tested: retail smoke on this integration, AMD/Intel, or performance. The PR still needs its author's current-head regression run and rebase under the repository rules. AI-assisted. Codex (GPT-6, exact variant unavailable) ran the checks and drafted this report.
@ivall on GitHub · 2026-11-25 19:43 UTC · original
Merging: geometry shaders take their pre-fetched ES inputs from window 0 in the descriptor heap under
HEAP_WINDOWSinstead of the placeholder handle; without it the code is unchanged.Tested on AMD RDNA4 (native wave64), Windows, DXC 1.8.2502.11, debug:
main06055a7with #2333, #2097, #2368, #2408 and #2383 merged locally. Whole suite: 1422 passed, 2 failed, 46 ignored, 7 SKIPPED. WithXCL_DIRECT_DXIL=1,cargo test -p xcl --lib -- gpu:: hle::d3d12x: 952 passed, 2 failed, 24 ignored. The two failures arefuzz_validate_and_gpu_1and_3, which fail the same way onmainhere.geometry_es_inputs_validate_and_run_with_heap_windowsran on the GPU here (not skipped). Not tested: a title withXCL_DIRECT_DXIL=1andXCL_HEAP_WINDOWS=1.AI use: Claude Code (Claude Opus 5.5) read the diff and the thread, ran the tests and wrote this on the maintainer's behalf.