Recompiler: DXC gets the code without indentation and comment lines; … #1572
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1582"
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?
Imported from ivall/xcl. Originally posted by gbuyssens on 2026-11-24T17:55:06Z.
…the -O level counts code
A translated program's HLSL is 30.7 % leading indentation and 25.0 %
// pc: instructioncomment lines (measured over a retail pack's 2 689 compute programs in #1269), andcompile_herechose -O0 above 8 MB and -O1 above 1 MB of that text: a 9.9 MB program with 4.4 MB of code was compiled at -O0, its DXIL 0.95x the source instead of 0.28x, and the driver did not finish it.DXC now gets the text without the indentation and with the comment lines emptied (not removed: its line numbers still match the dumped HLSL), and the -O level is chosen on that text. The DXIL cache stays keyed on the full text, so nothing cached is built again. XCL_DXC_STRIP=0 turns it off, for A/B measurements. Test: dxc_gets_the_code_without_indentation_and_comment_lines.
What is in it
Tested
cargo test --workspace -- --test-threads=4: N passed, N failed, N ignored (SKIPPED GPU tests: …)Regression run
main:
PR:
Not tested
AI use
Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-24T20:02:50Z.
Verification on RTX 3060 Ti (Windows 11), branch merged with current
main:cargo test -p xcl --lib: all passed, 0 failed, ~22 ignored. (Intermittent single-test flake under parallel scheduling; clean on single-threaded rerun — same flake seen on unmodifiedmain.)Thanks!
Pull request closed