D3D12.X: fill memory from the list's upload memory, not a pattern buffer per value #838
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
goal:world-load
good first issue
help wanted
invalid
keep-open
off-goal
question
stale
test-only
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/xcl-dev--xcl!838
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-838"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@mastrr9 on GitHub · 2026-11-24 06:39 UTC · original
mastrr9:fix/d3d12x-fill-memory-upload-arena→main· +51 −48 · 1 files · 1 commits · openReplaces the leaked 32-entry
PATTERNSupload buffer cache inlist_x::fill()(FillMemoryWith{32,64,128}BitValueX) with the command list's own upload arena (bind::allocate_upload_memory), copying over the destination inFILL_CHUNK(ARENA_BLOCK / 2, 128 KiB) chunks with the same state transitionsCopyMemoryToMemoryXuses.(pattern, size)allocated a committed upload buffer rounded up to a power of two (up to 256 MiB) and kept it forever; after 32 entries, fills with any new value were dropped with a warning.Tested
617.42/32.0.16.1742), Windows 11 Pro 25H2 (26200.9974),rustc 1.100.0 (0ef1bc386 2026-11-09)MSVC debug, DXC Windows SDK10.0.26100.0,d3d12SDKLayers.dllinstalledba1f7e888b8c1c0386ce62edd3c3b1509a5348f2cargo build --workspace: clean (only pre-existingfetch_updatedeprecation warning)cargo test --workspace -- --test-threads=4: 714 passed, 0 failed, 41 ignored (new testhle::d3d12x::list_x::tests::fill_copies_cover_the_range_oncepassed)SKIPPEDGPU tests:gpu::recomp::tests::gpu_geometry_wave32_prefix_count_over_a_mask: no wave64,gpu::recomp::tests::gpu_wave32_program_in_wave64_hardware: no wave64Regression run
Smoke run by @CuteBooty in comment below: #838
Contributed by a community tester; the PR author did not run it. Both blocks are pasted as posted.
main:
PR:
Tester's setup: RTX 3070 8 GB (32-lane waves), NVIDIA 621.24; Ryzen 5 3600, 32 GB; Windows 11 Pro 26200; rustc 1.100.0 MSVC; release build.
Tester's method:
scripts\smoke.ps1 -Game <folder> -Seconds 60, no input, on this PR's head as it is and onmainbeaa245, the commit it branches from, each from a clean checkout. Each build ran twice back to back; the blocks are the second runs. Themainblock is shared with the tester's reports on other PRs of the same base.Tester's AI use: Claude Code (Claude Opus 5.5) made the runs with the tester present and wrote the report from the script's output.
Not tested
AI use
FillMemoryWith{32,64,128}BitValueX copied from an upload buffer of the pattern, one per value and size (rounded up to a power of two, up to 256 MiB each), kept for good. After 32 of them every fill of a new value was dropped with a warning, and a large fill of each value kept that much upload memory for the rest of the run. The pattern is now written into the list's own upload memory (AllocateUploadMemory's arena, released with the list's allocator) and copied over the destination in chunks of half an arena block. Assisted-by: Claude Code (Claude Opus 5.5)@futurepro62 on GitHub · 2026-11-24 07:06 UTC · original
Full-suite run, since this PR has no test report yet. Tested exact head
ba1f7e8(on its basebeaa245).Tested
cargo build --workspace, thenXCL_REQUIRE_GPU=mesh cargo test --workspace -- --test-threads=4: 714 passed, 0 failed, 41 ignored. SKIPPED (no wave64):gpu_geometry_wave32_prefix_count_over_a_mask,gpu_wave32_program_in_wave64_hardware.fill_copies_cover_the_range_once.Not tested
AI use
@SlopTart on GitHub · 2026-11-24 07:17 UTC · original
Linux / AMD RDNA3 datapoint.
Merged state: head
ba1f7e8onto maina1672ef, clean merge.Full suite,
cargo test --workspace --release --no-fail-fast --target x86_64-pc-windows-gnu -- --test-threads=4: 706 passed, 10 failed, 41 ignored. Failures are the known Wine-lane set from my #42 rows plus #718 trio members; nothing here fails because of your change. Upload-memory fill tests green; no new failures.Not tested: retail titles (none here), Windows, RDNA4.
Counts only, no game data.
Machine: RX 7900 XT (RADV NAVI31), Mesa 26.2.5, kernel 7.2 (Arch), Proton Experimental (wine-11.0), patched vkd3d-proton v3.1, Rust cross
x86_64-pc-windows-gnu,XCL_NETWORK=0, release profile,--test-threads=4. Linux rows: #42 / #718.AI use: Hermes agent (local Qwen-class) ran the suite and drafted this; I checked it before posting.
@CuteBooty on GitHub · 2026-11-24 19:41 UTC · original
Regression run on a retail title for
3784317: pass (no device removal, no crash, frames and peak commit within the check's limits).Tested
scripts\smoke.ps1 -Game <folder> -Seconds 60, no input, on this PR's head as it is and onmainbeaa245, the commit it branches from, each from a clean checkout. Each build ran twice back to back; the blocks are the second runs. Themainblock is shared with my reports on other PRs of the same base.main:
this PR:
Not tested
mainmerged in, AMD and Intel GPUs.AI use
@JJAutoCompare on GitHub · 2026-11-25 05:57 UTC · original
Empirical test report (
37843178)Verified PR #838 at detached head
3784317880c0cff8954a161b33629233d8e9cbb8.Hardware / environment
1.100.0 (0ef1bc386 2026-11-09)and DXC1.9.2609.5 (01b62ad47). Cargo used the unoptimized test profile with debug information and incremental compilation disabled.Invoke-ArcTest.ps1withXCL_ADAPTER=NONE_CPU_ONLYandRUST_TEST_NOCAPTURE=1.Commands and results
cargo test --workspace --no-runexited 0 and built the workspace test binaries.cargo test -p xcl --lib hle::d3d12x::list_x::tests::fill_copies_cover_the_range_once -- --exactexited 0 with 1 passed, 0 failed, 0 ignored, and 0 skipped. The exact filter excluded 693 other library tests.AtomicU32::fetch_updatein XGameRuntime.Observed behavior
The fixture passed its assertions for a fill smaller than one chunk, exactly one chunk, and two full chunks followed by a 36-byte tail. For six representative sizes from 4 bytes up to the 256 MiB fill limit, it checked contiguous offsets, positive copy lengths bounded by the chunk size and divisible by four, and an end offset equal to the requested size.
Not tested
The full GPU workspace suite and game smoke runs were omitted. This run covered CPU chunk planning. GPU copy execution, resource transitions, and the lifetime of the upload allocation were outside the fixture's coverage.
AI use
Verified with T3 Code / Codex (gpt-6.2-sol, reasoningEffort: high). Coordinator #2 (T3 Code / Antigravity, gemini-4-neon) verified counts against
pr838-focused.logand published.@DavidM1911 on GitHub · 2026-11-25 10:27 UTC · original
Verification on RTX 3060 Ti (Windows 11), branch merged with current
main:cargo test -p xcl --lib: all passed, 0 failed, ~26 ignored. (Intermittent single-test flake / 0xc0000005 abort under parallel scheduling — tracked in #1978; clean on single-threaded rerun.)Thanks!
@ClosetPie107 on GitHub · 2026-11-25 19:54 UTC · original
Independent AMD RDNA4 / Linux (RADV, native wave64) test report for head
3784317880c0cff8954a161b33629233d8e9cbb8(merged cleanly ontomain2898511).Hardware & environment
experimental-11.0-20261112),vkd3d-protonmasterec207194(3.2.0) +dxil-spirvb540c8a2+ relaxed-vtable patch (-Db_ndebug=true), DXVKv3.1.1-209, DXC1.9.2609.5, Rustx86_64-pc-windows-gnu(debug for tests, release for retail)Unit / GPU tests (
XCL_REQUIRE_GPU=wave64,XCL_DXC_DIR,VKD3D_CONFIG=ignore_shared_fence,--test-threads=1 --nocapture)hle::d3d12x::list_x::: 37 passed, 0 failed, 0 ignored (0 skipped)Combined retail sanity run (
main2898511+#2103,#838,#1250,#1733merged together;XCL_DIRECT_DXIL=1,XCL_TEXTURE_LEVEL_PAGES=1,XCL_PSO_WAIT_MS=50,XCL_SPLIT_MIDLIST_WAIT=0,XCL_COHERENT_MB=1024,VKD3D_CONFIG=ignore_shared_fence,XCL_PSO_PRELOAD=0,XCL_NETWORK=0, warm PSO cache)45,841translated draws,154,125dispatches (+4,634chained split-compute),47,255Opus packets (0 errors),13.2 GiBpeak VRAM (0 GTT spill),15.1 GiBpeak RSS (vs19.3 GiBon cleanmain2898511).268.4 son the same pre-existingmain0xc0000005TOCTOU race intitle_textures::subresources(copy_nonoverlappingreading0x793a08000) also reproduced on cleanmain2898511(161.8 s).Not tested
AI use
main, ran the tests and combined retail run under Proton on this machine, and drafted this report.View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.