fix(gpu): fence asynchronous timestamp slot reuse #144

Closed
github-bot wants to merge 1 commit from github-bot/gh-144 into main AGit
Owner

@⁠krofty on GitHub · 2026-11-27 18:50 UTC · original
fix/timestamp-slot-fences → main · +101 −20 · 2 files · 1 commits · closed without merging

The optional asynchronous timestamp ring reused query/list/readback slots after 512 submissions, without checking whether their earlier execution had completed. Under a backlog that can read incomplete data and reuse storage still owned by the GPU.

Track each slot's existing submission fence and reserve it only after completion. Busy slots skip sampling without waiting; unused slots are never read, and the CPU no longer zeros the readback mapping. Device-loss values fail closed. The feature stays off by default.

Closes #136.

Report skipped samples and describe gaps as time between brackets, which includes unmeasured helpers and idle. The delayed samples divided by the current host-frame count remain a steady-scene approximation, not completed-frame percentiles or pure title time.

Validation:

  • Five exact pure production-source tests passed; removing only the completion check makes the pending-slot regression fail.
  • Independent source review and complete diff check passed.
  • Diagnostics integration build 293 passed through the existing build.sh.
  • Normal asynchronous run 307 closed normally with no logged exception or device removal. Its last three host intervals were 42.7/44.3/43.1 ms (23.4/22.6/23.2 FPS). The last eight queued GPU bracket readings were 38.3–39.4 ms/frame, with 29 stamped submissions/frame and zero skipped samples. These bracket readings include runtime work and use delayed samples; they are not completed-frame percentiles.
  • No gameplay speedup is claimed; this repairs the existing measurement's lifetime handling. The PR stays open and unmerged.
**@⁠krofty** on GitHub · 2026-11-27 18:50 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/144) `fix/timestamp-slot-fences` → `main` · +101 −20 · 2 files · 1 commits · closed without merging The optional asynchronous timestamp ring reused query/list/readback slots after 512 submissions, without checking whether their earlier execution had completed. Under a backlog that can read incomplete data and reuse storage still owned by the GPU. Track each slot's existing submission fence and reserve it only after completion. Busy slots skip sampling without waiting; unused slots are never read, and the CPU no longer zeros the readback mapping. Device-loss values fail closed. The feature stays off by default. Closes #136. Report skipped samples and describe gaps as time between brackets, which includes unmeasured helpers and idle. The delayed samples divided by the current host-frame count remain a steady-scene approximation, not completed-frame percentiles or pure title time. Validation: - Five exact pure production-source tests passed; removing only the completion check makes the pending-slot regression fail. - Independent source review and complete diff check passed. - Diagnostics integration build 293 passed through the existing build.sh. - Normal asynchronous run 307 closed normally with no logged exception or device removal. Its last three host intervals were 42.7/44.3/43.1 ms (23.4/22.6/23.2 FPS). The last eight queued GPU bracket readings were 38.3–39.4 ms/frame, with 29 stamped submissions/frame and zero skipped samples. These bracket readings include runtime work and use delayed samples; they are not completed-frame percentiles. - No gameplay speedup is claimed; this repairs the existing measurement's lifetime handling. The PR stays open and unmerged.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-27 18:51:50 +00:00
github-bot closed this pull request 2026-11-28 01:24:21 +00:00

Pull request closed

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/trustno1-coder--VIctory-NVIDIA!144
No description provided.