GPU: publish descriptor address snapshots before releasing writer lock #1850

Open
VlREX wants to merge 1 commit from upstream-pr/1852 into main
VlREX commented 2026-11-24 23:29:00 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by VlREX on 2026-11-24T23:29:00Z.


Fix a CPU-side race between lazy descriptor address table initialization and concurrent descriptor writes. Hold the writer mutex until OnceLock publication completes. Preserve the lock-free initialized fast path. Two CPU-only regression tests included. Independent interleaving model: 2 stale outcomes before, 0 after. Native Rust and GPU tests pending. This is not a complete fix for issue #1808. AI-assisted (ChatGPT).

<!-- greyfinch-sync:Marvisak/VIctory:issue:6593520587 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/1852). Originally posted by [VlREX](https://github.com/VlREX) on 2026-11-24T23:29:00Z. --- Fix a CPU-side race between lazy descriptor address table initialization and concurrent descriptor writes. Hold the writer mutex until OnceLock publication completes. Preserve the lock-free initialized fast path. Two CPU-only regression tests included. Independent interleaving model: 2 stale outcomes before, 0 after. Native Rust and GPU tests pending. This is not a complete fix for issue #1808. AI-assisted (ChatGPT).
catminou4 commented 2026-11-25 00:06:28 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by catminou4 on 2026-11-24T23:47:42Z.

Review: COMMENTED


Static review only: victory-gpu is Windows-only (D3D12/windows_sys) — nothing compiles or runs on macOS; source review of the diff.

Descriptor address snapshots published before releasing writer: publication-order fix for descriptor updates — memory-ordering sensitive; Windows-only.

<!-- greyfinch-sync:Marvisak/VIctory:review:6049282531 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/1852#pullrequestreview-6049282531). Originally posted by [catminou4](https://github.com/catminou4) on 2026-11-24T23:47:42Z. **Review:** COMMENTED --- Static review only: victory-gpu is Windows-only (D3D12/windows_sys) — nothing compiles or runs on macOS; source review of the diff. Descriptor address snapshots published before releasing writer: publication-order fix for descriptor updates — memory-ordering sensitive; Windows-only.
Marvisak commented 2026-11-25 03:03:22 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by Marvisak on 2026-11-25T02:17:18Z.


Automated triage for the maintainers.

Needs rebase. This PR no longer merges cleanly into main: main has moved since the last triage, and the branch now conflicts in crates/victory-gpu/src/descriptor/host.rs. It will be reviewed again once it is rebased onto current main.

Previous verdict for this head: merge candidate.


Generated by Claude Code

<!-- greyfinch-sync:Marvisak/VIctory:comment:7150536471 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/1852#issuecomment-7150536471). Originally posted by [Marvisak](https://github.com/Marvisak) on 2026-11-25T02:17:18Z. --- <!-- victory-triage v1 head=a272c660347b74dc72d79732621837199b0a1ae4 verdict=needs-rebase at=2026-11-25T22:26:00Z --> Automated triage for the maintainers. **Needs rebase.** This PR no longer merges cleanly into `main`: `main` has moved since the last triage, and the branch now conflicts in `crates/victory-gpu/src/descriptor/host.rs`. It will be reviewed again once it is rebased onto current `main`. Previous verdict for this head: merge candidate. --- _Generated by [Claude Code](https://claude.ai/code)_
This pull request cannot be merged automatically due to conflicts.
Merge manually to resolve the conflicts.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin 'upstream-pr/1852:upstream-pr/1852'
git switch 'upstream-pr/1852'

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.

git switch 'main'
git merge --no-ff 'upstream-pr/1852'
git switch 'upstream-pr/1852'
git rebase 'main'
git switch 'main'
git merge --ff-only 'upstream-pr/1852'
git switch 'upstream-pr/1852'
git rebase 'main'
git switch 'main'
git merge --no-ff 'upstream-pr/1852'
git switch 'main'
git merge --squash 'upstream-pr/1852'
git switch 'main'
git merge --ff-only 'upstream-pr/1852'
git switch 'main'
git merge 'upstream-pr/1852'
git push origin 'main'
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
Marvisak/VIctory!1850
No description provided.