Shaders: include HEAP_FLAT in offline precompile runtime_windows #2704
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!2704
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-2704"
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?
@Saksukella on GitHub · 2026-11-26 07:21 UTC · original
Saksukella:fix/precompile-heap-flat→amd-dev· +25 −8 · 1 files · 2 commits · openWhat is in it
crates/xcl/src/shaders.rs: extractruntime_windows_flags(windows, heap_windows, heap_flat)so offlinexcl shaders --precompile/--export-hlsl/--measure-psoincluderecomp::HEAP_FLATwheneverwindows > 1 && heap_windows && heap_flat, matching runtimerecomp::pso::mem_windows().recomp::HEAP_WINDOWS | recomp::HEAP_FLATwhen printing the memory window count inexport_hlslandprecompile(previously printing536870916 memory windowsifHEAP_FLATwere set), and append(flat)only inprecompile(not--export-hlsl, sincepso::console_hlsl/recomp::translatestripsHEAP_FLATas direct-DXIL-only).shaders::tests::offline_runtime_windows_includes_heap_flat_when_enabled.amd-dev(whererecomp::HEAP_FLATandrecomp::pso::heap_flat()live).Tested
32.0.32029.2010), 24-thread x86_64 CPU, 32 GB RAM, Windows;rustc 1.100.0 (0ef1bc386 2026-11-09); debug (tests) and release (xcl.exe).cargo test -p xcl --lib offline_runtime_windows_includes_heap_flat_when_enabled: 1 passed, 0 failed (0.00s).cargo test -p xcl --test shaders_e2e -- --test-threads=4: 8 passed, 0 failed (0.26s)..plib(gen-00000036.plib):pipeline library (.plib): 1 loaded, 576 stored(key mismatch because offline omittedHEAP_FLAT).xcl shaders shaders.rpf --precompile --only cs --pipelines --used-only):4 memory windows from the descriptor heap (flat),pipelines made on the GPU 578, refused 0,pipeline library (.plib): 548 loaded, 30 stored -> gen-0000003e.plib(94.8% instant hit rate; also cached 2.67 MB56c0cd3b82a00c6ewith the matching runtime key).Regression run
Not tested
--export-hlsland--measure-psowith Windows Developer Mode enabled (Developer Mode is off on this machine).AI use
shaders.rsandpso.rs, code edit, unit test authoring, and running offline precompile / smoke checks. All diffs and measurements were verified locally on hardware.@luckyteagirl on GitHub · 2026-11-26 07:29 UTC · original · reviewed
shaders.rs:1097–1103: the new--export-hlslsummary can sayfrom the descriptor heap (flat)whenHEAP_FLATis set, but this path writes HLSL throughpso::console_hlsl(line 1067), andrecomp::translateexplicitly removesHEAP_FLATbefore HLSL translation (gpu/recomp/mod.rs:1631–1633).pso.rs:116–117also documents flat access as direct-DXIL-only. With the now-default flat runtime flag, this makes the exported HLSL summary describe a layout the exported code does not use. The corrected numeric window count should stay; could theflatsuffix be omitted or qualified for--export-hlsl? Source review only at exact head09b6d29d0172a25f52878cd352e78f11dda38405, no export run. AI-assisted review with Codex.@Saksukella on GitHub · 2026-11-26 08:59 UTC · original
Good catch @luckyteagirl — updated in
9b681139so--export-hlslkeeps the masked numeric window count (windows & !(recomp::HEAP_WINDOWS | recomp::HEAP_FLAT)) and omits(flat)sincepso::console_hlsl/recomp::translatestripsHEAP_FLAT. Re-ranoffline_runtime_windows_includes_heap_flat_when_enabled(1/1),shaders_e2e(8/8), and a 60s RX 9070 XT smoke run (1674 frames, 0 removals, 0 crashes).View command line instructions
Manual merge helper
Use this merge commit message when completing the merge manually.
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.