GPU: drain fence wait counts and durations together #3167
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/3169"
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 andrewpozdnakov7-jpg on 2026-11-26T10:51:58Z.
Fence completion records a count and a duration. When the report drains those values separately, it can put the count in one window and its time in the next. The totals across both windows still add up, but the individual rows are wrong.
Accumulate the two values under one lock and drain them as a pair. A signal that completes several queued events records its batch after releasing the fence's waiter lock.
The same synthetic fixture ran a producer with 32,768 waits of 1,250 microseconds while the consumer drained the counters. Each run contained 32,768 events and 40,960,000 microseconds in total.
63bcca4The app-local WARP diagnostics suite passed 247 tests with one ignored. The native event test passed. Strict GPU Clippy with default and all features and the asset policy passed.
This collector change is independent of #3157, which logs frames with fence waits even when no command-list segments were held.
Imported from Marvisak/VIctory. Originally posted by Dukestar69 on 2026-11-26T11:08:01Z.
Review: APPROVED
Verified against
origin/main(63bcca4):cargo test -p victory-gpu --lib fence:: -- --test-threads=1: passed.cargo test -p victory-gpu --lib queue:: -- --test-threads=1: 5/5 passed.cargo clippy -p victory-gpu --all-targets -- -D warnings&--features diagnostics: clean.cargo xtask policy: 191 files ok.Cleanly drains fence wait counts and durations atomically together.
Synthetic tests only (no game files used). AI-assisted (Gemini 4 Neon).
Imported from Marvisak/VIctory. Originally posted by futurepro62 on 2026-11-26T22:20:29Z.
NVIDIA full-suite run, to go with the reports above by Dukestar69, since none of them names a GPU run. Tested exact head
5700e03(on its base63bcca4).Tested
dxil.dllfrom Windows SDK 10.0.26100 (the loader's default), debug.cargo build --workspace --locked, thencargo 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: 867 passed, 0 failed, 10 ignored.report_windows_keep_their_fence_counts_and_durations_together.--skipleaves out tests that fail on main63bcca4on this card too, not because of this PR:heap_direct_texture_reads_mark_their_heap_indexends thevictory-shadertest process with0xc0000005(#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_viewsand the twostride_testshit the 1,000,000-view heap cap of NVIDIA drivers (#1835, #2317);gathers_at_a_level_match_the_hardwarefails on lane 0 (#1744).Not tested
AI use
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.