GPU: report staged texture bytes in the frame line #3461

Open
github-bot wants to merge 1 commit from github-bot/gh-3461 into main AGit
Owner

@⁠tharun-37 on GitHub · 2026-11-27 03:40 UTC · original
tharun-37:fix/texture-counter-attribution → main · +120 −7 · 2 files · 1 commits · open

Summary

  • Make the frame line's texture byte counter report bytes actually staged for upload.
  • Report zero for unchanged digest checks and failed staging allocations; for tracked textures, count only the changed subresources that were staged.
  • Add regression tests for unchanged refreshes and per-subresource byte accounting.

Current main already skips uploading unchanged texture contents, but the frame line's textures ... MB value included bytes read only to check whether content changed. This makes that diagnostic reflect upload traffic rather than change-detection traffic.

Fixes #3269

Verification

  • cargo test -p victory-gpu texture::tests
  • cargo test -p victory-gpu --features diagnostics texture::tests
  • cargo clippy -p victory-gpu --all-targets -- -D warnings
  • cargo clippy -p victory-gpu --all-targets --features diagnostics -- -D warnings
  • cargo test -p victory-gpu — 230 passed, 1 ignored; 3 failures reproduced on base 63bcca4
**@⁠tharun-37** on GitHub · 2026-11-27 03:40 UTC · [original](https://github.com/Marvisak/VIctory/pull/3461) `tharun-37:fix/texture-counter-attribution` → `main` · +120 −7 · 2 files · 1 commits · open ## Summary - Make the frame line's texture byte counter report bytes actually staged for upload. - Report zero for unchanged digest checks and failed staging allocations; for tracked textures, count only the changed subresources that were staged. - Add regression tests for unchanged refreshes and per-subresource byte accounting. Current main already skips uploading unchanged texture contents, but the frame line's `textures ... MB` value included bytes read only to check whether content changed. This makes that diagnostic reflect upload traffic rather than change-detection traffic. Fixes #3269 ## Verification - `cargo test -p victory-gpu texture::tests` - `cargo test -p victory-gpu --features diagnostics texture::tests` - `cargo clippy -p victory-gpu --all-targets -- -D warnings` - `cargo clippy -p victory-gpu --all-targets --features diagnostics -- -D warnings` - `cargo test -p victory-gpu` — 230 passed, 1 ignored; 3 failures reproduced on base `63bcca4`
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-27 03:41:13 +00:00
Author
Owner

@⁠oni-swr on GitHub · 2026-11-27 04:10 UTC · original

WARP test report for #3461 (AI-assisted (Claude), claimed on #1633 comment 7209455899)

  • Environment: Windows 11 Pro 10.0.26200, WARP adapter (d3d10warp.dll 10.0.26100.9818, VICTORY_WARP=1 VICTORY_D3D12_WARP=1), rustc 1.98.1 / cargo 1.98.1, Windows SDK 10.0.26100 dxil.dll via VICTORY_DXIL, cargo test -j 4 -p <crate> --lib --locked -- --test-threads=1. No GPU hardware used. No game files involved.
  • Base: origin/main 63bcca43c6a00a758510398fa43096ce7e4f7df0; head 9192ff2341b6b5d78a7d36b71f677f74d183fbb9 (already contains this main; merge is a fast-forward, tested tree equals head).
  • victory-gpu lib: main 231 passed / 0 failed / 1 ignored -> head 233 passed / 0 failed / 1 ignored. The 2 new tests (an_unchanged_texture_reports_no_staged_bytes, staged_size_counts_only_the_subresources_passed) pass. No regressions.
  • Review notes: refresh_now now returns staged bytes (0 when nothing changed or the detile fails) instead of bytes read, so the frame line's texture byte count drops for unchanged textures by design. TexWatched/TexHashed diagnostics still count bytes read. Not covered by tests: the watched-pages path (staged_size is only unit-tested directly, and the unchanged test uses the hash path). Not checked here: a real-title frame line. No concerns.
**@⁠oni-swr** on GitHub · 2026-11-27 04:10 UTC · [original](https://github.com/Marvisak/VIctory/pull/3461#issuecomment-7209583521) **WARP test report for #3461** (AI-assisted (Claude), claimed on #1633 comment 7209455899) - Environment: Windows 11 Pro 10.0.26200, WARP adapter (d3d10warp.dll 10.0.26100.9818, `VICTORY_WARP=1 VICTORY_D3D12_WARP=1`), rustc 1.98.1 / cargo 1.98.1, Windows SDK 10.0.26100 `dxil.dll` via `VICTORY_DXIL`, `cargo test -j 4 -p <crate> --lib --locked -- --test-threads=1`. No GPU hardware used. No game files involved. - Base: origin/main `63bcca43c6a00a758510398fa43096ce7e4f7df0`; head `9192ff2341b6b5d78a7d36b71f677f74d183fbb9` (already contains this main; merge is a fast-forward, tested tree equals head). - `victory-gpu` lib: main **231 passed / 0 failed / 1 ignored** -> head **233 passed / 0 failed / 1 ignored**. The 2 new tests (`an_unchanged_texture_reports_no_staged_bytes`, `staged_size_counts_only_the_subresources_passed`) pass. No regressions. - Review notes: `refresh_now` now returns staged bytes (0 when nothing changed or the detile fails) instead of bytes read, so the frame line's texture byte count drops for unchanged textures by design. `TexWatched`/`TexHashed` diagnostics still count bytes read. Not covered by tests: the watched-pages path (`staged_size` is only unit-tested directly, and the unchanged test uses the hash path). Not checked here: a real-title frame line. No concerns.
Author
Owner

@⁠cloph-dsp on GitHub · 2026-11-27 04:37 UTC · original

Independent CPU-only verification on Windows (Rust 1.100.0/MSVC, worktree-local CARGO_TARGET_DIR, CARGO_BUILD_JOBS=2, no game data).

  • PR head 9192ff2341b6b5d78a7d36b71f677f74d183fbb9, base/merge base 63bcca4.
  • cargo test --locked -p victory-gpu --lib -- texture::tests::an_unchanged_texture_reports_no_staged_bytes --exact --test-threads=1 --quiet -> test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 233 filtered out.
  • cargo test --locked -p victory-gpu --lib -- texture::tests::staged_size_counts_only_the_subresources_passed --exact --test-threads=1 --quiet -> same, 1 passed/233 filtered.
  • Negative controls: both new test names absent on 63bcca4 (git grep -c -F -> exit 1).
  • git diff --check 63bcca4 HEAD -> clean.

Note: only the two named synthetic tests were replayed; the full crate suite was not run. GPU/driver: N/A (CPU-only Staging bookkeeping). AI-assisted (Hy4 flash). No game data, assets, extracted shaders or DRM involved.

**@⁠cloph-dsp** on GitHub · 2026-11-27 04:37 UTC · [original](https://github.com/Marvisak/VIctory/pull/3461#issuecomment-7209945796) Independent CPU-only verification on Windows (Rust 1.100.0/MSVC, worktree-local `CARGO_TARGET_DIR`, `CARGO_BUILD_JOBS=2`, no game data). - PR head `9192ff2341b6b5d78a7d36b71f677f74d183fbb9`, base/merge base `63bcca4`. - `cargo test --locked -p victory-gpu --lib -- texture::tests::an_unchanged_texture_reports_no_staged_bytes --exact --test-threads=1 --quiet` -> `test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 233 filtered out`. - `cargo test --locked -p victory-gpu --lib -- texture::tests::staged_size_counts_only_the_subresources_passed --exact --test-threads=1 --quiet` -> same, 1 passed/233 filtered. - Negative controls: both new test names absent on `63bcca4` (`git grep -c -F` -> exit 1). - `git diff --check 63bcca4 HEAD` -> clean. Note: only the two named synthetic tests were replayed; the full crate suite was not run. GPU/driver: N/A (CPU-only `Staging` bookkeeping). AI-assisted (Hy4 flash). No game data, assets, extracted shaders or DRM involved.
Author
Owner

@⁠futurepro62 on GitHub · 2026-11-27 09:17 UTC · original

NVIDIA full-suite run, to go with the reports above by cloph-dsp, oni-swr, since none of them names a GPU run. Tested exact head 9192ff2 (on its base 63bcca4).

Tested

  • NVIDIA GeForce RTX 5070 Ti 16 GB (Blackwell, 32-lane waves only, mesh shaders), driver 621.40, Ryzen 7 9800X3D, Windows 11 Home 26300, Rust 1.98.1 MSVC (pinned), dxil.dll from Windows SDK 10.0.26100 (the loader's default), debug.
  • cargo build --workspace --locked, then cargo test --workspace --locked --no-fail-fast -- --test-threads=4 --skip emit::memory_tests::heap_direct_texture_reads_mark_their_heap_index --skip descriptor::host::tests::dynamic_slots_are_held_until_released --skip memory::tests::lists_share_a_table_and_copies_keep_their_views --skip emit::stride_tests::a_heap_buffer_read_by_element_takes_the_views_stride --skip emit::stride_tests::a_heap_buffer_read_where_no_buffer_view_is_reads_zeros --skip emit::synthetic_tests::gathers_at_a_level_match_the_hardware: 868 passed, 0 failed, 10 ignored.
  • The new tests ran and passed: an_unchanged_texture_reports_no_staged_bytes, staged_size_counts_only_the_subresources_passed.
  • --skip leaves out tests that fail on main 63bcca4 on this card too, not because of this PR: heap_direct_texture_reads_mark_their_heap_index ends the victory-shader test process with 0xc0000005 (#2571), so without the skip the rest of that crate never reports; dynamic_slots_are_held_until_released, lists_share_a_table_and_copies_keep_their_views and the two stride_tests hit the 1,000,000-view heap cap of NVIDIA drivers (#1835, #2317); gathers_at_a_level_match_the_hardware fails on lane 0 (#1744).

Not tested

  • AMD (the tests take the default adapter), a release build, the title (test run only).

AI use

  • Claude Code (Claude Opus 5.5) ran the tests and wrote this report. I checked it before posting.
**@⁠futurepro62** on GitHub · 2026-11-27 09:17 UTC · [original](https://github.com/Marvisak/VIctory/pull/3461#issuecomment-7214507028) NVIDIA full-suite run, to go with the reports above by cloph-dsp, oni-swr, since none of them names a GPU run. Tested exact head `9192ff2` (on its base `63bcca4`). **Tested** - NVIDIA GeForce RTX 5070 Ti 16 GB (Blackwell, 32-lane waves only, mesh shaders), driver 621.40, Ryzen 7 9800X3D, Windows 11 Home 26300, Rust 1.98.1 MSVC (pinned), `dxil.dll` from Windows SDK 10.0.26100 (the loader's default), debug. - `cargo build --workspace --locked`, then `cargo test --workspace --locked --no-fail-fast -- --test-threads=4 --skip emit::memory_tests::heap_direct_texture_reads_mark_their_heap_index --skip descriptor::host::tests::dynamic_slots_are_held_until_released --skip memory::tests::lists_share_a_table_and_copies_keep_their_views --skip emit::stride_tests::a_heap_buffer_read_by_element_takes_the_views_stride --skip emit::stride_tests::a_heap_buffer_read_where_no_buffer_view_is_reads_zeros --skip emit::synthetic_tests::gathers_at_a_level_match_the_hardware`: **868 passed, 0 failed, 10 ignored**. - The new tests ran and passed: `an_unchanged_texture_reports_no_staged_bytes`, `staged_size_counts_only_the_subresources_passed`. - `--skip` leaves out tests that fail on main `63bcca4` on this card too, not because of this PR: `heap_direct_texture_reads_mark_their_heap_index` ends the `victory-shader` test process with `0xc0000005` (#2571), so without the skip the rest of that crate never reports; `dynamic_slots_are_held_until_released`, `lists_share_a_table_and_copies_keep_their_views` and the two `stride_tests` hit the 1,000,000-view heap cap of NVIDIA drivers (#1835, #2317); `gathers_at_a_level_match_the_hardware` fails on lane 0 (#1744). **Not tested** - AMD (the tests take the default adapter), a release build, the title (test run only). **AI use** - Claude Code (Claude Opus 5.5) ran the tests and wrote this report. I checked it before posting.
This pull request can be merged automatically.
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/3461/head:github-bot/gh-3461'
git switch 'github-bot/gh-3461'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-3461'
git switch 'github-bot/gh-3461'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-3461'
git switch 'github-bot/gh-3461'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-3461'
git switch 'main'
git merge --squash 'github-bot/gh-3461'
git switch 'main'
git merge --ff-only 'github-bot/gh-3461'
git switch 'main'
git merge 'github-bot/gh-3461'
git push origin 'main'
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!3461
No description provided.