Repository navigation
Conversation
The switch was read inside translate(), so it also overrode an explicit
Options { structured: true }: three tests that assert what the
structured form generates failed whenever a developer ran the suite
with it set (as I did: 3 of 843), with output that reads like a
regression in the translator rather than a configuration switch.
Read it in Options::default() (the runtime asks for the default), where
an explicit request then wins, and have the tests that check the
structured form ask for it outright.
Assisted-by: OpenCode (Gemini 4 Neon)
fbd01e9 to
f46ebd6
Compare
|
Rebased onto e9e94ce (which merged #1321): the new oversized_structured_code_falls_back_to_pc_blocks had the same dependency on Options::default(), so it now asks for the structured form explicitly too — with XCL_RECOMP_NO_STRUCTURED=1 the suite is 843 passed; 0 failed (it was 840 passed; 3 failed before this PR), and unchanged without it. The smoke blocks were re-run on the new main with #677's title hashing. |
|
Full-suite run, since this PR has no test report yet. Tested exact head Tested
Not tested
AI use
|
|
Verification on RTX 3060 Ti (Windows 11), branch merged with current
Thanks! |
|
Tested
$run = 'L:/XclTooling/pr1810'
$env:PATH = "$env:USERPROFILE/.cargo/bin;$env:PATH"
$env:TEMP = Join-Path $run 'temp'
$env:TMP = $env:TEMP
$env:CARGO_TARGET_DIR = 'L:/XclTooling/pr1512-tiling-edges-fddfa267/target'
$env:CARGO_BUILD_JOBS = '2'
$env:CARGO_INCREMENTAL = '0'
$env:CARGO_PROFILE_DEV_DEBUG = '0'
$env:CARGO_PROFILE_TEST_DEBUG = '0'
$env:XCL_ADAPTER = 'pr1810-cpu-only-no-adapter'
$env:XCL_DXC_DIR = "$env:LOCALAPPDATA/XclTooling/dxc-1.9.2609/bin/x64"
foreach ($mode in @('absent', '1')) {
if ($mode -eq 'absent') {
Remove-Item Env:XCL_RECOMP_NO_STRUCTURED -ErrorAction SilentlyContinue
} else {
$env:XCL_RECOMP_NO_STRUCTURED = '1'
}
cargo test --locked -p xcl --lib gpu::recomp::tests::hlsl_is_generated_for_straight_line_and_branches -- --exact --nocapture
cargo test --locked -p xcl --lib gpu::recomp::tests::far_jumps_are_direct_branches -- --exact --nocapture
cargo test --locked -p xcl --lib gpu::recomp::tests::oversized_structured_code_falls_back_to_pc_blocks -- --exact --nocapture
}The initial matrix omitted the adapter selection and DXC directory settings. The far-jump fixture consequently also compiled and dispatched a shader in both modes using the Windows SDK DXC and DXIL Not tested Base revision, full suite, retail titles, smoke runs, release builds, and other adapters. The CPU matrix did not run the optional GPU tail. AI use T3 Code / Codex ( |
The
XCL_RECOMP_NO_STRUCTURED=1debug switch was read insidetranslate()(recomp/mod.rs:1481), so it also overrode an explicitOptions { structured: true }. The tests that assert what the structured form generates therefore failed whenever a developer ran the suite with the switch set — with output that reads like a translator regression, not a configuration switch.This reads the switch in
Options::default()— which is what the runtime asks for — so an explicit request wins, and the tests that check the structured form ask for it outright (includingoversized_structured_code_falls_back_to_pc_blocks, from #1321, whose size bound is also about what the structured form generates).What is in it
crates/xcl/src/gpu/recomp/mod.rs:Default for OptionssetsstructuredfromXCL_RECOMP_NO_STRUCTURED;translateno longer reads the environment.crates/xcl/src/gpu/recomp/tests.rs:hlsl_is_generated_for_straight_line_and_branches,far_jumps_are_direct_branchesandoversized_structured_code_falls_back_to_pc_blockspassOptions { structured: true, ..Default::default() }(the loop test already did).Evidence (same machine,
cargo test -p xcl --lib -- --test-threads=4):XCL_RECOMP_NO_STRUCTURED=1on4178e88:840 passed; 3 failed; 22 ignored—far_jumps_are_direct_branches,hlsl_is_generated_for_straight_line_and_branches,jumps_to_outer_loop_heads_are_structurede9e94ce:843 passed; 0 failed; 22 ignored843 passed; 0 failed; 22 ignored— unchangedTested
stable-x86_64-pc-windows-msvc), DXC 1.9.2609.5, debug (scripts/test.ps1) and release (scripts/smoke.ps1).\scripts\test.ps1(cargo build --workspace+cargo test --workspace -- --test-threads=4): 892 passed, 0 failed, 42 ignored (SKIPPED: 2no wave64; 1no heap windows; 1cannot disable the driver cache (Windows Developer Mode is required))Regression run
main (
e9e94ce, clean tree, no local changes):PR (
f46ebd6, clean tree, no local changes):Not tested
AI use
XCL_RECOMP_NO_STRUCTURED=1andXCL_CONSOLE_LISTS=1, found the switch overriding explicit requests, wrote the change, rebased ontoe9e94ce(where the newoversized_structured_code_falls_back_to_pc_blocksneeded the same explicit option) and confirmed both configurations pass, ran the test suite andscripts/smoke.ps1regression runs with Scripts: smoke blocks print the game folder's name #677's title hashing, and drafted this PR description.