Repository navigation
Recompiler: a DXC folder that fails to load leaves its dxil.dll unloaded (#2413) - #2467
crastinator wants to merge 1 commit into
Conversation
…ded (xcl-dev#2413) load() loads a candidate folder's dxil.dll before its dxcompiler.dll. When dxcompiler.dll did not load, or had no DxcCreateInstance, the loop went on to the next folder and left both libraries loaded. A dxil.dll kept from a failed folder is then the one the next folder's dxcompiler.dll gets when it loads dxil.dll by name, so the validator could come from the wrong DXC. The per-folder attempt is now load_candidate, which frees both on failure. The test gives it a folder with a copy of a real dxil.dll and a dxcompiler.dll that is not a library, and checks that the copy is no longer loaded afterwards; it fails without the FreeLibrary calls. Part of xcl-dev#2413 (the empty-blob half is xcl-dev#2441).
|
NVIDIA test report for Tested
Regression run ( base ( 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. |
|
|
|
Verification on RTX 3060 Ti (Windows 11), branch merged with current
Thanks! |
…#2127, xcl-dev#2476, xcl-dev#2479, xcl-dev#2467, xcl-dev#2444, xcl-dev#2447, xcl-dev#2448 Integrates compositor RT tracking fix (xcl-dev#2480), split shader cache budget (xcl-dev#2475), foreign-thread deferred release (xcl-dev#2474), Wine 4-thread DXC cap (xcl-dev#2127), DXIL feature/reload fixes (xcl-dev#2476, xcl-dev#2479), DXC loader cleanup (xcl-dev#2467), console xcl-dev#14 null ppv guard (xcl-dev#2444), root-sig flag stripping (xcl-dev#2447), and two-pass stream canonicalization (xcl-dev#2448). Assisted-by: Antigravity (Gemini 4 Neon)
bmjask
left a comment
There was a problem hiding this comment.
No confirmed code defect found: failure cleanup releases dxcompiler before the explicit dxil handle, and success behavior is unchanged. Merge evidence is insufficient: current head has no Windows Build/test, and Linux/Wine is unsupported here. Please provide a Windows run/current CI and add coverage for missing DxcCreateInstance or a later candidate that successfully loads with its own dxil.
Tested
Not tested
AI use
|
|
Two contributors checked independently and found that this PR makes the same change as #2643 (for #2413): #1607, group D125. They suggest keeping #2643. If you agree, closing this PR or joining the other one would save the maintainers a review. If the two differ in a way the checks missed, a note in #1607 helps. This is a hint from the community triage in #1607, not a maintainer decision. AI use: Claude Code (Claude Opus 5.5), posted by a script from the #1607 table. |
load()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