runtime: preserve CPU fence signal rewinds (replacement for #3279) #3352
Labels
No labels
accessibility
awaiting author
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
priority: P0
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/R0Y00--Xbox2Windows#3352
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
@romn4rch on GitHub · 2026-11-28 11:26 UTC · original
Change
Replacement for #3281: serialize each fence's native CPU
Signal, desktop completion observation, and cached-word publication with a per-fence SRW lock. The source-built fixture covers the 9 → 2 → 0 → 7 rewind sequence and 128 barrier-started two-caller signal pairs. The PR smoke-test filter includesstartup_fence_values_warp. Current upstreammainat24fcd0b5742abb2fcaba8066093d70829df956a3was merged with normal history (merge commit95613c4f5); the original PR remains open and unchanged.Verification
& .\tools\dev.ps1; cmake --preset dev; cmake --build --preset dev --target startup_fence_values startup_queue_wait --parallel 4; ctest --preset dev --no-tests=error -V -R '^startup_(fence_values|queue_wait)_warp$'— passed 2/2 on Microsoft Basic Render Driver (WARP), D3D12 debug layer enabled.ctest --preset pr --no-tests=error -N -R '^startup_fence_values_warp$'— selected the fence WARP test (1 test).python -B tests/docs_links_check.py— passed; checked 156 Markdown files and 674 links.The full PR test suite and a post-merge hardware run were not run. CMake reported that Python-driven CTest registrations were disabled because
out/pe-env/Scripts/python.exeis absent.Evidence and follow-up
The fixture is source-built and compares the shim's completion method and address with its desktop fence. See the experiment note. It does not establish full-title startup. Queued rewinds and mixed CPU/queue producer ordering remain separate, unresolved behavior; no claim is made for those cases.
Checklist
AI-assisted.
Pull request details or commits were not available from GitHub; kept as an issue.
runtime: CPU fence rewind review follow-upto runtime: preserve CPU fence signal rewinds (replacement for #3279)@JohnConnorNPC on GitHub · 2026-11-29 13:05 UTC · original
I reviewed
ac685174by reading the diff against mainaf1cab5c; I built and ran nothing.git merge-base --is-ancestor a5a92ea1 ac685174is true, so this branch carries #3281 unchanged and supersedes it. CI at this head ran the new test: the Windows job showsstartup_fence_values_warp ... Passedand100% tests passed out of 74. On an export of the head,tests/docs_links_check.py(Checked 156 Markdown files and 674 links.) andtests/bidi_controls_check.pypass. Leyukaka's and lukaslw-lab's points still stand, and I don't repeat them here.Please rebase.
git merge-tree --write-tree origin/main ac685174still conflicts inCMakePresets.jsononly, because main has added more entries to theprtargets and filter since.MUST
SHOULD
2. The change applies to every fence on every path, with no opt-in. A CPU Signal below the published word now lowers the word the title polls through slot 12; main kept the maximum. That matches the D3D12 contract, but nothing shows whether a loading run ever rewinds a fence.
fence_signallogs nothing, so a run can't show how often its result now differs from main's. A count of successful CPU signals whose published value is below the previous word would answer that, either in the heartbeat or as a first-calls log line.3. The "Measured result" section doesn't say whether its table was measured with the lock and the two-caller loop. The date, base
240e0fb9, compiler and both rows (WARP and RTX 4070 Ti SUPER) are unchanged from #3281. Yet the section now says "These results cover the CPU signal contract and a two-caller barrier regression". The body reports only a WARP run at this head and says no post-merge hardware run was done. Please name the commit each row was measured at, or re-measure the table at this head.NIT
4. "A later or equal callback retains the existing value through the same publication path" is hard to follow.
fence_reachedkeeps the larger of the word and the callback's value, under the same lock. Saying that directly would be clearer.AI-assisted.