Card time by kind and top pipelines in release builds, card memory by holder, VICTORY_PROFILE in release, VICTORY_NATIVE_DUMP, VICTORY_PIX #4203

Closed
github-bot wants to merge 21 commits from github-bot/gh-4202 into main AGit
Owner

@⁠marquezlale-creator on GitHub · 2026-11-30 17:22 UTC · original
marquezlale-creator:pr/diagnostics → main · +1232 −827 · 43 files · 21 commits · closed without merging

What it changes

Diagnostics that found the causes of slow frames on an RTX 5070 this week, all off or log-only, nothing changed in what is drawn:

  • VICTORY_CARD_TIME=1 (release builds): one frame in 60 is timed with timestamps on the card, and the log says the card time by kind of command (draws, indirect draws, dispatches, our argument clamps apart, alias copies, copies...) and the 16 title pipelines that took the most (with their hashes). It is what showed that folded programs cost up to 4 ms each and that the card, not the CPU, was the limit in foliage.
  • VICTORY_ALIAS_DIRECT=1 (in the same commit, off by default): R32_UINT <-> R9G9B9E5_SHAREDEXP alias copies texture to texture, without the buffer (D3D12 copies those bits as they are); 81 copies a frame for 8.4 ms of card time before.
  • The card's memory by holder every 10 s: ours by part (host textures, the title's fills vs targets, aliased targets, textures by tiles, copies of title memory and their twins, windows, arenas, free texture blocks), what is not ours (driver, DLSS/FG, pipelines), the pool blocks and the retire queue; and a line on the host copies of title memory and the windows by what keeps them (window_use, now in release). It showed that the card's growth was not the texture copies.
  • VICTORY_PROFILE works in release builds too (the sampler and its stacks were diagnostics-only; unwind_copy is built in release for it). Nothing runs without the variable. It found a lock convoy in an opt-in texture-queue switch in one run.
  • VICTORY_NATIVE_DUMP=<folder> (with VICTORY_WAVE_WHY): the console code of wave64 programs on the form ladder as text, by offset, to read what the offsets in the WAVE64-RETRY lines point at. Written outside the repository, like VICTORY_FOLD_DUMP; not a translation switch (added to the shader cache test's list).
  • VICTORY_PIX=1: loads PIX's GPU capturer before the device is made, so PIX can attach to the running game.

How it was tested

  • GPU and profile: RTX 5070, Series X, 2560x1440, DLSS balanced, used through two days of play sessions.
  • Before / After: log lines only; no change to the frame with the variables unset.
  • For shader changes: none (the dump only writes text).
  • cargo test passed for the crates it touches: cargo check -p victory --tests yes; cargo test -p victory-gpu card_time yes. every_switch_of_the_translator_is_in_the_key fails here as on main ("VICTORY_ORACLE_RUNS is not read by the translator any more"), not from this change; VICTORY_NATIVE_DUMP is in its list of switches that are not translation switches.

Checked for overlap

  • I searched the open pull requests for the same issue and for the files this touches. Related: #4085 (a live memory breakdown), #3075 (VICTORY_GPU_TIMING_ALSO, diagnostics builds); this one is for release builds.

🤖 Generated with Claude Code

**@⁠marquezlale-creator** on GitHub · 2026-11-30 17:22 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/4202) `marquezlale-creator:pr/diagnostics` → `main` · +1232 −827 · 43 files · 21 commits · closed without merging ## What it changes Diagnostics that found the causes of slow frames on an RTX 5070 this week, all off or log-only, nothing changed in what is drawn: - **`VICTORY_CARD_TIME=1`** (release builds): one frame in 60 is timed with timestamps on the card, and the log says the card time by kind of command (draws, indirect draws, dispatches, our argument clamps apart, alias copies, copies...) and the **16 title pipelines that took the most** (with their hashes). It is what showed that folded programs cost up to 4 ms each and that the card, not the CPU, was the limit in foliage. - **`VICTORY_ALIAS_DIRECT=1`** (in the same commit, off by default): R32_UINT <-> R9G9B9E5_SHAREDEXP alias copies texture to texture, without the buffer (D3D12 copies those bits as they are); 81 copies a frame for 8.4 ms of card time before. - **The card's memory by holder every 10 s**: ours by part (host textures, the title's fills vs targets, aliased targets, textures by tiles, copies of title memory and their twins, windows, arenas, free texture blocks), what is not ours (driver, DLSS/FG, pipelines), the pool blocks and the retire queue; and a line on the host copies of title memory and the windows by what keeps them (`window_use`, now in release). It showed that the card's growth was not the texture copies. - **`VICTORY_PROFILE`** works in release builds too (the sampler and its stacks were diagnostics-only; `unwind_copy` is built in release for it). Nothing runs without the variable. It found a lock convoy in an opt-in texture-queue switch in one run. - **`VICTORY_NATIVE_DUMP=<folder>`** (with `VICTORY_WAVE_WHY`): the console code of wave64 programs on the form ladder as text, by offset, to read what the offsets in the `WAVE64-RETRY` lines point at. Written outside the repository, like `VICTORY_FOLD_DUMP`; not a translation switch (added to the shader cache test's list). - **`VICTORY_PIX=1`**: loads PIX's GPU capturer before the device is made, so PIX can attach to the running game. ## How it was tested - GPU and profile: RTX 5070, Series X, 2560x1440, DLSS balanced, used through two days of play sessions. - Before / After: log lines only; no change to the frame with the variables unset. - For shader changes: none (the dump only writes text). - `cargo test` passed for the crates it touches: `cargo check -p victory --tests` yes; `cargo test -p victory-gpu card_time` yes. `every_switch_of_the_translator_is_in_the_key` fails here as on main ("VICTORY_ORACLE_RUNS is not read by the translator any more"), not from this change; `VICTORY_NATIVE_DUMP` is in its list of switches that are not translation switches. ## Checked for overlap - [x] I searched the open pull requests for the same issue and for the files this touches. Related: #4085 (a live memory breakdown), #3075 (`VICTORY_GPU_TIMING_ALSO`, diagnostics builds); this one is for release builds. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
To read what the offsets in the WAVE64-RETRY lines point at (used to check the
23 approximate-only programs: their wave votes gate PCF skips, so they stay folded).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
card_time: a timestamp in front of each command of note in direct and
compute host lists of a timed frame, read back at the list's reset, one
line every two seconds by kind. Off by default.

alias_direct: tested on the card with the debug layer (legal, every bit
kept; a 32-to-16-bit copy refused as the control). Off by default.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
The first night's lines: ~37-45 ms in lists, of it 10.5-12.7 ms dispatches (~1,750)
and 6.7-9.1 ms indirect dispatches (~370): which shaders those are is the next step.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
The line splits the card's memory in use into ours by part (host textures, the
title's fills vs targets, aliased targets, tiles, copies of title memory and
their twins, windows, arenas, free blocks), what is not ours (driver, DLSS/FG,
pipelines), the pool blocks and the retire queue: in game the card went 10.1 ->
11.9 GB in 10 minutes with the texture and buffer copies flat.
slot_evict read evict_slots'  and never used it: a texture in use was let go.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
In game the host copies grew 6.0 -> 11.1 GB in three minutes (4,337 -> 5,390),
where the morning's run held 6.8 GB for hours; a window goes only when nothing
but its table holds it.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-30 18:08:35 +00:00
github-bot closed this pull request 2026-12-01 18:50:30 +00:00
Author
Owner

@⁠trustno1-coder on GitHub · 2026-12-01 18:45 UTC · original

Closing this as part of moving main to the texture and video-memory rework (v2026.12.01.01-test). A lot of the code changed, and this pull request no longer applies cleanly to it; it would need to be rewritten against the new main rather than rebased. Thank you for the work. If the change is still needed, please open a new pull request based on the current main.

**@⁠trustno1-coder** on GitHub · 2026-12-01 18:45 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/4202#issuecomment-7321493238) Closing this as part of moving main to the texture and video-memory rework (v2026.12.01.01-test). A lot of the code changed, and this pull request no longer applies cleanly to it; it would need to be rewritten against the new main rather than rebased. Thank you for the work. If the change is still needed, please open a new pull request based on the current main.

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!4203
No description provided.