GPU timing: report command notes beyond the query budget #3661

Open
andrewpozdnakov7-jpg wants to merge 1 commit from upstream-pr/3661 into main
andrewpozdnakov7-jpg commented 2026-11-28 03:55:42 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by andrewpozdnakov7-jpg on 2026-11-28T03:55:42Z.


Change

Report command notes beyond the 4,095-per-list timestamp budget in the GPU timing window. This exposes cases in which the recorded notes exceed the capacity of the timestamp heap, as discussed after the matched hardware report in #3590.

The count comes from the notes and the reserved query budget. A failed readback can leave sample times unavailable, and the query budget count still describes the note length.

Verification

  • Exact-source fixture with simulated timestamp buffers covers 0, 4,094, 4,095, 4,096 and 4,098 notes, plus missing and failed readback. The two over-capacity lists report four notes beyond the budget in one window.
  • A following window at the limit prints the regular report. Sample totals, ranking and wall-time formatting remain consistent with the supplied timestamps.
  • Asset policy passed for 191 files.

AI-assisted with OpenAI Codex.

<!-- greyfinch-sync:Marvisak/VIctory:issue:5536429664 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/3661). Originally posted by [andrewpozdnakov7-jpg](https://github.com/andrewpozdnakov7-jpg) on 2026-11-28T03:55:42Z. --- ## Change Report command notes beyond the 4,095-per-list timestamp budget in the GPU timing window. This exposes cases in which the recorded notes exceed the capacity of the timestamp heap, as discussed after the [matched hardware report in #3590](https://github.com/Marvisak/VIctory/issues/3590#issuecomment-7233425300). The count comes from the notes and the reserved query budget. A failed readback can leave sample times unavailable, and the query budget count still describes the note length. ## Verification - Exact-source fixture with simulated timestamp buffers covers 0, 4,094, 4,095, 4,096 and 4,098 notes, plus missing and failed readback. The two over-capacity lists report four notes beyond the budget in one window. - A following window at the limit prints the regular report. Sample totals, ranking and wall-time formatting remain consistent with the supplied timestamps. - Asset policy passed for 191 files. AI-assisted with OpenAI Codex.
andrewpozdnakov7-jpg commented 2026-11-28 04:01:07 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by andrewpozdnakov7-jpg on 2026-11-28T04:01:07Z.


Verified 5368be155e6efb6ce0e876172271a3a9c9da3231 on Windows CI. The exact-source check distinguished the query budget from sample availability using generated timestamp data and verified the report reset.

The integration with #3534 and #3651 exercised actual D3D12 timestamp queries on app-local WARP with DRED off. Four submitted lists with 0, 4,095, 4,096 and 4,098 notes returned 0, 0, 1 and 3 notes beyond the budget. All four synthetic copy results matched.

Please retain the Git author on cherry-pick or rebase, or add Co-authored-by: andrewpozdnakov7-jpg <[email protected]> if folding the change into another commit.

AI-assisted with OpenAI Codex.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7233603814 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/3661#issuecomment-7233603814). Originally posted by [andrewpozdnakov7-jpg](https://github.com/andrewpozdnakov7-jpg) on 2026-11-28T04:01:07Z. --- Verified `5368be155e6efb6ce0e876172271a3a9c9da3231` on [Windows CI](https://github.com/Marvisak/VIctory/actions/runs/46105148253/job/140856113713). The exact-source check distinguished the query budget from sample availability using generated timestamp data and verified the report reset. The [integration with #3534 and #3651](https://github.com/Marvisak/VIctory/pull/3534#issuecomment-7233596292) exercised actual D3D12 timestamp queries on app-local WARP with DRED off. Four submitted lists with 0, 4,095, 4,096 and 4,098 notes returned 0, 0, 1 and 3 notes beyond the budget. All four synthetic copy results matched. Please retain the Git author on cherry-pick or rebase, or add `Co-authored-by: andrewpozdnakov7-jpg <[email protected]>` if folding the change into another commit. AI-assisted with OpenAI Codex.
andrewpozdnakov7-jpg commented 2026-11-28 04:03:20 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by andrewpozdnakov7-jpg on 2026-11-28T04:03:20Z.


I resolved the overlap with #3313, #3622 and #3650 in 34454e1. The branch preserves all four PR heads. It keeps the single-list reporting path and counts out-of-budget notes even when command timestamps are unavailable.

I checked the terminal timestamp in addition to the counts already reported in #3534. In a standalone WARP 1.0.22 probe, each D3D12 list was submitted on its own and used the merged recording, readback and reporting methods. A separate query heap bracketed a generated 1 MiB copy. At 0, 1, 4,094 and 4,095 notes, the terminal timestamp fell after the copy. At 4,096 and 4,098 it fell before the copy, with 4,095 measured intervals and respectively 1 and 3 notes beyond the limit. All seven copies returned the expected bytes.

The 4,098-note list still reported 3 over-budget notes when I supplied an unavailable timestamp frequency to the reader. A new reporting window containing a two-note list showed two intervals and no coverage warning. All five isolated tests passed. This covers the exact timing methods with actual WARP queries. The merged workspace was outside this run.

Please retain the Git authors on cherry-pick or rebase, or add Co-authored-by: andrewpozdnakov7-jpg <[email protected]> if folding this resolution into another commit.

AI-assisted with OpenAI Codex.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7233638758 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/3661#issuecomment-7233638758). Originally posted by [andrewpozdnakov7-jpg](https://github.com/andrewpozdnakov7-jpg) on 2026-11-28T04:03:20Z. --- I resolved the overlap with #3313, #3622 and #3650 in [`34454e1`](https://github.com/andrewpozdnakov7-jpg/VIctory/commit/34454e14f199d47c317fbda21bdf36b214229c3c). The branch preserves all four PR heads. It keeps the single-list reporting path and counts out-of-budget notes even when command timestamps are unavailable. I checked the terminal timestamp in addition to the counts already reported in #3534. In a standalone WARP 1.0.22 probe, each D3D12 list was submitted on its own and used the merged recording, readback and reporting methods. A separate query heap bracketed a generated 1 MiB copy. At 0, 1, 4,094 and 4,095 notes, the terminal timestamp fell after the copy. At 4,096 and 4,098 it fell before the copy, with 4,095 measured intervals and respectively 1 and 3 notes beyond the limit. All seven copies returned the expected bytes. The 4,098-note list still reported 3 over-budget notes when I supplied an unavailable timestamp frequency to the reader. A new reporting window containing a two-note list showed two intervals and no coverage warning. All five isolated tests passed. This covers the exact timing methods with actual WARP queries. The merged workspace was outside this run. Please retain the Git authors on cherry-pick or rebase, or add `Co-authored-by: andrewpozdnakov7-jpg <[email protected]>` if folding this resolution into another commit. AI-assisted with OpenAI Codex.
futurepro62 commented 2026-11-29 23:09:22 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by futurepro62 on 2026-11-29T23:09:22Z.


Full-suite run on NVIDIA, since this PR has no test report yet. Tested exact head 5368be1 (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:7264239983 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/3661#issuecomment-7264239983). Originally posted by [futurepro62](https://github.com/futurepro62) on 2026-11-29T23:09:22Z. --- Full-suite run on NVIDIA, since this PR has no test report yet. Tested exact head `5368be1` (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.
passerbyyhx commented 2026-11-30 23:21:06 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by passerbyyhx on 2026-11-30T23:21:06Z.


Native timestamp boundary check on 5368be155e6efb6ce0e876172271a3a9c9da3231, RTX 4090 Laptop GPU and Microsoft WARP. Lists with 4,094 / 4,095 / 4,096 copy notes recorded 4,094 / 4,095 / 4,095 and reported 0 / 0 / 1 omitted. The final recorded timestamp was written and the last actual copy's bytes were checked even in the overflow case. No D3D12 debug-layer warnings or errors occurred during those measured windows. Adjacent timestamps can be equal on the 4090; the check uses the resolved query and copied data rather than requiring a strictly positive interval.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7295014687 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/3661#issuecomment-7295014687). Originally posted by [passerbyyhx](https://github.com/passerbyyhx) on 2026-11-30T23:21:06Z. --- Native timestamp boundary check on `5368be155e6efb6ce0e876172271a3a9c9da3231`, RTX 4090 Laptop GPU and Microsoft WARP. Lists with 4,094 / 4,095 / 4,096 copy notes recorded 4,094 / 4,095 / 4,095 and reported 0 / 0 / 1 omitted. The final recorded timestamp was written and the last actual copy's bytes were checked even in the overflow case. No D3D12 debug-layer warnings or errors occurred during those measured windows. Adjacent timestamps can be equal on the 4090; the check uses the resolved query and copied data rather than requiring a strictly positive interval.
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/3661:upstream-pr/3661'
git switch 'upstream-pr/3661'

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