GPU: report whole blocks released by both texture pools #3766

Closed
tyr0nsur wants to merge 1 commit from upstream-pr/3766 into main
tyr0nsur commented 2026-11-30 06:26:00 +00:00 (Migrated from github.com)

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by tyr0nsur on 2026-11-30T06:26:00Z.


What it changes

The texture-block census was counting the main texture pool only. The live texture totals already include the separate pool for 4 KiB-aligned textures. With VICTORY_POOL_STATS=1, count both pools and show the smaller pool's live and released blocks separately. The diagnostics memory line also separates whole texture blocks from host-buffer blocks.

A release is counted when a pool drops its reference to a whole block. DXGI usage is the separate measure of what the driver reports. #2724 has already preserved cumulative slot-eviction totals on main.

How it was tested

  • Windows 11, RTX 4060 8 GiB, driver 621.14. The motivating play logs used Series S, 1280×720 to 1920×1080, DLSS Quality, frame generation and ray tracing off. This revision was tested without running the title.
  • Before, the pool census missed small-alignment blocks even when the live texture counters included them. The regression checks both pools, waits for a piece to be reclaimable, and checks that its block is counted once. A staging test checks bytes for a 16 MiB block.
  • cargo test -p victory-gpu --features diagnostics --locked --lib pool::tests:: passed (31 passed, 3 ignored). The staged asset-policy check passed for both changed files.
  • The full diagnostics GPU library suite had the same three failures on clean main at e1251c31 and on this PR, in bgrx_plane_selects_a_typed_view (#2646), bindings_record_no_work and every_switch_of_the_translator_is_in_the_key (#4296). The full-tree asset check also flags an unchanged test literal in victory-shader/src/native.rs.
  • Shader wave sizes are outside this change.

Checked for overlap

  • Searched open PRs for the same paths and counters. #3754 changes how room is estimated and #1562 changes pool sizing and eviction. This PR is for the measurements.

Developed with Codex and reviewed with Claude Opus 5.5.

After the upstream history rewrite, the final two-file patch was rebuilt on 7d93ee07. At head 8e953903, cargo test --locked -p victory-gpu --features diagnostics --lib pool::tests -- --test-threads=1 passed with 31 passed and 3 hardware benchmarks ignored.

<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:issue:5560218674 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/3766). Originally posted by [tyr0nsur](https://github.com/tyr0nsur) on 2026-11-30T06:26:00Z. --- ## What it changes The texture-block census was counting the main texture pool only. The live texture totals already include the separate pool for 4 KiB-aligned textures. With `VICTORY_POOL_STATS=1`, count both pools and show the smaller pool's live and released blocks separately. The diagnostics memory line also separates whole texture blocks from host-buffer blocks. A release is counted when a pool drops its reference to a whole block. DXGI usage is the separate measure of what the driver reports. #2724 has already preserved cumulative slot-eviction totals on main. ## How it was tested - Windows 11, RTX 4060 8 GiB, driver 621.14. The motivating play logs used Series S, 1280×720 to 1920×1080, DLSS Quality, frame generation and ray tracing off. This revision was tested without running the title. - Before, the pool census missed small-alignment blocks even when the live texture counters included them. The regression checks both pools, waits for a piece to be reclaimable, and checks that its block is counted once. A staging test checks bytes for a 16 MiB block. - `cargo test -p victory-gpu --features diagnostics --locked --lib pool::tests::` passed (31 passed, 3 ignored). The staged asset-policy check passed for both changed files. - The full diagnostics GPU library suite had the same three failures on clean main at `e1251c31` and on this PR, in `bgrx_plane_selects_a_typed_view` (#2646), `bindings_record_no_work` and `every_switch_of_the_translator_is_in_the_key` (#4296). The full-tree asset check also flags an unchanged test literal in `victory-shader/src/native.rs`. - Shader wave sizes are outside this change. ## Checked for overlap - [x] Searched open PRs for the same paths and counters. #3754 changes how room is estimated and #1562 changes pool sizing and eviction. This PR is for the measurements. Developed with Codex and reviewed with Claude Opus 5.5. After the upstream history rewrite, the final two-file patch was rebuilt on `7d93ee07`. At head `8e953903`, `cargo test --locked -p victory-gpu --features diagnostics --lib pool::tests -- --test-threads=1` passed with 31 passed and 3 hardware benchmarks ignored.
trustno1-coder commented 2026-12-01 18:48:52 +00:00 (Migrated from github.com)

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by trustno1-coder on 2026-12-01T18:48:52Z.


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.

<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:comment:7321596775 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/3766#issuecomment-7321596775). Originally posted by [trustno1-coder](https://github.com/trustno1-coder) on 2026-12-01T18:48:52Z. --- 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

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