Trace shader and driver work on pipeline workers #144

Merged
gomeaw merged 2 commits from upstream-pr/144 into main 2026-11-26 08:17:49 +00:00
gomeaw commented 2026-11-26 07:16:02 +00:00 (Migrated from github.com)

Imported from avatarmanz/VIctory-7900XTX. Originally posted by gomeaw on 2026-11-26T07:16:02Z.


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.

<!-- greyfinch-sync:avatarmanz/VIctory-7900XTX:issue:6621548514 --> Imported from [avatarmanz/VIctory-7900XTX](https://github.com/avatarmanz/VIctory-7900XTX/pull/144). Originally posted by [gomeaw](https://github.com/gomeaw) on 2026-11-26T07:16:02Z. --- 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.
avatarmanz commented 2026-11-26 07:56:36 +00:00 (Migrated from github.com)

Imported from avatarmanz/VIctory-7900XTX. Originally posted by avatarmanz on 2026-11-26T07:56:36Z.


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

<!-- greyfinch-sync:avatarmanz/VIctory-7900XTX:comment:7186005741 --> Imported from [avatarmanz/VIctory-7900XTX](https://github.com/avatarmanz/VIctory-7900XTX/pull/144#issuecomment-7186005741). Originally posted by [avatarmanz](https://github.com/avatarmanz) on 2026-11-26T07:56:36Z. --- Merged into main in the next push (tests pass); thanks.
ArturoWolff commented 2026-11-26 08:10:37 +00:00 (Migrated from github.com)

Imported from avatarmanz/VIctory-7900XTX. Originally posted by ArturoWolff on 2026-11-26T08:10:37Z.


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).

<!-- greyfinch-sync:avatarmanz/VIctory-7900XTX:comment:7186278923 --> Imported from [avatarmanz/VIctory-7900XTX](https://github.com/avatarmanz/VIctory-7900XTX/pull/144#issuecomment-7186278923). Originally posted by [ArturoWolff](https://github.com/ArturoWolff) on 2026-11-26T08:10:37Z. --- 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).
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
avatarmanz/VIctory-7900XTX!144
No description provided.