Repository navigation
D3D12.X: show live FPS in the game window title - #516
Merged
Merged
Conversation
Sample successfully presented frames over at least one second using the existing window timer. Keep FPS visible alongside shader compilation progress and report zero when presentation stops. Cover irregular sampling, sample intervals, stalls and recovery with unit tests.
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.
Displays live FPS in the top title bar of the XCL window, alongside shader compilation progress. Samples successful presents over at least one second using actual elapsed time, and reports zero during a stall. Related to #450's optional in-frame overlay.
What is in it
crates/xcl/src/hle/d3d12x/present.rs: reuse the window timer and presented-frame counter; three tests cover sampling intervals, irregular timing, stalls and recovery.Tested
b86fba483e6a, workspace and release builds pass. All three FPS tests pass. Changed snippets pass rustfmt;git diff --checkpasses.cargo test --workspace --locked --offline --no-fail-fast -- --test-threads=4: 673 passed, 3 failed, 41 ignored, 0 GPU SKIPPED lines; Windows Application Control blocked 2 additional targets (disasm_e2e,e2e).placed_title_textures_share_vram_and_preserve_pixels(3D mip readback mismatch), thentransitions_apply_when_their_list_is_submittedandd32s8_targets_take_their_own_size_of_video_memory(poisoned lock). The same failure chain was reproduced on unmodified main at2b4bb43.Regression run
Both runs use
scripts/smoke.ps1 -Seconds 60on the same title. The baseline precedes main's texture-upload optimization (#486); these results check for regression and do not isolate counter overhead or establish a speedup from the counter.Main (
2997c9a):PR head (
b86fba483e6a, after pushing):Not tested
XCL_SAMPLE_*inputs. The counter measures successful XCL presents, including repeated image content.AI use