D3D12.X: GPU-only buffers placed outside the memory windows live in them #2799
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!2799
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-2799"
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?
@MacieGx on GitHub · 2026-11-26 13:50 UTC · original
MacieGx:d3d12x/outside-buffers→main· +356 −10 · 5 files · 2 commits · openStacked on #2798; only the top commit belongs here.
A buffer the title places with CreatePlacedResourceX outside every memory window became a committed resource of its own. Every view of it got an empty V# ("not in UMA"), so shaders read zeros and their writes were dropped. The newer retail title places all its compute buffers outside the windows, in plain reservations above its GPU views: light, ray and tile lists, BVH data, 128+ buffers, about 580 MB. Its final gather therefore had an empty tile list and wrote nothing, and its targets kept other targets' bytes.
Such a buffer, at an address with no committed CPU pages (so only the GPU uses it), now gets an address in the sparse windows. It is placed lazily (previous PR), and:
A range with committed pages is placed as before. Part of #505.
What is in it
crates/xcl/src/hle/d3d12x/real.rs:place_outside_buffer,has_cpu_pages, the title address -> window address map (dropped on the buffer's release),use_buffer; tests of the page check and the address map.crates/xcl/src/hle/d3d12x/device_x.rs:create_placed_resource_xtries it afterplace_at_title_address.crates/xcl/src/hle/d3d12x/bind.rs:outside_buffers_in_useinbind_abi(root addresses rewritten; buffers named by the root addresses and the tables' V#s get their memory),use_bufferfor ExecuteIndirect's argument and count buffers; tests oftable_addressesand the root address rewrite.crates/xcl/src/hle/d3d12x/list_x.rs:use_bufferfor CopyBufferRegion.crates/xcl/src/hle/d3d12x/sparse.rs:lazy_pending.Tested
cargo test -p xcl --lib -- outside_buffer table_addresses root_addresses_in_outside --test-threads=4: 4 passed, 0 failed.cargo test -p xcl --lib -- hle::d3d12x --test-threads=4(with the logging PR on top): 260 passed, 0 failed, 2 ignored, no SKIPPED lines.stable-x86_64-pc-windows-msvc, release.cargo build --release --workspace && cargo test --release --workspace --no-fail-fast -- --test-threads=4on321ada6: 1437 passed, 4 failed, 47 ignored. The 4 failures aregpu::dxil::fuzz_tests::fuzz_validate_and_gpu_0..3(CreateComputePipelineState: out of memory (0x8007000E)), which fail onmainas well. SKIPPED (the same as onmain): 21 "no wave64", 3 refused by the per-lane form,heap_window_out_of_memory_falls_back_to_the_switch_form,pso_measurement_compiles_an_exact_synthetic_record.main+ open PRs + lab work, not this branch), in the newer retail title:Regression run
main:
this PR:
Not tested
CreateShaderResourceView/ CBV by GPU address), and V#s past the first 64 slots of a table. They are not rewritten or mapped here, and the lab did not handle them either.AI use
main, added the CPU-page check, wrote the tests and this description; Claude Opus 5.5 (coordinating) ran the full suite and the regression runs and reviewed the diff.🤖 Generated with Claude Code
@ettehn on GitHub · 2026-11-26 13:59 UTC · original
Independent Windows/NVIDIA check of
sparse::use_rangeon321ada6adef2953aeb0f49720b7f929fee1693a9. The only local change was a synthetic test using the existing reserved-resource fixture. I put two one-tile D3D12 reserved buffers on the lazy list, with an unused tile between them.Windows 11 build 26200, Ryzen 9 8945HX, RTX 5070 Ti Laptop GPU (12 GB, driver 621.24, device confirmed by DXGI LUID), Rust 1.97.1 MSVC debug:
7 passed, 0 failed, 0 ignored, no reported skips. This checks mapping and GPU queue completion on the isolated path plus the existing address and table tests. Shader data readback through the alias, the full suite, and a retail title were outside this run.
OpenAI Codex assisted with the synthetic test and verification. The exact model identifier was unavailable in this session.
@Aniseto on GitHub · 2026-11-26 13:59 UTC · original
Ran the outside-buffer tests at
321ada6:Environment: Windows 11 Pro build 26200 x64, NVIDIA GeForce RTX 5070 Ti (Blackwell, 32-lane waves only, 16 GB) driver 32.0.16.2124, Intel Core i5-12400F, 64 GB RAM, rustc 1.100.0 (0ef1bc386 2026-11-09) MSVC 14.44.35207, DXC 1.9.2609.5, debug build.
All four pass here: the CPU-page check, the title-address-to-window map, the root address rewrite and the descriptor-table address tracking. These are unit tests; I did not run a title with these buffers.
What this adds: the author tested an RTX 5080 (16 GB, same driver) and did the title measurements in a separate lab tree. This is a second Blackwell host with a different DXC version; the thread has no report from another machine.
Not tested: this branch in a retail title, the ~580 MB buffer set described in the PR, AMD and Intel GPUs, tier-1 tiled-resource GPUs, the full workspace suite, a paired smoke run, Wine, release profile, title data.
AI-assisted (OpenCode), model: DeepSeek V4.1 Flash Free - checked out the PR's head commit in a detached worktree, built it, ran the tests, wrote this report; the worktree was not modified; no game data was used.
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.