GPU: count explicit copy-back ranges in frame diagnostics #3594

Open
andrewpozdnakov7-jpg wants to merge 1 commit from upstream-pr/3594 into main
andrewpozdnakov7-jpg commented 2026-11-27 19:46:38 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by andrewpozdnakov7-jpg on 2026-11-27T19:46:38Z.


Adds one line to the existing diagnostics frame report for the measurement requested in #3590. It counts explicit buffer ranges after the submission has deduplicated them. The three averages are ranges eligible for copy-back, eligible ranges whose copy-back reported bytes written, and withheld ranges. The existing marked-page counts, bytes and timings stay in their current lines.

I verified the report through the Windows WARP submission path. The synthetic command list declares two eligible ranges, one duplicate declaration and two withheld ranges. One eligible range writes bytes. A two-frame reporting window prints 1.0 eligible, 0.5 wrote bytes and 1.0 withheld. The next window prints zero for all three. The existing byte assertions pass on both revisions, and the parent emits no range line.

This is instrumentation for the timing report in #3590. The measurement uses synthetic buffers and preserves the copy-back decisions.

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

<!-- greyfinch-sync:Marvisak/VIctory:issue:5532254822 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/3594). Originally posted by [andrewpozdnakov7-jpg](https://github.com/andrewpozdnakov7-jpg) on 2026-11-27T19:46:38Z. --- Adds one line to the existing diagnostics frame report for the measurement requested in #3590. It counts explicit buffer ranges after the submission has deduplicated them. The three averages are ranges eligible for copy-back, eligible ranges whose copy-back reported bytes written, and withheld ranges. The existing marked-page counts, bytes and timings stay in their current lines. I verified the report through the Windows WARP submission path. The synthetic command list declares two eligible ranges, one duplicate declaration and two withheld ranges. One eligible range writes bytes. A two-frame reporting window prints 1.0 eligible, 0.5 wrote bytes and 1.0 withheld. The next window prints zero for all three. The existing byte assertions pass on both revisions, and the parent emits no range line. This is instrumentation for the timing report in #3590. The measurement uses synthetic buffers and preserves the copy-back decisions. The full local diagnostics GPU suite passed 246 project tests plus the SDK identity check, with one ignored. Strict GPU Clippy passed for default and all features, and the asset policy check passed.
andrewpozdnakov7-jpg commented 2026-11-27 19:54:38 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by andrewpozdnakov7-jpg on 2026-11-27T19:54:38Z.


On 377cd2d5d9935bb1406084e2b8edf751555f0f9e, the Windows WARP diagnostics run confirmed the new line end to end. A two-frame window with two eligible ranges, one range that wrote bytes, two withheld ranges and a duplicate prints 1.0 eligible, 0.5 wrote bytes, 1.0 withheld. The next window reports zero for all three. The 246 project GPU tests and the SDK identity check passed, with one ignored. Strict GPU Clippy passed in both feature configurations.

The default-feature Windows CI run stopped at views_bound_while_another_slot_gets_its_texture_do_not_wait with the assertion both made. #2585 and #2861 document the same failure in parallel test runs. All the new code is gated on diagnostics. Matched local default-feature runs with four test threads passed 231 project GPU tests plus the WARP SDK identity check on both the parent and this head, with one ignored on each. The local fixture selected WARP explicitly. CI failure

GitHub requires repository admin rights to rerun this job. The next step is a maintainer rerun or review of the existing test-only fix.

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:7226989095 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/3594#issuecomment-7226989095). Originally posted by [andrewpozdnakov7-jpg](https://github.com/andrewpozdnakov7-jpg) on 2026-11-27T19:54:38Z. --- On `377cd2d5d9935bb1406084e2b8edf751555f0f9e`, the Windows WARP diagnostics run confirmed the new line end to end. A two-frame window with two eligible ranges, one range that wrote bytes, two withheld ranges and a duplicate prints `1.0 eligible, 0.5 wrote bytes, 1.0 withheld`. The next window reports zero for all three. The 246 project GPU tests and the SDK identity check passed, with one ignored. Strict GPU Clippy passed in both feature configurations. The default-feature Windows CI run stopped at `views_bound_while_another_slot_gets_its_texture_do_not_wait` with the assertion `both made`. #2585 and #2861 document the same failure in parallel test runs. All the new code is gated on diagnostics. Matched local default-feature runs with four test threads passed 231 project GPU tests plus the WARP SDK identity check on both the parent and this head, with one ignored on each. The local fixture selected WARP explicitly. [CI failure](https://github.com/Marvisak/VIctory/actions/runs/46059061697/job/140708596804) GitHub requires repository admin rights to rerun this job. The next step is a maintainer rerun or review of the existing test-only fix. 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]>`.
andrewpozdnakov7-jpg commented 2026-11-27 20:13:52 +00:00 (Migrated from github.com)

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


I combined the exact #3594 and #3598 commits for the timing follow-up in #3590. The two patches overlap in Host::execute. Tested pair records the explicit range counts and the combined byte total while processing each range once.

On Windows WARP, the marked shader write reports 65,536 bytes and the explicit write reports 32 bytes. The two-frame fixture with a duplicate, an unchanged range and withheld ranges still reports 1.0 eligible, 0.5 wrote bytes and 1.0 withheld. The following window reports zero for all three. The synthetic byte checks passed.

The full diagnostics suite passed 246 project GPU tests plus the SDK identity check, with one ignored. Strict GPU Clippy passed in both feature configurations, and the asset policy check passed.

The pair can be used to collect both measurements in #3590. Please retain Git authors on cherry-pick or rebase. If you fold my work into another commit, please include Co-authored-by: andrewpozdnakov7-jpg <[email protected]>.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7227301577 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/3594#issuecomment-7227301577). Originally posted by [andrewpozdnakov7-jpg](https://github.com/andrewpozdnakov7-jpg) on 2026-11-27T20:13:52Z. --- I combined the exact #3594 and #3598 commits for the timing follow-up in #3590. The two patches overlap in `Host::execute`. [Tested pair](https://github.com/andrewpozdnakov7-jpg/VIctory/commit/e7fc3fba4066f4306537fd7ccc45d17b532455d3) records the explicit range counts and the combined byte total while processing each range once. On Windows WARP, the marked shader write reports 65,536 bytes and the explicit write reports 32 bytes. The two-frame fixture with a duplicate, an unchanged range and withheld ranges still reports 1.0 eligible, 0.5 wrote bytes and 1.0 withheld. The following window reports zero for all three. The synthetic byte checks passed. The full diagnostics suite passed 246 project GPU tests plus the SDK identity check, with one ignored. Strict GPU Clippy passed in both feature configurations, and the asset policy check passed. The pair can be used to collect both measurements in #3590. Please retain Git authors on cherry-pick or rebase. If you fold my work into another commit, please include `Co-authored-by: andrewpozdnakov7-jpg <[email protected]>`.
futurepro62 commented 2026-11-29 17:17:05 +00:00 (Migrated from github.com)

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


Full-suite run on NVIDIA, since this PR has no test report yet. Tested exact head 377cd2d (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:7259568772 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/3594#issuecomment-7259568772). Originally posted by [futurepro62](https://github.com/futurepro62) on 2026-11-29T17:17:05Z. --- Full-suite run on NVIDIA, since this PR has no test report yet. Tested exact head `377cd2d` (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/3594:upstream-pr/3594'
git switch 'upstream-pr/3594'

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