Repository navigation
Conversation
ozimchuk
marked this pull request as ready for review
November 25, 2026 06:19
Contributor
|
Verification on RTX 3060 Ti (Windows 11), branch merged with current
Thanks! |
Before every title submit XCL looks for the CPU's writes (write-watch over the watched ranges), copies them into sparse video memory and uploads changed title textures, on the title's own thread. On slower CPUs that look is most of the frame (2-6 fps on an i9-9900K in xcl-dev#582), but the only record of it is the cumulative timing line logged at power-of-two submit counts, so a report at a few fps cannot say how much of each second went there. With XCL_ACTIVITY=1 every 2 s now also logs the looks of the last 2 s: how many, their whole time and its share of the 2 s, the write-watch scan with the megabytes it watched a look and the pages it found, the copies into sparse video memory, and the rest. Without XCL_ACTIVITY only counters are added: two Instant::now() calls per look and a sum over the cached ranges.
The `looks before submits` line (xcl-dev#1832) leaves "the rest" of a look as one number. Its parts are timed now: the view-source recheck, the VRAM pages' sync, the recheck of streamed textures outside the write-watch, choosing the textures to upload, and the uploads (MB; the content hash with its read, the detile, the submit with its wait), with what is left as "other". The line also gives the longest look of the period: one slow look is a stall an average hides. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ozimchuk
force-pushed
the
activity-submit-work
branch
from
November 25, 2026 14:59
c871a54 to
f8eeef4
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.
Stacked on #1832 (@marquezinii); only the top commit,
f8eeef4, belongs here. It replaces this PR's earlier version, which added a secondXCL_ACTIVITYline for the same looks – I had missed #1832 when I opened it.#1832's
looks before submitsline gives the write-watch and the copies into sparse video memory, and leaves "the rest" as one number. On a retail title under Linux that rest was a large part of the look, so this splits it, and adds the longest look of the period: one slow look is a stall that the 2 s sum hides.(retail title, world load,
main06c9f55+ #1832 + this commit; Linux, NVIDIA (32-lane waves))What is in it
crates/xcl/src/hle/d3d12x/title_textures.rs: withXCL_ACTIVITY,refresh_onceandupload_alltime the parts of the rest – the view-source recheck,vram::before_execute, the streamed-texture recheck (D3D12.X: re-fingerprint unwatched streamed textures at spaced frame milestones #2029), choosing the uploads, and per batch the content hash (with its read), the detile and the submit (with its wait), plus the bytes uploaded;look_parts().crates/xcl/src/hle/d3d12x/sparse.rs:note_lookkeeps the longest look (take_longest_look);look_linetakes the parts and the longest look; what the parts do not cover is "other". The unit test covers the new fields and an idle period.crates/xcl/src/host.rs: passes both to the line.HANDOFF.md: the line's description.Without
XCL_ACTIVITYnothing is timed (oneOnceLockread per part).Tested
694cc67), release build forx86_64-pc-windows-gnu, Rust 1.100.0.cargo test -p xcl --lib --release -- --test-threads=4on this head: 1 186 passed, 11 failed, 26 ignored. 10 of them fail onmainaaa931bhere too (test data, DXIL validator and precision cases of this setup); the 11th,list_x::tests::mid_list_write64_wait64_split_avoids_cycle_and_reuses_spares, passes when run alone.d3d12x::sparseandd3d12x::title_texturesalone: 16 and 18 passed, 0 failed, includingthe_look_line_splits_the_time.XCL_ACTIVITY=1: the line above every 2 s, "other" 0–1 ms throughout. The run ends at ~82 s inxg::copy_fromasmaindoes here (XG CopyFromSubresource: retail title passes one argument more → memcpy AV in copy_from; then null write at game+0x23cf683 at end of loading #662; XG: fix CopyFromSubresource 7-argument ABI and guard destination span #684 fixes it).Not tested
maincrashes at it here without XG: fix CopyFromSubresource 7-argument ABI and guard destination span #684).AI use
🤖 Generated with Claude Code
https://claude.ai/code/session_01H6JBZXaFw99FcnmUV1mPWj
AI-assisted.