GPU: VICTORY_LIBRARY_TIMING measures the host FidelityFX upscaler's GPU and CPU cost #1904
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!1904
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-1904"
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?
@AwkGrep256 on GitHub · 2026-11-25 00:29 UTC · original
AwkGrep256:ffx-gpu-timing→main· +255 −0 · 5 files · 2 commits · openDiagnostics switch
VICTORY_LIBRARY_TIMING=1VICTORY_LOG=victory_gpu::library_timing=debug).Off by default and diagnostics-only; when off nothing is recorded. Up to 64 calls can be in flight; past that a call is not timed.
Measurement in the title
Series X profile, title 1.0.2.1, AMD Radeon RX 9070 XT, Windows 11, diag build of main
02fcf5bwith #1793 applied for the Series X switches, FidelityFX SDK 2.4.0signedbin, FSR 4.1.2, 1080p rendered to a 4K output. 50 upscales in the world.For scale, the same frames took 100 to 187 ms on the GPU (1.1 to 2.9 s per frame in all), so the upscaler is about 1 % of the frame's GPU time. Rendering 1080p instead of native 4K saves far more than that.
Tested
cargo clippy --workspace --all-targets -- -D warnings, with and withoutdiagnostics@Marvisak on GitHub · 2026-11-25 08:18 UTC · original · edited 2026-11-25 16:46 UTC
Automated triage for the maintainers.
Merge candidate.
Adds
VICTORY_LIBRARY_TIMING=1(diagnostics feature only, off by default):external::recordbrackets the host library's recording with two timestamp queries, resolves them into a read-back buffer, andHostList::reset(called only after the list's submissions finished) reads them and logs GPU/CPU statistics every 60 calls (crates/victory-gpu/src/library_timing.rs). The query heap/read-back setup, the 64-pair cap and the out-of-order guard inticks_msread correctly, and nothing runs when the switch is off. The README line is a single row in the existing switch table.Optional: main reads switches with
crate::switch::on(treats any value but0as on); using it here instead of the hand-written== "1"check would match the otherVICTORY_*switches. Pairs taken by a list that is dropped without a reset stay busy, which only reduces how many calls get timed.CI (
check): passing.Generated by Claude Code
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.