Repository navigation
GPU: VICTORY_LIBRARY_TIMING measures the host FidelityFX upscaler's GPU and CPU cost - #1904
Open
AwkGrep256 wants to merge 1 commit into
Open
AwkGrep256 wants to merge 1 commit into
AwkGrep256 wants to merge 1 commit into
Conversation
The host FidelityFX upscaler records its passes into the title's list through external::record, and nothing measured what that costs. With VICTORY_LIBRARY_TIMING=1 (diagnostics) each such call gets a GPU timestamp before and after it, resolved into a read-back buffer and read when the list is reset (its submission has finished), plus the CPU time of the call. Every 60 calls one line reports the GPU time (average, median, slowest) and the average CPU time. Up to 64 calls can be in flight; past that a call is not timed. Off, nothing is recorded.
catminou4
reviewed
Nov 25, 2026
catminou4
left a comment
Contributor
There was a problem hiding this comment.
Static review only: victory-gpu is Windows-only (D3D12/windows_sys) — nothing compiles or runs on macOS; source review of the diff.
VICTORY_LIBRARY_TIMING measures the host FidelityFX upscale: timing instrumentation behind an env var — debug tooling.
AwkGrep256
force-pushed
the
ffx-gpu-timing
branch
2 times, most recently
from
November 25, 2026 00:55
9ca88ee to
e556cb7
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Nothing measured what the host FidelityFX upscaler costs. This adds a diagnostics switch that times the work host libraries record into the title's lists through
external::record.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