Recompiler: a DXC folder that fails to load leaves its dxil.dll unloaded (#2413) #2467
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!2467
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-2467"
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?
@crastinator on GitHub · 2026-11-25 19:34 UTC · original
crastinator:dxc-free-failed-candidate-2413→main· +54 −26 · 1 files · 1 commits · openload()loads a candidate folder'sdxil.dllbefore itsdxcompiler.dll. Whendxcompiler.dlldid not load, or had noDxcCreateInstance, the loop went on to the next folder and left both libraries loaded. Adxil.dllkept from a failed folder is then the one the next folder'sdxcompiler.dllgets when it loadsdxil.dllby name, so the validator could come from the wrong DXC.Part of #2413 (the empty-blob half is #2441; the two touch different functions of
dxc.rs).What is in it
crates/xcl/src/gpu/recomp/dxc.rs: the per-folder attempt moves intoload_candidate, which freesdxcompiler.dllanddxil.dllwhen the folder gives noDxcCreateInstance. The success path is unchanged. A unit test gives it a folder with a copy of a realdxil.dlland adxcompiler.dllthat is not a library, and checks that the copy is no longer loaded afterwards. It fails without theFreeLibrarycalls ("the failed folder's dxil.dll is still loaded"), and skips withno DXCwhen there is no DXC to copy from.Tested
53aac418); cross-built forx86_64-pc-windows-msvc, Rust stable, DXC 1.9.2609.5.cargo test -p xcl --lib -- recomp::dxc: 17 passed, 0 failed, 0 ignored; with the twoFreeLibrarycalls removed, the new test fails (16 passed, 1 failed).cargo test -p xcl --lib -- --test-threads=1and every integration test), merged ontomain06055a7and compared per test with the same run of thatmain: 1394 passed, 17 failed, 46 ignored (main: 1393 / 17 / 46; the extra pass is the new test). The 17 failures all fail onmaintoo.tests/d3d12_create_placed_resource.rsstops without a result line on bothmainand this PR under Wine.uploads_start_from_each_subresources_state(no D3D12 debug layer under Wine).Regression run
The blocks come from #257's
scripts/linux/smoke.sh(thesmoke.ps1block under Wine; itstitle:line hashed assmoke.ps1does),XCL_COHERENT_MB=512for both.main:
this PR:
Not tested
dxcompiler.dllloads but has noDxcCreateInstance(the second failure branch): it frees the same two handles, but the test only covers adxcompiler.dllthat does not load.LoadLibraryWof a seconddxil.dllwhile one is already loaded may behave differently from Wine; the test's check holds either way.AI use
@frenziedcoder on GitHub · 2026-11-25 19:40 UTC · original
NVIDIA test report for
eaecb86: no new test failures (the 4 that fail also fail on2898511), its own testa_folder_whose_dxcompiler_does_not_load_leaves_its_dxil_unloadedpasses, and a clean smoke pair on the retail title (1650 vs 1671 frames). Native Windows, so the test's check thatFreeLibraryreally unloads the failed folder'sdxil.dllholds outside Wine too (it ran here, nono DXCskip; it copies the Windows SDK'sdxil.dll).Tested
stable-x86_64-pc-windows-msvc, DXC 1.8.2502.11 (SDK 10.0.26100.0). Exact headeaecb86dc7315fb52c11cffaaf8c2ec13dca129c, no local changes.cargo build --workspace && cargo test --workspace --no-fail-fast -- --test-threads=4(debug): 1360 passed, 4 failed, 46 ignored; the PR's own testa_folder_whose_dxcompiler_does_not_load_leaves_its_dxil_unloadedpasses. SKIPPED:gpu::dxil::kernel::dispatch_chain_native_wave64_builds_whole(no wave64),gpu::recomp::lower::tests::a_2d_or_3d_group_agrees_with_the_hlsl_path_on_the_gpu(no wave64),gpu::recomp::lower::tests::coalesced_guarded_runs_agree_with_the_hlsl_path_on_the_gpu(no wave64),gpu::recomp::lower::tests::cross_lane_reads_agree_with_the_hlsl_path_on_the_gpu(no wave64),gpu::recomp::lower::tests::the_wave64_lowering_agrees_with_the_hlsl_path_on_the_gpu(no wave64),gpu::recomp::lower_dxil::tests::a_per_lane_2d_or_3d_group_runs_on_the_gpu(no wave64),gpu::recomp::lower_dxil::tests::const_and_null_mask_operands_agree_with_hlsl_on_the_gpu(const_mask, wave64: no wave64),gpu::recomp::lower_dxil::tests::f16_programs_on_the_gpu(f16 arithmetic, wave32, per-lane form: refused (unsupported V_MUL_F16 (its #1426 semantics differ from the console's))),gpu::recomp::lower_dxil::tests::f16_programs_on_the_gpu(f16 arithmetic, wave64: no wave64),gpu::recomp::lower_dxil::tests::f16_programs_on_the_gpu(f16 packed, wave32, per-lane form: refused (unsupported V_PK_MUL_F16: VOP3 modifiers (its #1426 semantics differ from the console's))),gpu::recomp::lower_dxil::tests::f16_programs_on_the_gpu(f16 packed, wave64: no wave64),gpu::recomp::lower_dxil::tests::f32_programs_on_the_gpu(f32 arithmetic, wave64: no wave64),gpu::recomp::lower_dxil::tests::f32_programs_on_the_gpu(f32 compares, wave64: no wave64),gpu::recomp::lower_dxil::tests::f32_programs_on_the_gpu(f32 conversions, wave32, per-lane form: refused (unsupported V_CVT_F16_F32 (its #1426 semantics differ from the console's))),gpu::recomp::lower_dxil::tests::f32_programs_on_the_gpu(f32 conversions, wave64: no wave64),gpu::recomp::lower_dxil::tests::f32_programs_on_the_gpu(f32 rounding, wave64: no wave64),gpu::recomp::lower_dxil::tests::f32_programs_on_the_gpu(f32 three-source, wave64: no wave64),gpu::recomp::lower_dxil::tests::f32_programs_on_the_gpu(f32 transcendentals, wave64: no wave64),gpu::recomp::lower_dxil::tests::f64_programs_on_the_gpu(f64, wave64: no wave64),gpu::recomp::lower_dxil::tests::integer_programs_on_the_gpu(integer arithmetic, wave64: no wave64),gpu::recomp::lower_dxil::tests::integer_programs_on_the_gpu(integer carries, wave64: no wave64),gpu::recomp::lower_dxil::tests::mask_ff0_and_flbit_agree_with_hlsl_on_the_gpu(mask_ff0_flbit, wave64: no wave64),gpu_geometry_wave32_prefix_count_over_a_mask(no wave64),gpu_wave32_program_in_wave64_hardware(no wave64),heap_window_out_of_memory_falls_back_to_the_switch_form(no heap windows),uploads_start_from_each_subresources_state(no D3D12 debug layer (The application requested an operation that depends on an SDK component that is missing or mismatched. (0x887A002D))).fuzz_validate_and_gpu_0,fuzz_validate_and_gpu_1,fuzz_validate_and_gpu_2,fuzz_validate_and_gpu_3ingpu::dxil::fuzz_tests. They fail the same way on the base2898511here (0x8007000EfromCreateComputePipelineStateon seeds 70, 545, 1019 and 1507, the NVIDIA refusal @PHeitor1 reported on #1679), so this PR adds no failure.Regression run (
scripts/smoke.ps1 -Seconds 60, release, the retail title of #505 at its start screen;XCL_PSO_PRELOAD=0for both builds, because this machine's preload list holds the program of #1307)base (
2898511, this PR's merge base withmain):this PR:
Not tested: the world load (the smoke runs stop at the start screen, so code that only runs later is not exercised there); AMD (the description covers it).
AI use: Claude Code (Claude Opus 5.5) built and ran the tests and smoke runs on my machine and wrote this report.
@SlopTart on GitHub · 2026-11-25 20:02 UTC · original
gpu_suite (cold cache): 160 passed / 4 failed, no crashes. The four are the known baseline on this lane (seed-1003 fuzz, mad/mac contraction, depth-buffer state refusal, andgpu_promoted_uav_clear_values_pass_create_committed_resource(report); none caused by this PR.Targeted run of the new
a_folder_whose_dxcompiler_does_not_load_leaves_its_dxil_unloaded: passed.@DavidM1911 on GitHub · 2026-11-25 20:21 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!
@ahmetbagci8 on GitHub · 2026-11-25 20:47 UTC · original
Tested
eaecb86dc7315fb52c11cffaaf8c2ec13dca129c32.0.16.1714), Windows 11 Pro (Build 26300), DXCv1.9.2609cargo test -j 2 -p xcl --lib dxc -- --test-threads=4:41 passed; 0 failed; 3 ignored (0.57s)Not tested
scripts/smoke.ps1(no unpacked title locally).AI use
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.