GPU: replay pending descriptors before publishing the host heap #365

Manually merged
github merged 1 commit from gh-pr/365/head into gh-pr/365/base 2026-11-26 04:01:03 +00:00
Owner

@⁠FIocker on GitHub · 2026-11-24 02:37 UTC · original
FIocker:gpu/publish-initialized-descriptor-heap → main · +12 −9 · 1 files · 1 commits · merged 2026-11-24 08:02 UTC

Publish the host heap only after replaying the descriptors queued before first use. Previously the OnceLock was initialized before the pending loop ran. A concurrent caller could take the fast path, bind the heap, and proceed before its queued descriptor writes became visible.

Replay the queued writes inside the OnceLock initializer while holding the existing pending mutex. The fast path remains unchanged after initialization. This is independent of #52, which covers heap lifetime during descriptor mirroring.

On Windows WARP, cargo test --locked -p victory-gpu --features diagnostics -- --test-threads=1 passed 45 tests with one existing ignored test. The staged asset policy and diff checks passed.

**@⁠FIocker** on GitHub · 2026-11-24 02:37 UTC · [original](https://github.com/Marvisak/VIctory/pull/365) `FIocker:gpu/publish-initialized-descriptor-heap` → `main` · +12 −9 · 1 files · 1 commits · merged 2026-11-24 08:02 UTC Publish the host heap only after replaying the descriptors queued before first use. Previously the OnceLock was initialized before the pending loop ran. A concurrent caller could take the fast path, bind the heap, and proceed before its queued descriptor writes became visible. Replay the queued writes inside the OnceLock initializer while holding the existing pending mutex. The fast path remains unchanged after initialization. This is independent of #52, which covers heap lifetime during descriptor mirroring. On Windows WARP, `cargo test --locked -p victory-gpu --features diagnostics -- --test-threads=1` passed 45 tests with one existing ignored test. The staged asset policy and diff checks passed.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 04:01:02 +00:00
github manually merged commit a4e7f1d004 into gh-pr/365/base 2026-11-26 04:01:03 +00:00
Author
Owner

@⁠jeremygold02 on GitHub · 2026-11-24 03:58 UTC · original

Thanks @⁠FIocker for this change. I tested head a4e7f1d004bff927c205981c623142c8e7dbb4a4 with:

cargo test --locked -p victory-gpu --features diagnostics --lib descriptor -- --test-threads=1

Result: 5 passed, 0 failed (41 filtered out). This exercised descriptor heap slot allocation/release, heap start placement, and descriptor-view lifetime across resource destruction and copies. The filtered tests do not directly stress concurrent first-use publication, and I did not run the broader WARP suite described in the PR body.

**@⁠jeremygold02** on GitHub · 2026-11-24 03:58 UTC · [original](https://github.com/Marvisak/VIctory/pull/365#issuecomment-7121586425) Thanks @⁠FIocker for this change. I tested head `a4e7f1d004bff927c205981c623142c8e7dbb4a4` with: ``` cargo test --locked -p victory-gpu --features diagnostics --lib descriptor -- --test-threads=1 ``` Result: 5 passed, 0 failed (41 filtered out). This exercised descriptor heap slot allocation/release, heap start placement, and descriptor-view lifetime across resource destruction and copies. The filtered tests do not directly stress concurrent first-use publication, and I did not run the broader WARP suite described in the PR body.
This discussion has been locked. Commenting is limited to contributors.
No reviewers
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.

Dependencies

No dependencies set

Reference
github/Marvisak--VIctory!365
No description provided.