GPU: count marked pages in frame write-back bytes #3598

Open
andrewpozdnakov7-jpg wants to merge 1 commit from upstream-pr/3598 into main
andrewpozdnakov7-jpg commented 2026-11-27 20:07:17 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by andrewpozdnakov7-jpg on 2026-11-27T20:07:17Z.


The frame's copy-back timer includes work on shader-marked pages and explicit ranges. Its byte counter currently adds only the explicit range writes. Add the bytes reported by the marked-page path and record the combined total once per submission.

Windows WARP submission Main byte counter Patched byte counter
One changed marked 64 KiB page 0 65,536
One 32-byte explicit write with withheld range controls 32 32

The existing assertions for shader-written bytes, neighbouring bytes, and withheld ranges passed on both revisions. The diagnostic marked pages line exposes the marked-byte component for #3590.

The test used the repository's synthetic shaders and buffers. The copy-back time includes range processing and submission callbacks as well as the writes.

Both named submissions passed with default features and diagnostics. The full diagnostics suite passed 246 project GPU tests plus the SDK identity check, with one ignored. Strict GPU Clippy passed with default and all features, and the asset policy check passed.

<!-- greyfinch-sync:Marvisak/VIctory:issue:5532476921 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/3598). Originally posted by [andrewpozdnakov7-jpg](https://github.com/andrewpozdnakov7-jpg) on 2026-11-27T20:07:17Z. --- The frame's copy-back timer includes work on shader-marked pages and explicit ranges. Its byte counter currently adds only the explicit range writes. Add the bytes reported by the marked-page path and record the combined total once per submission. | Windows WARP submission | Main byte counter | Patched byte counter | | --- | ---: | ---: | | One changed marked 64 KiB page | 0 | 65,536 | | One 32-byte explicit write with withheld range controls | 32 | 32 | The existing assertions for shader-written bytes, neighbouring bytes, and withheld ranges passed on both revisions. The diagnostic `marked pages` line exposes the marked-byte component for #3590. The test used the repository's synthetic shaders and buffers. The copy-back time includes range processing and submission callbacks as well as the writes. Both named submissions passed with default features and diagnostics. The full diagnostics suite passed 246 project GPU tests plus the SDK identity check, with one ignored. Strict GPU Clippy passed with default and all features, and the asset policy check passed.
andrewpozdnakov7-jpg commented 2026-11-27 20:10:20 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by andrewpozdnakov7-jpg on 2026-11-27T20:10:20Z.


Windows CI passed on 4567d54a06f875b385603bfb954f8e8b8c188647. CI job

In the same Windows WARP synthetic submission, the marked page was written on both revisions. The frame byte counter recorded 0 on the parent and 65,536 on the patch. The explicit-range submission reported 32 bytes on both revisions, with the withheld controls and byte assertions passing. The patched tests ran with both default features and diagnostics. The next step is maintainer review.

If you cherry-pick or rebase this commit, please retain its Git author. If you fold it into another commit, please include Co-authored-by: andrewpozdnakov7-jpg <[email protected]>.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7227243729 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/3598#issuecomment-7227243729). Originally posted by [andrewpozdnakov7-jpg](https://github.com/andrewpozdnakov7-jpg) on 2026-11-27T20:10:20Z. --- Windows CI passed on `4567d54a06f875b385603bfb954f8e8b8c188647`. [CI job](https://github.com/Marvisak/VIctory/actions/runs/46061425042/job/140716355525) In the same Windows WARP synthetic submission, the marked page was written on both revisions. The frame byte counter recorded 0 on the parent and 65,536 on the patch. The explicit-range submission reported 32 bytes on both revisions, with the withheld controls and byte assertions passing. The patched tests ran with both default features and diagnostics. The next step is maintainer review. If you cherry-pick or rebase this commit, please retain its Git author. If you fold it into another commit, please include `Co-authored-by: andrewpozdnakov7-jpg <[email protected]>`.
futurepro62 commented 2026-11-29 17:45:34 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by futurepro62 on 2026-11-29T17:45:34Z.


Full-suite run on NVIDIA, since this PR has no test report yet. Tested exact head 4567d54 (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: 866 passed, 0 failed, 10 ignored.
  • No new #[test] functions in the diff.
  • --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.
<!-- greyfinch-sync:Marvisak/VIctory:comment:7259942403 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/3598#issuecomment-7259942403). Originally posted by [futurepro62](https://github.com/futurepro62) on 2026-11-29T17:45:34Z. --- Full-suite run on NVIDIA, since this PR has no test report yet. Tested exact head `4567d54` (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`: **866 passed, 0 failed, 10 ignored**. - No new `#[test]` functions in the diff. - `--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 cannot be merged automatically due to conflicts.
Merge manually to resolve the conflicts.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin 'upstream-pr/3598:upstream-pr/3598'
git switch 'upstream-pr/3598'

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch 'main'
git merge --no-ff 'upstream-pr/3598'
git switch 'upstream-pr/3598'
git rebase 'main'
git switch 'main'
git merge --ff-only 'upstream-pr/3598'
git switch 'upstream-pr/3598'
git rebase 'main'
git switch 'main'
git merge --no-ff 'upstream-pr/3598'
git switch 'main'
git merge --squash 'upstream-pr/3598'
git switch 'main'
git merge --ff-only 'upstream-pr/3598'
git switch 'main'
git merge 'upstream-pr/3598'
git push origin 'main'
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
Marvisak/VIctory!3598
No description provided.