GPU: count single-list submissions in the GPU timing summary #3313
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/3313"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from Marvisak/VIctory. Originally posted by neonbyte1 on 2026-11-26T17:08:11Z.
VICTORY_GPU_TIMING=1splits a host submission into one group per host list, butgpu_times()ran only when a submission had more than one group. A submission with exactly one host list was counted in the fps line'son the GPU, but was missing fromGPU timing: lists ... their commands ....This change:
calls
gpu_times()whenever timing is on, including for single-list submissions. The slow-list and device-removed checks still apply only to multi-list submissions, which is what they're about.reads the preparing/GPU/copy-back counters in the 5 s block where
log_gpu_times()runs, so those parts of the fps line and theGPU timingline cover the same frames. Before, those counters were swapped every ~1 s.fps,ms/frameanddraws/frameon that line still describe the last 1 s.(by @andrewpozdnakov7-jpg,
7592bb4) records the timestamp queries and labels whenever timing is on, not only with DRED, soVICTORY_GPU_TIMING=1alone gives per-command times. The GPU breadcrumb markers stay DRED-only, and with DRED on the path is unchanged. It also adds an opt-in WARP test (timing_report_uses_each_submitted_list, ignored by default).Nothing changes when timing is off: then each submission is a single group, and that path is untouched.
Measured on an RTX 5090 under Wine (vkd3d-proton), GTA VI's opening yard. The build is
mainplus a few unmerged PRs that this setup needs, with this commit cherry-picked unchanged:GPU timing: listson the GPUWithout the change, about 100 ms/frame of GPU work (≈9.5 single-list submissions per frame in a diagnostics count) was missing from the timing summary and its per-command breakdown. The two runs measure different builds, so compare the gap within each row, not the absolute numbers.
Thanks to @Ingenioeren, who independently found the same single-list gap on WARP in #3028.
Tested:
cargo clippy --workspace --all-targets -D warnings, with and without--features diagnostics, andcargo xtask policy: all clean.There's no unit test: the condition sits in
Host::executeafterExecuteCommandListsand a fence wait, andHostList::slowest()reads DRED timestamps from a live GPU.AI-assisted (Claude); measured on my machine, no game data shared.
Imported from Marvisak/VIctory. Originally posted by Dukestar69 on 2026-11-26T17:29:50Z.
Review: APPROVED
Reviewed the diff and verified locally on Windows 11 x64 (RTX 5090):
gpu_timeswithif timing()instead ofif groups.len() > 1includes single-list submissions inGPU timing, and moving theSUBMISSION_US/PREPARING/COPY_BACKswaps into the 5-secondreport_frameswindow keeps both summary lines aligned to the same frames.cargo test -p victory-gpu --lib host::tests:: -- --test-threads=1(RTX 5090): 12 passed, 0 failed.cargo clippy -p victory-gpu --all-targets -- -D warnings: clean.cargo clippy -p victory-gpu --features diagnostics --all-targets -- -D warnings: clean.cargo xtask policy: 191 files ok.Synthetic tests only (no game files used). AI-assisted (Gemini 4 Neon).
Imported from Marvisak/VIctory. Originally posted by andrewpozdnakov7-jpg on 2026-11-26T17:46:44Z.
I checked the single-list timing path on exact
b3d738awith a synthetic WARP copy workload. WithVICTORY_GPU_TIMING=1and DRED enabled, the PR records 2 commands for one list, 4 for two lists, and 4 for the same list submitted twice. With DRED off, it records the list wall time, but all three command counts are zero becauseHostList::notestill gates the timestamp labels on DRED.Follow-up
003f1e2records the timestamp queries and labels whenever timing is on, with the GPU breadcrumb markers still gated on DRED. The same copy readbacks and counts passed in three fresh runs per DRED setting on verified app-local Agility 1.620.2/WARP 1.0.22. With both flags disabled, the full diagnostics suite passed 247 tests with 2 ignored, including the opt-in timing test. Strict Clippy in both configurations and asset policy passed. This uses the copy fixture from the earlier #1735 investigation.@neonbyte1 the patch is directly on your head if you want to take it. Please retain its Git author on cherry-pick, or add
Co-authored-by: andrewpozdnakov7-jpg <[email protected]>if folding it into another commit. AI-assisted with Codex.Imported from Marvisak/VIctory. Originally posted by neonbyte1 on 2026-11-26T17:49:32Z.
@andrewpozdnakov7-jpg thanks, good find. I took your commit as is, keeping you as author:
7592bb4on the PR branch, and the PR description now mentions it.I checked it before pushing: with DRED on,
note()does exactly what it did before (timestamp, marker, label), so the in-game numbers above still hold. With DRED off, the timestamps and labels are recorded without the markers, which is what timing needs. Clippy--workspace --all-targets -D warningspasses with and withoutdiagnostics, as do the policy check and formatting.This also means the README note from #1703 (per-command times need DRED) no longer applies once this lands.
AI-assisted (Claude); measured on my machine, no game data shared.
Imported from Marvisak/VIctory. Originally posted by borosf on 2026-11-26T19:03:39Z.
Independent local verification on Windows 11 x64, Intel Arc B580 12 GB (12 cores), at this PR's head
7592bb4:Result: victory-gpu lib: 229 passed / 2 failed (both known baseline); flakes passed first run.
Both clippy runs exit 0 (-D warnings, both feature sets). The B580 baseline failures pristine main also hits are: victory-gpu descriptor::host::tests::dynamic_slots_are_held_until_released + memory::tests::lists_share_a_table_and_copies_keep_their_views (#1744/#1829); victory-shader emit::stride_tests::a_heap_buffer_read_where_no_buffer_view_is_reads_zeros + emit::valu_tests::fspx_programs_run_with_the_hardwares_dot_products. No PR regressions.
Synthetic tests only; no game data used. Full log kept locally. — borosf
Imported from Marvisak/VIctory. Originally posted by andrewpozdnakov7-jpg on 2026-11-27T23:18:14Z.
I checked the interaction with #3623 on app-local WARP with DRED unset. Exact
7592bb4already includes the single list in its summary. In the two-list test, an 80 ms reporting delay still caused two slow-list warnings and four timestamp maps.Combined
147681apreserves both exact heads and resolves the overlap inHost::execute. The reporting delay produces no warning and two maps. Moving the delay to the first list's wait produces one warning and six command lines, with two maps. The single list still reports all seven commands with one map. Every copy returned the expected data.The combined diagnostics suite passed 246 repository tests and the SDK identity check, with two 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.
Imported from Marvisak/VIctory. Originally posted by neonbyte1 on 2026-11-27T23:18:46Z.
@andrewpozdnakov7-jpg thanks, that's a useful check. Agreed: #3313 stays as it is, and #3623 builds on it. Whichever lands second can take your resolution in
147681a(Host::execute) with your authorship kept; I'll rebase onto it that way if #3623 lands first.AI-assisted (Claude); no game data shared.
Imported from Marvisak/VIctory. Originally posted by akimfomin on 2026-11-28T02:00:19Z.
KLBF #14 separates an absent present count from a valid zero. I checked that contract with sixteen local CPU cases, including a genuine 32-bit wrap and a missing measurement between two valid counters. For this PR, mix one single-list submission with a missing frame count: the list is still counted, without adding a synthetic frame sample. The two metrics measure different things.
Imported from Marvisak/VIctory. Originally posted by andrewpozdnakov7-jpg on 2026-11-28T02:07:58Z.
The merge with #3622 is in 75f42f9. In the CPU fixture, a single list with unavailable command readback contributes 20 ms of wall time, with an empty command map and zero summed command duration. The fixture calls the exact list accumulator. The report obtains its frame divisor from the existing frame counter. Four-case test report
Please preserve the Git author if cherry-picking or rebasing, or keep this trailer if folding the change into another commit.
Co-authored-by: andrewpozdnakov7-jpg <[email protected]>Imported from Marvisak/VIctory. Originally posted by neonbyte1 on 2026-11-28T02:16:06Z.
@andrewpozdnakov7-jpg thanks, checked:
75f42f9merges exactly #3622's headf6989c6and this PR's head7592bb4, touching onlyhost.rsand the newhost/timing_warp.rstest. Same as with #3623: this PR stays as it is, and whichever of #3313/#3622 lands second takes your resolution with your authorship (or I rebase onto it that way if #3622 lands first).AI-assisted (Claude); checked the commit, no game data shared.
Imported from Marvisak/VIctory. Originally posted by andrewpozdnakov7-jpg on 2026-11-28T02:30:34Z.
I added #3650 to the previously checked #3313/#3622 combination in d887ca6. Git applies the three heads cleanly. Compiling the test helper from that tree exposed its stale tuple pattern for
GpuTimes, so the merge commit updates the helper to read the named command map.All four CPU checks passed with the exact merged methods and simulated queries. The window helper counts two commands from one list and returns zero when the drained window is checked again. A failed readback and a valid empty list each contribute their wall time, with separate availability counts and zero command intervals. The untimed tail still begins after the second sampled interval. Asset policy checked 191 files.
Please preserve the Git author if cherry-picking or rebasing, or keep this trailer if folding the change into another commit.
Co-authored-by: andrewpozdnakov7-jpg <[email protected]>View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.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.