Trace shader and driver work on pipeline workers #144

Manually merged
github merged 2 commits from github-bot/gh-144 into main 2026-11-26 08:21:45 +00:00 AGit
Owner

@⁠gomeaw on GitHub · 2026-11-26 07:16 UTC · original
gomeaw:fix/trace-pipeline-workers → main · +23 −3 · 4 files · 2 commits · merged 2026-11-26 08:17 UTC

The paired RTX 5070 run in #48 removed descriptor-table refusals, but spent 566–598 ms per traced frame on pipeline-worker threads outside named spans. #73 reports repeated first-use waits with a similar symptom.

Add spans to the existing VICTORY_TIMELINE capture so the next trace can separate shader translation from other workers waiting for those translations, library lock acquisition from D3D12 PSO loads and creates, and library serialization from general worker time. The requesting thread also records its first-use wait. #125 is addressing the separate question of how much time first use should wait.

For the matched checkpoint run from #48, capture the tip over the black scene and the porch route using the same save and warm cache. The text summary will show which worker spans lie on the Present dependency chain, with the wrapped waits alongside them.

Windows CI passed 21 pipeline tests, four timeline tests, and the optimized diagnostics build. It skips the existing WARP depth-bounds failure. A physical RTX capture is still needed to attribute the reported stall.

**@⁠gomeaw** on GitHub · 2026-11-26 07:16 UTC · [original](https://github.com/avatarmanz/VIctory-7900XTX/pull/144) `gomeaw:fix/trace-pipeline-workers` → `main` · +23 −3 · 4 files · 2 commits · merged 2026-11-26 08:17 UTC The paired RTX 5070 run in #48 removed descriptor-table refusals, but spent 566–598 ms per traced frame on pipeline-worker threads outside named spans. #73 reports repeated first-use waits with a similar symptom. Add spans to the existing `VICTORY_TIMELINE` capture so the next trace can separate shader translation from other workers waiting for those translations, library lock acquisition from D3D12 PSO loads and creates, and library serialization from general worker time. The requesting thread also records its first-use wait. #125 is addressing the separate question of how much time first use should wait. For the matched checkpoint run from #48, capture the tip over the black scene and the porch route using the same save and warm cache. The text summary will show which worker spans lie on the Present dependency chain, with the wrapped waits alongside them. [Windows CI](https://github.com/gomeaw/VIctory-7900XTX/actions/runs/45773987463) passed 21 pipeline tests, four timeline tests, and the optimized diagnostics build. It skips the existing WARP depth-bounds failure. A physical RTX capture is still needed to attribute the reported stall.
Separate renderer-side shader translation and lock acquisition from D3D12 load and create calls. Also trace first-use waits and library serialization so a Present dependency trace can attribute worker time with the existing diagnostics.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 07:18:18 +00:00
Author
Owner

@⁠SherRao on GitHub · 2026-11-26 07:29 UTC · original · approved these changes

**@⁠SherRao** on GitHub · 2026-11-26 07:29 UTC · [original](https://github.com/avatarmanz/VIctory-7900XTX/pull/144#pullrequestreview-6070052384) · **approved these changes**
Author
Owner

@⁠avatarmanz on GitHub · 2026-11-26 07:56 UTC · original

Merged into main in the next push (tests pass); thanks.

**@⁠avatarmanz** on GitHub · 2026-11-26 07:56 UTC · [original](https://github.com/avatarmanz/VIctory-7900XTX/pull/144#issuecomment-7186005741) Merged into main in the next push (tests pass); thanks.
Author
Owner

@⁠ArturoWolff on GitHub · 2026-11-26 08:10 UTC · original

Thanks for separating translation, library guards, and driver calls in this PR. I exercised a complementary, small phase-trace adaptation on the fxceless receiver, to make the earlier first-bind-to-translation delays and once-only dispatch question measurable.

Scope and provenance: receiver 46bf5351707b1697c04e5d871c30973ebaa3e973, with the one-frame cap from fxceless #1234 (milesah3ad, powplusplus and BradRoland) and the selected bounded compute-wait changes from Beqren's #129 (c0fdca08d3446294336cfb6d59c2dbaa2cced69a, da4cee66b2a7d2fe1339c08f5b1a6732082f7de5). The timing boundaries are inspired by gomeaw's a6a6ef73845e342f63a400987141b27329e6c4b6 here. This is an independent receiver-specific diagnostic, not a full port or a validation of this fork's new main. The combined policy's earlier Linux CPU adapter comparison used a platform stand-in; this time the actual Windows-target crate and native Wine probe were used.

I added a per-live-job identifier distinct from the cache key, queue admission/promotion/claim events, host construction and publication, and separate recording-thread wait spans. The translation path has an outer Shader::translated() acquisition span and an inner initializer span. Library acquisition/opening, guards, driver load/create/store, root signatures and serialization have distinct spans. The ready() return snapshot is labeled as ordinary lookup, direct dispatch gate or indirect dispatch gate; a host command recorded after a successful binding is a separate event, not proof of GPU execution or a completed consumer readback. This helps avoid miscounting diagnostics lookups or racing late publications as actual dropped dispatches.

Measured game-free qualification: Rust 1.98.1, LLVM MinGW, x86_64-pc-windows-gnullvm, actual Wine 11.22 Staging in a private namespace with no title files or GPU devices. Separate Cargo targets, same initial Wine prefix. Both test builds passed without compiler warnings/errors, and cargo build --profile diag -p victory --features diagnostics --locked for the instrumented Windows target completed in 84.83 s.

Controlled case Combined policy, before tracing Combined policy, with tracing
Focused Windows-target test invocations passed under Wine 13/13 16/16
Trace records for the two-job queue fixture 0 15
Actual Wine default / explicit off / explicit on policy 1 / 0 / 1 1 / 0 / 1

The two jobs deliberately have identical cache keys but are separate live jobs. The promoted job is claimed first; a deliberately imposed 30 ms delay between promotion and claim is observed as 30.525 ms. Each is built once and reaches an explicit terminal refusal (no shaders in this fixture). The trace shows a pending ordinary lookup followed by a refused lookup, without inventing a dispatch. The expected trace assertion fails on the uninstrumented receiver and passes on the new build.

In another control, a synthetic terminal refusal is published after 100 ms while the real recording readiness gate waits. With the compute policy selected by actual Wine detection (switch unset, graphics budget zero), I measured a 100.236 ms compute wait, then a refused direct gate. With VICTORY_COMPUTE_WAIT=0, the direct gate immediately reports pending. A later indirect gate reports refusal in both cases. Neither case records a host command. A cached shader refusal produces only the acquisition span, not an invented translation span. Trace-off and a nonmatching shader filter both produce zero phase records. These are deliberately controlled delays and refusal results, not compiler throughput, retail FPS or a GPU success test.

One accounting detail when comparing with frame summaries on the combined receiving tree: the adapted wait_long charges copystat::PipelineWaitUs in diagnostics but not framelog::T::PipelineWaitUs, whereas its graphics wait charges both. Keep compute-wait measurements separate until that accounting is aligned; a zero graphics-wait figure alone does not establish that every recording call stopped waiting.

The next useful physical-card capture would bind the queue/claim events and the exact returned dispatch-gate outcome to your phase timings on a small selected shader set, then check whether a consumer actually receives its data. The new driver spans compile here but have not yet been exercised with a D3D12 device. This result does not claim that a longer wait cures the rendering problem, nor that NVIDIA or AMD gameplay passed. An RTX 3080 Ti Linux user also reported reduced repeated waits in the linked #1234 discussion; that is their hardware result, not this fixture's.

AI assistance: Hermes Agent, working on behalf of ArturoWolff. (GPT 6.2 Sol High).

**@⁠ArturoWolff** on GitHub · 2026-11-26 08:10 UTC · [original](https://github.com/avatarmanz/VIctory-7900XTX/pull/144#issuecomment-7186278923) Thanks for separating translation, library guards, and driver calls in this PR. I exercised a complementary, small phase-trace adaptation on the fxceless receiver, to make the earlier first-bind-to-translation delays and once-only dispatch question measurable. **Scope and provenance:** receiver `46bf5351707b1697c04e5d871c30973ebaa3e973`, with the one-frame cap from [fxceless #1234](https://github.com/fxceless/victory-fork/pull/1234) (milesah3ad, powplusplus and BradRoland) and the selected bounded compute-wait changes from Beqren's #129 (`c0fdca08d3446294336cfb6d59c2dbaa2cced69a`, `da4cee66b2a7d2fe1339c08f5b1a6732082f7de5`). The timing boundaries are inspired by gomeaw's `a6a6ef73845e342f63a400987141b27329e6c4b6` here. This is an independent receiver-specific diagnostic, not a full port or a validation of this fork's new main. The combined policy's earlier [Linux CPU adapter comparison](https://github.com/fxceless/victory-fork/pull/1234#issuecomment-7185366462) used a platform stand-in; this time the actual Windows-target crate and native Wine probe were used. I added a per-live-job identifier distinct from the cache key, queue admission/promotion/claim events, host construction and publication, and separate recording-thread wait spans. The translation path has an outer `Shader::translated()` acquisition span and an inner initializer span. Library acquisition/opening, guards, driver load/create/store, root signatures and serialization have distinct spans. The `ready()` return snapshot is labeled as ordinary lookup, direct dispatch gate or indirect dispatch gate; a host command recorded after a successful binding is a separate event, **not** proof of GPU execution or a completed consumer readback. This helps avoid miscounting diagnostics lookups or racing late publications as actual dropped dispatches. **Measured game-free qualification:** Rust 1.98.1, LLVM MinGW, `x86_64-pc-windows-gnullvm`, actual Wine 11.22 Staging in a private namespace with no title files or GPU devices. Separate Cargo targets, same initial Wine prefix. Both test builds passed without compiler warnings/errors, and `cargo build --profile diag -p victory --features diagnostics --locked` for the instrumented Windows target completed in 84.83 s. | Controlled case | Combined policy, before tracing | Combined policy, with tracing | | --- | ---: | ---: | | Focused Windows-target test invocations passed under Wine | 13/13 | 16/16 | | Trace records for the two-job queue fixture | 0 | 15 | | Actual Wine default / explicit off / explicit on policy | 1 / 0 / 1 | 1 / 0 / 1 | The two jobs deliberately have **identical cache keys** but are separate live jobs. The promoted job is claimed first; a deliberately imposed 30 ms delay between promotion and claim is observed as 30.525 ms. Each is built once and reaches an explicit terminal refusal (no shaders in this fixture). The trace shows a pending ordinary lookup followed by a refused lookup, without inventing a dispatch. The expected trace assertion fails on the uninstrumented receiver and passes on the new build. In another control, a synthetic terminal refusal is published after 100 ms while the real recording readiness gate waits. With the compute policy selected by actual Wine detection (switch unset, graphics budget zero), I measured a 100.236 ms compute wait, then a **refused** direct gate. With `VICTORY_COMPUTE_WAIT=0`, the direct gate immediately reports **pending**. A later indirect gate reports refusal in both cases. Neither case records a host command. A cached shader refusal produces only the acquisition span, not an invented translation span. Trace-off and a nonmatching shader filter both produce zero phase records. These are deliberately controlled delays and refusal results, not compiler throughput, retail FPS or a GPU success test. One accounting detail when comparing with frame summaries on the combined receiving tree: the adapted `wait_long` charges `copystat::PipelineWaitUs` in diagnostics but not `framelog::T::PipelineWaitUs`, whereas its graphics wait charges both. Keep compute-wait measurements separate until that accounting is aligned; a zero graphics-wait figure alone does not establish that every recording call stopped waiting. The next useful physical-card capture would bind the queue/claim events and the exact returned dispatch-gate outcome to your phase timings on a small selected shader set, then check whether a consumer actually receives its data. The new driver spans compile here but have not yet been exercised with a D3D12 device. This result does not claim that a longer wait cures the rendering problem, nor that NVIDIA or AMD gameplay passed. An RTX 3080 Ti Linux user also reported reduced repeated waits in the linked #1234 discussion; that is their hardware result, not this fixture's. AI assistance: Hermes Agent, working on behalf of ArturoWolff. (GPT 6.2 Sol High).
github manually merged commit 022db78ecf into main 2026-11-26 08:21:45 +00:00
This discussion has been locked. Commenting is limited to contributors.
No description provided.