Repository navigation
Conversation
What the video memory in use is made of could not be told from the XCL_ACTIVITY memory line: it gives no budget, and three of XCL's owners (xcl-dev#2688, workstream 1). memory_report::snapshot() takes the process's commit, and DXGI's local and non-local usage with their budgets, and XCL's parts of each: - commit: the UMA coherent window, and the CPU copy of mapped sparse tiles (a title page in a sparse window is committed on the CPU too); - video memory: target pages and the free part of their pools, arenas, mapped sparse tiles, free sparse pools, retired sparse pools (counted now: sparse::retired_bytes), and title textures that are committed resources of their own (title_textures::committed_bytes, console size). What each total holds besides them is its own part, "other". XCL_ACTIVITY logs it as a line of its own after the memory line, which stays as it was (scripts/smoke.ps1 and the integration branches' tools read it). Part of xcl-dev#2688. Assisted-by: Claude Code (Claude Opus 5.5)
…them XCL's buffers sized per list or per submit (copy scratch, fill patterns, readbacks, upload staging, ...) were not in the memory line, so memory that grows with the title's submits could not be told apart from the title's own (xcl-dev#2688, workstream 1). resource_census::track gives a resource XCL made a small COM object as private data; D3D12 releases it with the resource, which takes it off its place's count. The eleven places XCL makes committed resources at run time are tracked. Each place's bytes are a part of the memory line, and a line of its own gives how many of each are alive and made. Part of xcl-dev#2688. Stacked on xcl-dev#2697. Assisted-by: Claude Code (Claude Opus 5.5)
… end The XCL_ACTIVITY line by owner was only in the log, so comparing runs meant reading logs (xcl-dev#2688, workstream 1: an end-of-run table). The activity thread keeps each snapshot it logs (memory_report::note): the last one, and the one where video memory in use was highest. report.json gets them as memory_by_owner (MB: totals, budgets, XCL's parts and the rest of each total, with the second of the run). The report takes what was kept and makes no DXGI call, which a crash report may make from any thread. Without XCL_ACTIVITY there is no table. Part of xcl-dev#2688. Stacked on xcl-dev#2750. Assisted-by: Claude Code (Claude Opus 5.5)
The mesh draws' two-pass buffers are committed UAV buffers XCL makes for itself, up to XCL_TWO_PASS_MB alive (1024 MiB by default). The line by owner (xcl-dev#2688) left them in other. The row reads the count the buffers' own cap already keeps. Co-Authored-By: Claude Fable 5.2 <[email protected]>
Two pooled kinds of buffers XCL makes for itself were not among the census's places (xcl-dev#2688): the readback buffers of the sparse windows' copy-back jobs and the upload buffers of the texture upload jobs (up to 512 MB of them kept free). Both are made on a pool miss only. Co-Authored-By: Claude Fable 5.2 <[email protected]>
The mapped pool tiles are the sparse windows' own and those GPU views of the title's memory hold; the line by owner (xcl-dev#2688) had both as sparse tiles. The views' share is the count their cap already keeps: a view tile parked since the last submit, or kept with XCL_VIEW_KEEP, is not in it and stays with the windows' own. Co-Authored-By: Claude Fable 5.2 <[email protected]>
What the line by owner (xcl-dev#2688) leaves in other has no count in XCL. Two figures help to read it: the swap chain's back buffers (DXGI makes them; their bytes are computed from their size) and pso_async's pipeline builds so far (finished, failed, pending: counts of the run, not the pipelines alive). One more XCL_ACTIVITY line has them. Co-Authored-By: Claude Fable 5.2 <[email protected]>
Co-Authored-By: Claude Fable 5.2 <[email protected]>
|
Independent desktop NVIDIA RTX 4060 (8 GB) / Windows 11 Environment
Release build & targeted
|
|
Tested
Not tested
AI use
|
The memory line by owner (#2697, #2750, #2776) on
nvidia-dev, with the two owners this branch has andmaindoes not. Part of #2688 (workstream 1).Stacked on #2697, #2750 and #2776: the first three commits are @joeypercia's, cherry-picked onto
nvidia-devwith their authorship (three conflicts, both sides kept;git range-diffagainst the originals shows context lines only). Only the last five commits belong here: 93 added and 5 removed lines. The whole branch is 731 added and 14 removed.What is in it
bind.rs,memory_report.rs: atwo-pass buffersrow, read from the count the buffers' cap keeps (the bytes asked for). Onnvidia-devthese buffers were inother.sparse.rs,texture_upload.rs: two census places,sparse readback jobsandtexture upload jobs(both pooled; made on a pool miss only).sparse.rs,memory_report.rs: aGPU-view tilesrow, taken out ofsparse tiles. A view tile parked since the last submit, or kept withXCL_VIEW_KEEP, still counts with the windows' own.present.rs,memory_report.rs,host.rs: one moreXCL_ACTIVITYline besideother: the swap chain's size (bytes computed, not counted) andpso_async's pipeline builds so far.README.md: theXCL_ACTIVITYentry names the lines.On
nvidia-dev,sparse pools freealso holds the tiles that are cooling or quarantined (pool_bytesleaves them out of the mapped ones here).Tested
71dad56b, debug:cargo test --workspace --offline --no-fail-fast -- --test-threads=4: 1829 passed, 8 failed, 48 ignored; 28SKIPPED(no wave64: 21, per-lane f16 forms refused: 3, no heap windows: 2, no xgameruntime.dll: 2).nvidia-dev3f39671d, same command: 1824 passed, 8 failed, 48 ignored; the same 28SKIPPED. The 8 failures are the same six tests on both:texture_upload'spieces_hold_the_texels_of_their_levelsandgpu_parts_of_a_texture_go_up_and_the_rest_stays,async_compute_pso_registers_real_pso_and_not_standin,console_ms_in_as_slot_and_ms_with_as_are_refused_cleanly, andsplit_compute_prefers_the_offline_whole_pipelineandtwo_pass_driver_cache_reuses_both_passes_and_recovers_corrupt_blobs, each reported twice. The five more passes are this branch's tests.3292b096reverted, which this card needs to stay in the world, nvidia-dev eae01502: title reads bad addresses 3-4 min in on the Series S profile with sparse GPU heaps; gone with 3292b096 reverted #2867): Series S profile,XCL_UMA_WINDOWS=16 XCL_HEAP_WINDOWS=1 XCL_COHERENT_HEAPS=sparse:1024 XCL_TWO_PASS_MB=3072 XCL_TEXTURE_LEVEL_PAGES=1 XCL_GFX_PSO_WAIT_MS=100 XCL_PREPARE_GRAPHICS=0 XCL_FRAME_DUMP=60, 2 GiB shader heap (xcl run:xcl nvprofileputs xcl.exe in an NVIDIA profile with a bigger shader heap (#2403) #2590), warm caches, 540 s of title time, 421 s of it in the world. The lines at the end:Without the two rows,
otherwould have read 5,607 MB of the 17,231 andsparse tiles6,157. Video memory was level by then (17,170 MB at 480 s).report.jsonhad the same table.Regression run
60 s each, the same settings (Series S profile,
XCL_UMA_WINDOWS=16 XCL_HEAP_WINDOWS=1 XCL_COHERENT_HEAPS=sparse:1024 XCL_TWO_PASS_MB=3072 XCL_PREPARE_GRAPHICS=0), no input: the title's first screens.mainb49be183(the commit #2697 is based on):nvidia-dev3f39671d(the base):This PR's head:
Not tested
XCL_VIEW_KEEP, an fp16 swap chain, a resize.AI use