Repository navigation
D3D12.X: with XCL_LOOK_STATS=2 split a present's time on the submitter - #1
Merged
Merged
Conversation
On a 16 GB NVIDIA card in the world, presents took 93 % of the submitting thread's time (xcl-dev#2688), but a present was one entry with only its wait for the copy of the frame before apart, so where that time goes could not be told. Four more entries, timed with XCL_LOOK_STATS=2 only, as that wait is: - the wait for the present before it (PresentX's lock, the presenter's), - the copy (or composite) of the frame recorded and submitted, from the allocator's reset to its Signal, - the swap chain's Present, which DXGI holds while the frames before it are queued (a GPU-bound frame waits there), - the wait for a frame dump's copy (XCL_FRAME_DUMP, XCL_DUMP_TARGETS), up to 2 s each. With XCL_ACTIVITY they appear in "calls of the submitting thread (2 s)" next to "presents"; what a present spends besides them is the rest (the plane checks, the frame-rate line, the device-removal check). No change with the switch off. When the fallback presents on a submission (a title that does not call PresentX), its parts are timed inside ExecuteCommandLists rather than inside presents, as the copy wait already was. They are sub-calls (is_sub_call, xcl-dev#2729), as the copy wait is, so the line's "completed" total counts each present once. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
thisguyStan
force-pushed
the
d3d12x/presentx-timers
branch
from
November 28, 2026 21:37
c726229 to
80e2ee4
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.
On a 16 GB NVIDIA card in the world, presents took 93 % of the submitting thread's time (xcl-dev#2688), but a present was one entry with only its wait for the copy of the frame before apart, so where that time goes could not be told.
Four more entries, timed with XCL_LOOK_STATS=2 only, as that wait is:
With XCL_ACTIVITY they appear in "calls of the submitting thread (2 s)" next to "presents"; what a present spends besides them is the rest (the plane checks, the frame-rate line, the device-removal check). No change with the switch off.
When the fallback presents on a submission (a title that does not call PresentX), its parts are timed inside ExecuteCommandLists rather than inside presents, as the copy wait already was.
They are sub-calls (is_sub_call, xcl-dev#2729), as the copy wait is, so the line's "completed" total counts each present once.
What is in it
Tested
cargo test --workspace -- --test-threads=4: N passed, N failed, N ignored (SKIPPED GPU tests: …)Regression run
main:
PR:
Not tested
AI use