Repository navigation
Conversation
|
I tested the idle upload-buffer cap at
With the 1 MiB cap, the next small upload reused the same buffer. Idle capacity dropped to zero while it was checked out and returned to 1 MiB after its fence completed. All three runs passed byte-for-byte readback checks for both textures and the subsequent refresh, with zero skips. These measurements cover idle buffer capacity on WARP. I didn’t measure process memory, physical GPU performance, or GTA VI loading. I used OpenAI Codex with GPT-6.2 Sol to write and run the test. A separate GPT-6.2 Sol agent verified the artifact and logs. GPT-6.2 Astra drafted this comment. I reviewed and approved this comment before posting. |
|
Exact production d6d529c verified on RTX 4060 Laptop/Wine 11, with only a local test fixture added to texture_upload.rs.
A 64x64 R8 upload plus 1024x1024 RGBA8 burst allocate 1 MiB and4 MiB staging jobs, neither counted idle while checked out. Both jobs are returned only after real queue-fence completion:
All GPU texels remain correct after trimming. A second differently patterned small upload reuses the original smallest-fitting buffer when retained; with zero retention it still returns every correct byte. The large texture remains intact after this subsequent upload. Device remains healthy in all three fresh processes. No fake fence completion or shader dispatch. This verifies the actual allocated idle-pool cap and data correctness, not OS resident-RAM reduction, in-flight retirement under a stalled GPU, native Windows, title memory peaks, or improved frame times. Lowering the cap can increase allocation churn/stutter; no new default recommended without matched real loading measurements. The fixture's retained-capacity figures are not RSS. Linux6.17/i7-13620H/16 GiB RAM/8 GiB VRAM, NVIDIA590.48.1, masking disabled; diagnostic-relaxed-vtable vkd3d2576c0b4adfae4a+, not stock certification. All guards unchanged. GPUpeak238 MiB, availableRAM minimum9120.3 MiB. Evidence Next useful owner measurement: matched burst/reuse workload or loading trace with allocation count and frame-time tails at a smaller retention cap, separating idle capacity from pending uploads and actual resident memory. |
|
I checked the activity-line wording on RTX 5070 / NVIDIA 616.92 at head A queue fence held the upload until released. While its upload fence was incomplete, the line reported The focused test passed with no skips. The queued count therefore includes completed staging buffers awaiting reclamation; it is not an exact measure of bytes the GPU still has to read. Wording such as “submitted upload buffers awaiting reclamation” would distinguish that accounting from fence progress. This is an activity-reporting observation, not an upload corruption or process-memory measurement. AI use: OpenAI Codex with GPT-6.2 Astra built and ran the fixture; Codex reviewed and prepared this report. |
The line said its second number was what the GPU had not read yet, but the count includes buffers whose upload finished and that wait for the next reclaim (andrewDoing's fixture on xcl-dev#3050: unchanged after the fence until reclaim ran). It now says what it counts. Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
Thanks to all three of you. @Gevroska and @pickles976: agreed, the default stays at 512 MiB until a loading run with a smaller cap measures allocation churn and frame-time tails. The run in the description only measured what's kept idle (378 MB at 277 s). @andrewDoing: right, the second number includes finished uploads that are waiting for the next reclaim. 94b7a07 now words it as "submitted and not taken back yet". The new head's suite and smoke are in the description. AI use: Claude Code (Claude Opus 5.5) wrote this reply; Prime posted it. |
Refresh the existing PR xcl-dev#3050 on nvidia-dev. Preserve its configurable idle cap and submitted-versus-idle diagnostics, and cover actual allocation, trimming and reuse in isolated WARP processes without submitting GPU work. Keep active buffers alive and document that this limits system-memory upload heaps, not live textures or total process commit. Original implementation: d6d529c and 94b7a07 (Prime / Claude Code). Refreshed and tested with Codex (GPT-6).
94b7a07 to
cbb909c
Compare
|
Tested Exact I ran
2 passed, 0 failed, 0 ignored, 0 runtime skips. Both native processes exited 0, with 1,808 tests filtered out each. Not tested Physical GPUs, cross-queue or queue-release behavior, pool reuse, process memory, timing, retail smoke, or the full suite. AI use T3 Code through the Codex harness ( |
|
Thanks, Prime. On my RTX 3080, lowering the cap from 512 to 128 MiB reduced peak sampled idle upload capacity from 504 to 124 MiB and increased staging-buffer allocations from 15 to 64 during loading. I’d keep the 512 MiB default. The allocation trade-off showed up clearly, but the two runs didn’t isolate the cap’s effect on frame times. I used the same instrumented build based on
All 59 evictions at 128 MiB occurred about 60–140 seconds after Confirm. Present intervals were already longer in that run during the first 45 seconds, before its first eviction. The p99 ordering also changed with the observation window: over the first 90 seconds, p99 was 657.1 ms at 128 MiB and 1,116.4 ms at 512 MiB. I wouldn’t attribute the higher full-window p99 to the smaller cap from this pair alone. An initial 512 MiB attempt hit I used OpenAI Codex with GPT-6.2 Sol to implement and calibrate the measurement and run the comparison. A separate GPT-6.2 Sol agent verified the saved evidence. GPT-6.2 Astra drafted this comment. I reviewed and approved this comment before posting. |
XCL_UPLOAD_KEEP_MBbounds completed texture-upload buffers retained for reuse (0–4096 MiB, default 512). Active buffers remain owned until completion. The activity log separates idle upload memory from submitted buffers awaiting reclaim. This addresses retained system-memory upload heaps; it does not cap live textures, VRAM or total process commit.Part of #2688; related to #2912's in-flight upload reclamation. This refreshes the existing proposal on
nvidia-dev54225f5884a94cd23b7aab3f703a7c975070aa77rather than opening another PR. Currentmaine429936c10a5b8aa09470ff99dfc8c8d3d8c56fduses a different uploader and does not contain this idle-pool switch.What is in it
Tested
cbb909c08ca786b4ddfeaf95b686aa105bec43e4; Windows x64, debug Rust tests, software WARP device. Commands below use the actual arguments with only the private build-cache path abbreviated as<target>.cargo test --locked -p xcl --lib --target-dir <target> hle::d3d12x::texture_upload::tests::the_idle_upload_buffers_kept_follow_the_switch -- --exact --nocapture --test-threads=1: 1 passed, 0 failed, 0 ignored, 0 explicit skips.cargo test --locked -p xcl --lib --target-dir <target> hle::d3d12x::texture_upload::tests::idle_upload_limit_releases_buffers_and_keeps_reusable_ones -- --exact --nocapture --test-threads=1: 1 top-level test passed, 0 failed, 0 ignored, 0 explicit skips; two child cases each passed separately. Nested summaries are not added to the top-level count.Regression run
Pending for this head. Previous-head smoke blocks and whole-suite results are historical and do not establish validation of this revision. Keep this PR a draft.
Not tested
AI use
Original implementation by Claude Code (Claude Opus 5.5), as recorded in the previous revision. Codex (GPT-6) rebased it, added the functional fixture/documentation, reviewed current-main overlap, and ran the focused checks above. Earlier contributors' results are not presented as new runs.
Optional temporary contributor/testing coordination: https://discord.gg/gK3y7WRRY