Recompiler: XCL_RECOMP_NO_STRUCTURED picks the default, not an override #1800
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1810"
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 b3IKK on 2026-11-24T21:00:57Z.
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 #677's title hashing, and drafted this PR description.Imported from ivall/xcl. Originally posted by b3IKK on 2026-11-24T21:09:31Z.
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.Imported from ivall/xcl. Originally posted by futurepro62 on 2026-11-24T21:33:17Z.
Full-suite run, since this PR has no test report yet. Tested exact head
f46ebd6(on its basee9e94ce).Tested
cargo build --workspace, thenXCL_REQUIRE_GPU=mesh cargo test --workspace -- --test-threads=4 --skip heap_window_out_of_memory_falls_back_to_the_switch_form --skip pso_measurement_compiles_an_exact_synthetic_record: 890 passed, 0 failed, 42 ignored. SKIPPED (no wave64):gpu_geometry_wave32_prefix_count_over_a_mask,gpu_wave32_program_in_wave64_hardware.#[test]functions in the diff.XCL_ADAPTER=radeon),cargo test --workspace -- --test-threads=4: 892 passed, 0 failed, 42 ignored. SKIPPED:heap_window_out_of_memory_falls_back_to_the_switch_form(no heap windows).--skipon NVIDIA. Both fail on main7f7e768too, not because of this PR: underXCL_REQUIRE_GPU=mesh,runner::skip_testturns their skips into failures.heap_window_out_of_memory_falls_back_to_the_switch_formskips whenXCL_HEAP_WINDOWSis unset (#1651), andshaders::tests::pso_measurement_compiles_an_exact_synthetic_recordskipped because Developer Mode was off. Developer Mode was turned on before the AMD run, and therepso_measurement_compiles_an_exact_synthetic_recordran and passed.Not tested
AI use
Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-25T00:28:07Z.
Verification on RTX 3060 Ti (Windows 11), branch merged with current
main:cargo test -p xcl --lib: all passed, 0 failed, ~23 ignored. (Intermittent single-test flake / 0xc0000005 abort under parallel scheduling — tracked in #1978; clean on single-threaded rerun.)Thanks!
Imported from ivall/xcl. Originally posted by JJAutoCompare on 2026-11-25T03:30:23Z.
Tested
f46ebd6280652057a9ed2ef377cd9c2103f58f70before and after testing. The reused detached checkout matched that SHA and was clean both times. The live discussion had author and other-machine results, with no matching STOR-WINLAB CPU matrix.26200.9974, Ryzen 7 3800X (6 cores and 12 logical processors exposed), Arc A770 driver32.0.101.9175,stable-x86_64-pc-windows-msvc, rustc1.100.0 (0ef1bc386 2026-11-09), Cargo1.100.0 (3acc79c0c 2026-11-05), unoptimized test profile with debug info disabled.XCL_RECOMP_NO_STRUCTUREDabsent and with it set to1. The explicit structured requests preserved the expected generated HLSL under both defaults. That included forward and backward branches, a resolved far jump emitted without PC dispatch, and the size-bound case staying structured for 50 crossing jumps and falling back to PC blocks for 200. The straight-line fixture also passed its explicit unstructured assertion in both modes.0and reported 1 passed, 0 failed, 0 ignored, 864 filtered. Per setting: 3 fixtures passed their CPU assertions, 0 failed, 0 ignored, with 1 optional GPU tail markedSKIPPEDbyfar_jumps_are_direct_branches. Total: 6 fixture passes, 0 failed, 0 ignored, 2 GPU-tail skips. DXC and DXIL1.9.2609.5were loaded by the far-jump availability probe. The CPU-only run performed no shader compilation, DXIL validation, or GPU dispatch.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
1.9.2602.17, outside the requested CPU-only scope. That matrix recorded 6 passed, 0 failed, 0 ignored, 0 skipped. I reran the three fixtures with the unmatched adapter selector shown above. Thecpu-only.*.logfiles record the corrected matrix. The initial run is recorded in theabsent.*.logand1.*.logfiles.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 (
gpt-6.2-sol) ran the checked-in fixtures, checked the live PR, and wrote this report.upstream-sync referenced this pull request2026-11-25 19:07:20 +00:00
Imported from ivall/xcl. Originally posted by github-actions[bot] on 2026-11-28T08:01:06Z.
Nothing has happened on this PR for 3 days, so it is marked
staleand will be closed in 4 days. A push or a comment takes the mark off: rebase it ontomainif it conflicts, and say in one line what it still fixes. If it only waits for a maintainer, a comment saying so is enough.Imported from ivall/xcl. Originally posted by Foniass on 2026-12-01T06:51:19Z.
Triage (#1607) – head
f46ebd6No open or merged PR makes the same change; main still reads
XCL_RECOMP_NO_STRUCTUREDinsidetranslate(recomp/mod.rs), so an explicitstructured: trueis overridden by the environment. Moving the check intoOptions::default()keeps runtime callers unchanged (they build Options from..Default::default(), and pso.rs already keys the policy on the variable). No problems found in the diff; it conflicts with main.Recommendation: keep open.
AI review: Claude Code (Claude Opus 5.5), diffs read only, not built or run; not checked by a human.
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.