Bound the D3D12 list and upload workload in a smoke profile #1163

Merged
ghptc merged 1 commit from upstream-pr/1163 into main 2026-11-29 08:16:57 +00:00
ghptc commented 2026-11-28 14:36:08 +00:00 (Migrated from github.com)

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by ghptc on 2026-11-28T14:36:08Z.


Even with small positional list and copy counts, the existing D3D12 memory example proceeds to an upload batch of 2,000 one-MiB buffers. A quick allocation and teardown check needs a way to bound that phase too.

list_memory --smoke fences four lists with 64 copies each and exercises all three upload sizes. At most 16 MiB of upload payload is live per batch. The example samples while mapped, pairs map and unmap, and releases the fence event on exit. The full workload keeps its original numeric controls. An invalid profile returns a usage error.

Two profile regression tests and the complete smoke workload passed with a release MSVC cross-build, two compilation jobs, Proton Experimental, vkd3d-proton 3.2.0 and an RTX 5070. All three upload/release checkpoints completed in a private prefix. The synthetic service was capped at 1 GiB high, 2 GiB max and zero swap. Its final run exited successfully and peaked at 557.7 MiB. The staged asset policy passed. Wine printed zero for the example's Windows private-memory readings on this setup. The host peak came from systemd.

The Windows CI check stopped in Clippy at victory-shader/src/emit/mod.rs:2768 and victory-gpu/src/shadow.rs:1708. The base branch's CI job reports both diagnostics at the same lines. PR check · Base check

<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:issue:5541211512 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/1163). Originally posted by [ghptc](https://github.com/ghptc) on 2026-11-28T14:36:08Z. --- Even with small positional list and copy counts, the existing D3D12 memory example proceeds to an upload batch of 2,000 one-MiB buffers. A quick allocation and teardown check needs a way to bound that phase too. `list_memory --smoke` fences four lists with 64 copies each and exercises all three upload sizes. At most 16 MiB of upload payload is live per batch. The example samples while mapped, pairs map and unmap, and releases the fence event on exit. The full workload keeps its original numeric controls. An invalid profile returns a usage error. Two profile regression tests and the complete smoke workload passed with a release MSVC cross-build, two compilation jobs, Proton Experimental, vkd3d-proton 3.2.0 and an RTX 5070. All three upload/release checkpoints completed in a private prefix. The synthetic service was capped at 1 GiB high, 2 GiB max and zero swap. Its final run exited successfully and peaked at 557.7 MiB. The staged asset policy passed. Wine printed zero for the example's Windows private-memory readings on this setup. The host peak came from systemd. The Windows CI check stopped in Clippy at victory-shader/src/emit/mod.rs:2768 and victory-gpu/src/shadow.rs:1708. The base branch's CI job reports both diagnostics at the same lines. [PR check](https://github.com/trustno1-coder/VIctory-NVIDIA/actions/runs/46155515988/job/141011176901) · [Base check](https://github.com/trustno1-coder/VIctory-NVIDIA/actions/runs/46154833762/job/141009085679)
zhouzhidong3-hash commented 2026-11-28 15:02:09 +00:00 (Migrated from github.com)

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by zhouzhidong3-hash on 2026-11-28T15:02:09Z.


Native Windows result for list_memory --smoke at 93e7e25c62e70bec43f852438a49eadebfa70d4e. All three upload/release checkpoints completed; exit code 0.

Windows 10 Pro x64 (19045.5131), DXGI adapter 0: GeForce RTX 5070, driver 591.86. I compiled the unmodified example directly with rustc 1.98.1 (x86_64-pc-windows-msvc, optimized) against previously built Windows bindings. This covers the standalone example only; the full Cargo build was not completed.

Immediately before the uploads, private usage was 88 MiB and committed write-combined memory was 23 MiB. Both counters returned nonzero readings on Windows. At the displayed precision, neither counter dropped on the immediate sample after any of the three releases. This single short run does not establish long-term retention or a leak.

Raw output
device and two buffers                               private       87 MB; write-combined      22 MB committed (     8 MB in memory, 2 regions)
4 allocators and lists made, empty                   private       87 MB; write-combined      22 MB committed (     8 MB in memory, 2 regions)
each recorded 64 copies and ran                      private       89 MB; write-combined      23 MB committed (     8 MB in memory, 2 regions)
each reset (as a pooled list is)                     private       89 MB; write-combined      23 MB committed (     8 MB in memory, 2 regions)
all gone                                             private       88 MB; write-combined      23 MB committed (     8 MB in memory, 2 regions)
16 upload buffers of 1024 KB alive, written          private      104 MB; write-combined      39 MB committed (    24 MB in memory, 2 regions)
  ... released                                       private      104 MB; write-combined      39 MB committed (    24 MB in memory, 2 regions)
2 upload buffers of 8192 KB alive, written           private      106 MB; write-combined      41 MB committed (    26 MB in memory, 2 regions)
  ... released                                       private      106 MB; write-combined      41 MB committed (    26 MB in memory, 2 regions)
64 upload buffers of 64 KB alive, written            private      107 MB; write-combined      41 MB committed (    26 MB in memory, 2 regions)
  ... released                                       private      107 MB; write-combined      41 MB committed (    26 MB in memory, 2 regions)
<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:comment:7241147727 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/1163#issuecomment-7241147727). Originally posted by [zhouzhidong3-hash](https://github.com/zhouzhidong3-hash) on 2026-11-28T15:02:09Z. --- Native Windows result for `list_memory --smoke` at `93e7e25c62e70bec43f852438a49eadebfa70d4e`. All three upload/release checkpoints completed; exit code 0. Windows 10 Pro x64 (19045.5131), DXGI adapter 0: GeForce RTX 5070, driver 591.86. I compiled the unmodified example directly with rustc 1.98.1 (x86_64-pc-windows-msvc, optimized) against previously built Windows bindings. This covers the standalone example only; the full Cargo build was not completed. Immediately before the uploads, private usage was 88 MiB and committed write-combined memory was 23 MiB. Both counters returned nonzero readings on Windows. At the displayed precision, neither counter dropped on the immediate sample after any of the three releases. This single short run does not establish long-term retention or a leak. <details><summary>Raw output</summary> ```text device and two buffers private 87 MB; write-combined 22 MB committed ( 8 MB in memory, 2 regions) 4 allocators and lists made, empty private 87 MB; write-combined 22 MB committed ( 8 MB in memory, 2 regions) each recorded 64 copies and ran private 89 MB; write-combined 23 MB committed ( 8 MB in memory, 2 regions) each reset (as a pooled list is) private 89 MB; write-combined 23 MB committed ( 8 MB in memory, 2 regions) all gone private 88 MB; write-combined 23 MB committed ( 8 MB in memory, 2 regions) 16 upload buffers of 1024 KB alive, written private 104 MB; write-combined 39 MB committed ( 24 MB in memory, 2 regions) ... released private 104 MB; write-combined 39 MB committed ( 24 MB in memory, 2 regions) 2 upload buffers of 8192 KB alive, written private 106 MB; write-combined 41 MB committed ( 26 MB in memory, 2 regions) ... released private 106 MB; write-combined 41 MB committed ( 26 MB in memory, 2 regions) 64 upload buffers of 64 KB alive, written private 107 MB; write-combined 41 MB committed ( 26 MB in memory, 2 regions) ... released private 107 MB; write-combined 41 MB committed ( 26 MB in memory, 2 regions) ``` </details>
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
trustno1-coder/VIctory-NVIDIA!1163
No description provided.