Repository navigation
Shaders: XCL_SAFE_BARRIER turns the translation caches off (#1409) - #1413
tiagonogueiraa-bit wants to merge 2 commits into
Conversation
) XCL_SAFE_BARRIER=0 changes the HLSL emitted for s_barrier in multi-wave compute programs (emit.rs), but the variable was neither in cache_allowed's list nor in the cache key. A run with it stored those programs' DXIL with the plain group barrier, and later runs without it loaded that DXIL. In the other order, the variable had no effect on programs already cached. It is now in cache_allowed's list, like the other variables that change the emitted code. As for those, its presence alone turns the caches off. shader_cache_bypasses_debug_overrides checks it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Integrates 12 additional open upstream PRs on top of upstream/main (b7aa9f3): - ivall#1432: GFX10 to DXGI format mappings, depth SRVs, and byte sizing - ivall#1447: Arena::take overflow/alignment and Uma::free pool validation - ivall#1441: drop SC_KEYMENU so the window is never frozen in menu mode - ivall#1431, ivall#1436: TLS directory sizing/alignment and RegisterClassExA checks - ivall#1430, ivall#1446: XGameSave quota/URL and XAudio2 XMA channel validation - ivall#1415, ivall#1433: VFS merged-directory sync and CreateFile2 checks - ivall#1418: XGameRuntime device association synchronization - ivall#1410, ivall#1413: wave64 form logging and XCL_SAFE_BARRIER cache bypass Also removes duplicate a_huge_constant_count_has_no_layout test left from pre-applying ivall#1290 before upstream merged it, and updates README.md. Verified under GE-Proton11-14 (RX 9060 XT / RADV): - Release build (x86_64-pc-windows-msvc): ok (22.05s) - Proton unit test sweep across all merged/touched modules: 209 passed, 2 failed (known Wine/vkd3d-proton diffs: xma2_source_voice current_buffer_context before Start, and vkd3d-proton accepting UNORDERED_ACCESS without UAV flag), 1 ignored, 0 skipped.
|
Test report for bfaf8c8 (this PR's head) merged onto main b7aa9f3 (clean merge). Tested
Not tested
Tested and written with Claude Code (Claude Opus 5.5); the runs are real, on the hardware above. |
|
Verification on RTX 3060 Ti (Windows 11), branch merged with current
Thanks! |
|
Thank you, @pvfreis, and @DavidM1911! The run is in Tested, and the PR is ready for review. Written with Claude Code (Claude Opus 5.5). |
|
The bypass for runs with On stock At Codex (GPT-6.2 Sol) ran the stock probe. Codex (GPT-6.2 Astra) independently checked the evidence and upgrade path. |
…_BARRIER bypass Entries a run with XCL_SAFE_BARRIER=0 or =1 stored under the default key stay readable after the bypass, since pso.rs is outside the source hash. Bumping TRANSLATION_GLUE_REVISION gives every build a new key. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Thanks @pvfreis, you're right: with |
|
GPU run of Tested
Not tested
AI use
|
XCL_SAFE_BARRIER=0changes the HLSL emitted fors_barrierin multi-wave compute programs (emit.rs:553), but the variable was neither incache_allowed's list nor in the cache key. So a run with it stored those programs' DXIL with the plain group barrier, and later runs without it loaded that DXIL. In the other order, the variable had no effect on programs already cached. Fixes #1409.What is in it
crates/xcl/src/gpu/recomp/pso.rs:cache_allowed:XCL_SAFE_BARRIERjoins the list of variables that change the emitted code. As for those, its presence alone turns the caches off.shader_cache_bypasses_debug_overrideschecks it, for every stage.crates/xcl/build.rs:TRANSLATION_GLUE_REVISIONgoes topso-glue-v2. Entries that a run with the variable set stored under the default key would otherwise stay readable, sincepso.rsis outside the source hash; the new revision gives every build a new key (review by @pvfreis).Tested
cargo check -p xcl --lib --tests --target x86_64-pc-windows-msvc, no errors (C code stubbed, nothing linked).main:cache_allowed(Stage::Compute, |v| v == "XCL_SAFE_BARRIER")returnstruethere, as Shaders: translations made with XCL_SAFE_BARRIER=0 are cached and reused by later runs #1409 shows.b7aa9f3:cargo test --workspace --locked --no-fail-fast -- --test-threads=4gives 769 passed, 1 failed, 41 ignored, the same asmainb7aa9f3.shader_cache_bypasses_debug_overridespasses. The one failure is the e2e test's swap chain in a non-interactive session, on both. (report)Regression run
Not run. I have no Windows machine here.
Not tested
c160d86showed the stale entry being reused; the revision bump (190c97e) has not been run on Windows.Overlaps
#1284 (
XCL_LOOP_BUDGET), #245 (XCL_CS_PAD_ALL,XCL_NO_CS_PAD) and #613 (XCL_DXC_ARGS) add names to the same list and test. Whichever merges later rebases over a one-line conflict.AI use
🤖 Generated with Claude Code