GPU diagnostics: measure pipeline worker backlog during shared shader waits #1604

Closed
github-bot wants to merge 8 commits from gh-pr/1604/head into gh-pr/1604/base
Owner

@⁠ToxicmaggotRP on GitHub · 2026-11-24 19:42 UTC · original
ToxicmaggotRP:diagnostics/pipeline-runnable-backlog → main · +548 −23 · 3 files · 8 commits · closed without merging

[## Summary

Adds diagnostics-only measurements for pipeline worker occupancy while shader translations are shared through OnceLock.

This is a measurement step related to #1509. Existing translation-wait timings show that workers can block on another worker's shader initialization, but they do not show whether more pipeline jobs remain queued during those waits.

This patch measures that overlap before proposing any scheduling change.

Changes

  • Track the number of pipeline worker threads, active jobs and queued jobs.
  • Count workers currently waiting on another pipeline worker's shader translation.
  • Accumulate the time during which queued jobs coexist with one or more translation waiters.
  • Separately accumulate the time during which every pipeline worker is waiting on a shared translation while jobs remain queued.
  • Record peak active jobs, queued jobs and dependency waiters.
  • Report the measurements when the queue drains and when the final dependency waiter leaves while work is still queued.
  • Keep the instrumentation behind the Windows diagnostics feature; normal builds and scheduling behaviour are unchanged.
  • Add deterministic unit tests for overlapping intervals and separate backlog periods.

Scope and limitations

This PR does not introduce a dependency-aware scheduler or claim a frame-time improvement.

A non-empty queue does not by itself prove that every queued pipeline is independently runnable. These measurements are intended to establish whether the suspected worker starvation is occurring in real workloads.

Verification

  • Based directly on upstream main at ffe310e.
  • Two deterministic unit tests are included in scheduler_metrics.rs.
  • Not yet run: Windows compilation, the Rust test suite, Clippy and an in-game diagnostics run.
  • No GitHub Actions checks are currently reported for this branch's head commit.

Please treat this as a draft for review of the instrumentation and its measurement semantics.](#1604)

**@⁠ToxicmaggotRP** on GitHub · 2026-11-24 19:42 UTC · [original](https://github.com/Marvisak/VIctory/pull/1604) `ToxicmaggotRP:diagnostics/pipeline-runnable-backlog` → `main` · +548 −23 · 3 files · 8 commits · closed without merging [## Summary Adds diagnostics-only measurements for pipeline worker occupancy while shader translations are shared through `OnceLock`. This is a measurement step related to #1509. Existing translation-wait timings show that workers can block on another worker's shader initialization, but they do not show whether more pipeline jobs remain queued during those waits. This patch measures that overlap before proposing any scheduling change. ## Changes - Track the number of pipeline worker threads, active jobs and queued jobs. - Count workers currently waiting on another pipeline worker's shader translation. - Accumulate the time during which queued jobs coexist with one or more translation waiters. - Separately accumulate the time during which every pipeline worker is waiting on a shared translation while jobs remain queued. - Record peak active jobs, queued jobs and dependency waiters. - Report the measurements when the queue drains and when the final dependency waiter leaves while work is still queued. - Keep the instrumentation behind the Windows `diagnostics` feature; normal builds and scheduling behaviour are unchanged. - Add deterministic unit tests for overlapping intervals and separate backlog periods. ## Scope and limitations This PR does **not** introduce a dependency-aware scheduler or claim a frame-time improvement. A non-empty queue does not by itself prove that every queued pipeline is independently runnable. These measurements are intended to establish whether the suspected worker starvation is occurring in real workloads. ## Verification - Based directly on upstream `main` at `ffe310e`. - Two deterministic unit tests are included in `scheduler_metrics.rs`. - **Not yet run:** Windows compilation, the Rust test suite, Clippy and an in-game diagnostics run. - No GitHub Actions checks are currently reported for this branch's head commit. Please treat this as a draft for review of the instrumentation and its measurement semantics.](https://git.gtahub.st/github/Marvisak--VIctory/pulls/1604)
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 04:38:06 +00:00
github-bot closed this pull request 2026-11-26 04:38:06 +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/Marvisak--VIctory!1604
No description provided.