Shaders: run DXIL IR optimization pass in direct translator #1547
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!1547
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/1547/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?
@Roroca-1 on GitHub · 2026-11-24 17:29 UTC · original
Roroca-1:dxil-opt-4-enable→main· +22517 −30 · 74 files · 26 commits · closed without mergingRetired after #1426 merged. Compute and graphics shader finalization already call the optimizer, and main already advanced the translator cache version to 4. Enabling this second pass would run both optimizers. The original branch is preserved.
Turns on the DXIL IR optimization and compaction pass in
kernel::translate_on_this_threadand bumpskernel::TRANSLATOR_VERSIONto3so cached unoptimized containers are invalidated.Part of #1269.
Stacked on #1546; only the top commit belongs here.
The merged #1426 already invokes
Module::optimizeduring shader finalization and setsTRANSLATOR_VERSIONto 4. This branch conflicts withmainand its proposed version 3 predates that change.What is in it
crates/xcl/src/gpu/dxil/kernel.rs: bumpTRANSLATOR_VERSIONfrom2to3and calllw.s.optimize();after checkingexchange_errorintranslate_on_this_thread.Tested
proton-cachyos-slr) + DXVK, cross-built from Linux tox86_64-pc-windows-msvcviacargo-xwin, debug, commitf349ef0bbe60:TARGET_CFLAGS="/FIstring.h" cargo xwin build --tests -p xcl --target x86_64-pc-windows-msvc: 0 errors, 0 warningswine xcl.exe gpu::dxil::opt --nocapture --test-threads=1: 9 passed, 0 failed, 0 ignored (809 filtered out; 0SKIPPED)wine xcl.exe gpu::dxil::module::tests --nocapture: 1 passed, 0 failed, 0 ignoredwine xcl.exe gpu::dxil::bitreader_tests --test-threads=4: 3 passed, 0 failed, 0 ignoredwine xcl.exe gpu::dxil::robustness_tests --test-threads=4: 7 passed, 1 failed (translation_is_byte_identical_across_runs_and_threads:dxcompiler.dll not found), 0 ignoredwine xcl.exe gpu::dxil --test-threads=4: 32 passed, 54 failed, 2 ignored (all 54 failures solely due todxcompiler.dll not foundin Wine;SKIPPED:direct_and_hlsl_graphics_stages_link: no DXC,double_unary_legality_matches_dxil_tables)Regression run
Pending native Windows GPU workspace tests and paired
scripts/smoke.ps1runs on the same retail title and duration at cleanmainand PR head. Path coverage must be recorded with the results.Not tested
.\scripts\test.ps1workspace test suitedxcompiler.dllDXIL validation and disassembly (unavailable locally under Wine)gpu::recomptests withXCL_DIRECT_DXIL=1in debug/test mode (requiresdxcompiler.dllinkernel.rs)scripts/smoke.ps1regression run on retail game titles (marked draft until run on Windows)AI use
lw.s.optimize()andTRANSLATOR_VERSIONbump inkernel.rs, drafted this description, and ran thecargo-xwin/ Wine + RX 9070 XT tests.@DavidM1911 on GitHub · 2026-11-24 19:19 UTC · original
Verification on RTX 3060 Ti (Windows 11): merge conflict with current
main— needs a rebase before it can be tested.Pull request closed