GPU: make VICTORY_GPU_TIMING notes self-contained #3534

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

@⁠tharun-37 on GitHub · 2026-11-27 15:23 UTC · original
tharun-37:diagnostics/gpu-timing-notes → main · +45 −16 · 3 files · 1 commits · open

VICTORY_GPU_TIMING splits submissions into per-list executions and allocates timestamp queries, but command notes were gated on DRED. With DRED off, the timing switch had no commands to pair with those timestamps, so its slow-command report was empty.

This change records notes when either DRED or GPU timing is on. DRED-specific output is unchanged: shader traces and D3D12 marker commands remain DRED-only. A pure boolean helper in switch.rs has a truth-table test; no game data, captured output or hardware-specific values are involved.

Verification:

  • cargo clippy --workspace --all-targets --locked -- -D warnings passes.
  • cargo clippy -p victory-gpu --features diagnostics --all-targets --locked -- -D warnings passes.
  • cargo test -p victory-gpu --features diagnostics switch::tests: 5 passed, 0 failed.
  • cargo xtask policy: 191 files ok.
  • Full victory-gpu tests still have the same 3 pre-existing failures (244 passed, 3 failed, 1 ignored in that crate).

Claim: #1633

AI-assisted (OpenCode).

**@⁠tharun-37** on GitHub · 2026-11-27 15:23 UTC · [original](https://github.com/Marvisak/VIctory/pull/3534) `tharun-37:diagnostics/gpu-timing-notes` → `main` · +45 −16 · 3 files · 1 commits · open `VICTORY_GPU_TIMING` splits submissions into per-list executions and allocates timestamp queries, but command notes were gated on DRED. With DRED off, the timing switch had no commands to pair with those timestamps, so its slow-command report was empty. This change records notes when either DRED or GPU timing is on. DRED-specific output is unchanged: shader traces and D3D12 marker commands remain DRED-only. A pure boolean helper in `switch.rs` has a truth-table test; no game data, captured output or hardware-specific values are involved. Verification: - `cargo clippy --workspace --all-targets --locked -- -D warnings` passes. - `cargo clippy -p victory-gpu --features diagnostics --all-targets --locked -- -D warnings` passes. - `cargo test -p victory-gpu --features diagnostics switch::tests`: 5 passed, 0 failed. - `cargo xtask policy`: 191 files ok. - Full `victory-gpu` tests still have the same 3 pre-existing failures (244 passed, 3 failed, 1 ignored in that crate). Claim: https://git.gtahub.st/github/Marvisak--VIctory/issues/1633 AI-assisted (OpenCode).
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-27 15:32:22 +00:00
Author
Owner

@⁠andrewpozdnakov7-jpg on GitHub · 2026-11-27 18:42 UTC · original

I tested the command labels from two real D3D12 copies, one per list, on app-local WARP. Each list copied four bytes into a separate readback buffer. Both buffers returned the expected bytes in every run.

Source GPU timing DRED Command labels read from completed lists
14a950f On Unset 0
Combined commit On Unset 2, with resolved durations of 0.0224 and 0.0771 ms
Combined commit Off Unset 0

The combination keeps both exact PR heads, a684e32 and #3569 14a950f, and merges cleanly. With the temporary two-copy test removed, 247 GPU tests plus the SDK module check passed and one was ignored. Strict GPU Clippy with all features and the asset policy passed.

Next step is maintainer review. Please retain the Git authors on cherry-pick or rebase. If folding my integration into another commit, add Co-authored-by: andrewpozdnakov7-jpg <[email protected]>. AI-assisted with Codex.

**@⁠andrewpozdnakov7-jpg** on GitHub · 2026-11-27 18:42 UTC · [original](https://github.com/Marvisak/VIctory/pull/3534#issuecomment-7225773618) I tested the command labels from two real D3D12 copies, one per list, on app-local WARP. Each list copied four bytes into a separate readback buffer. Both buffers returned the expected bytes in every run. | Source | GPU timing | DRED | Command labels read from completed lists | | --- | --- | --- | --- | | `14a950f` | On | Unset | 0 | | [Combined commit](https://github.com/andrewpozdnakov7-jpg/VIctory/commit/54bc2c855d490064cd2e8c5c5c7e64c2bfde2fea) | On | Unset | 2, with resolved durations of 0.0224 and 0.0771 ms | | Combined commit | Off | Unset | 0 | The combination keeps both exact PR heads, `a684e32` and #3569 `14a950f`, and merges cleanly. With the temporary two-copy test removed, 247 GPU tests plus the SDK module check passed and one was ignored. Strict GPU Clippy with all features and the asset policy passed. Next step is maintainer review. Please retain the Git authors on cherry-pick or rebase. If folding my integration into another commit, add `Co-authored-by: andrewpozdnakov7-jpg <[email protected]>`. AI-assisted with Codex.
Author
Owner

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

Full-suite run on NVIDIA, since this PR has no test report yet. Tested exact head a684e32 (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.
  • notes_are_recorded_for_dred_or_timing only builds with the diagnostics feature, so the run above doesn't include it; it passes in cargo test -p victory-core -p victory-gpu -p victory-hle -p victory-loader -p victory-shader -p victory --lib --locked --features victory-core/diagnostics,victory-gpu/diagnostics,victory-hle/diagnostics,victory-loader/diagnostics,victory-shader/diagnostics,victory/diagnostics (same skips).
  • --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 20:20 UTC · [original](https://github.com/Marvisak/VIctory/pull/3534#issuecomment-7227407481) Full-suite run on NVIDIA, since this PR has no test report yet. Tested exact head `a684e32` (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**. - `notes_are_recorded_for_dred_or_timing` only builds with the `diagnostics` feature, so the run above doesn't include it; it passes in `cargo test -p victory-core -p victory-gpu -p victory-hle -p victory-loader -p victory-shader -p victory --lib --locked --features victory-core/diagnostics,victory-gpu/diagnostics,victory-hle/diagnostics,victory-loader/diagnostics,victory-shader/diagnostics,victory/diagnostics` (same skips). - `--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.
Author
Owner

@⁠andrewpozdnakov7-jpg on GitHub · 2026-11-27 23:03 UTC · original

I tested this change with VICTORY_GPU_TIMING=1 and DRED unset on app-local WARP. On exact a684e32, timestamps were present, but with 4,096 or 4,098 notes the last sample included a separately bracketed 1 MiB copy after the sampled prefix.

I resolved the one overlapping timestamp hunk with #3622 in e725e0a. It preserves both exact heads. The last sample now ends before the copy in both oversize cases. The 0, 1 and 4,095-note controls still end after it, and the copy bytes match across all cases. The combined diagnostics suite passed 247 repository tests and one SDK module-identity test, with one ignored. Strict all-feature GPU Clippy and the asset policy passed.

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

AI-assisted with OpenAI Codex.

**@⁠andrewpozdnakov7-jpg** on GitHub · 2026-11-27 23:03 UTC · [original](https://github.com/Marvisak/VIctory/pull/3534#issuecomment-7229836851) I tested this change with `VICTORY_GPU_TIMING=1` and DRED unset on app-local WARP. On exact `a684e32`, timestamps were present, but with 4,096 or 4,098 notes the last sample included a separately bracketed 1 MiB copy after the sampled prefix. I resolved the one overlapping timestamp hunk with #3622 in [`e725e0a`](https://github.com/andrewpozdnakov7-jpg/VIctory/commit/e725e0a0063a5235c3decf0ee01fc88996044c5f). It preserves both exact heads. The last sample now ends before the copy in both oversize cases. The 0, 1 and 4,095-note controls still end after it, and the copy bytes match across all cases. The combined diagnostics suite passed 247 repository tests and one SDK module-identity test, with one ignored. Strict all-feature GPU Clippy and the asset policy passed. Please keep the Git authors on cherry-pick or rebase, or add `Co-authored-by: andrewpozdnakov7-jpg <[email protected]>` if folding my integration into another commit. AI-assisted with OpenAI Codex.
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/3534/head:github-bot/gh-3534'
git switch 'github-bot/gh-3534'

Merge

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