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. |
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