GPU: count single-list submissions in the GPU timing summary #3313
No reviewers
Labels
No labels
accessibility
area: build
area: formats
area: gpu
area: loader
area: runtime
area: shader
bug
documentation
duplicate
enhancement
good first issue
gpu: amd
gpu: intel
gpu: nvidia
help wanted
host: wine
invalid
out of scope
question
request
run report
triage: confirmed
triage: has patch
triage: merge candidate
triage: needs info
triage: needs rebase
triage: needs work
triage: proposed close
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/Marvisak--VIctory!3313
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-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?
@neonbyte1 on GitHub · 2026-11-26 17:08 UTC · original
neonbyte1:pr/gpu-timing-all→main· +147 −23 · 2 files · 2 commits · openVICTORY_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.
@Dukestar69 on GitHub · 2026-11-26 17:29 UTC · original · approved these changes
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).
@andrewpozdnakov7-jpg on GitHub · 2026-11-26 17:46 UTC · original
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.@neonbyte1 on GitHub · 2026-11-26 17:49 UTC · original
@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.
@borosf on GitHub · 2026-11-26 19:03 UTC · original
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
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.