D3D12.X: log buffers placed outside the memory windows and their first use #2791
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/2801"
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?
Imported from ivall/xcl. Originally posted by MacieGx on 2026-11-26T13:50:55Z.
Stacked on #2799; only the top commit belongs here.
Two log lines, each for the first four occurrences and then at every power of two:
They are what a run log needs to show whether a title's GPU-only buffers were placed and reached. Part of #505.
What is in it
crates/xcl/src/hle/d3d12x/real.rs: the placement line inplace_outside_buffer.crates/xcl/src/hle/d3d12x/sparse.rs: bytes placed lazily and in use (LAZY_BYTES), and the first-use line inuse_range.Tested
cargo build -p xcl, no new warnings. Logging only, no test.stable-x86_64-pc-windows-msvc, release.cargo build --release --workspace && cargo test --release --workspace --no-fail-fast -- --test-threads=4onefcfdc3: 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.Regression run
main:
this PR:
Not tested
AI use
🤖 Generated with Claude Code
Imported from ivall/xcl. Originally posted by Decodere on 2026-11-26T15:52:51Z.
Independent RTX 4060 (8 GB) / Windows 11 release verification of PR #2801 at
efcfdc30f5caf8038df6ed2a1c0d834d30ad61a3(stacked on PR #2799321ada6adef2953aeb0f49720b7f929fee1693a9; merge-baseorigin/mainb49be1836844fe0b0cdb3211dce3cb7fb4e21ac7). Measurements, live log verification, and targeted test results only; not a full source review.Setup
7956 MiBreported by D3D12), driver32.0.16.2114(NVIDIA621.14, WDDM 3.2)31.9 GiBusable), Windows 11 Home26200rustc 1.100.0 (0ef1bc386 2026-11-09), DXC1.9.2609.5, release builds, warm DXIL/pipeline caches, quiet machine (zero concurrent builds/tests during timed runs)title: 29640639viascripts/smoke.ps1 -Seconds 60(XCL_NETWORK=0, default flags, no input)Targeted RTX 4060 release unit tests (
efcfdc30)cargo test --release -p xcl --lib hle::d3d12x::sparse::: 19 passed, 0 failed, 1 ignored (0.38 s,early_commit_timingignored,0SKIPPED; includesa_lazy_buffer_gets_its_tiles_at_its_first_use).cargo test --release -p xcl --lib hle::d3d12x::bind::: 10 passed, 0 failed, 0 ignored (0.30 s,0SKIPPED; includesroot_addresses_in_outside_buffers_name_their_address_in_the_windowsandtable_addresses_follow_the_table_arguments).cargo test --release -p xcl --lib hle::d3d12x::device_x::: 14 passed, 0 failed, 0 ignored (0.20 s,0SKIPPED).cargo test --release -p xcl --lib hle::d3d12x::list_x::: 40 passed, 0 failed, 0 ignored (0.70 s,0SKIPPED).cargo test --release -p xcl --lib hle::d3d12x::real::: 62 passed, 0 failed, 0 ignored (0.69 s,0SKIPPED; includesoutside_buffer_tests::cpu_pages_are_found_anywhere_in_the_rangeandoutside_buffer_tests::outside_buffer_addresses_keep_their_offset).Live PR #2801 log verification (
xcl.log, 60 s RTX 4060 run)place_outside_buffercadence (real.rs): All 9 expected lines (k <= 4 || k.is_power_of_two()) fired live during startup (#1,#2,#3,#4,#8,#16,#32,#64,#128), confirming>= 128and< 256buffers were placed outside the memory windows in this run:sparse.rs): 0sparse windows: lazily placed buffer #k ... gets its video memory at its first uselines fired during the 60 s no-input run, directly explaining why the#2799local VRAM savings held steady throughout the run (5,610 MBpeak /5,550 MBend local VRAM,4,651 MBend non-local VRAM,13,404 MBpeak commit — matching parent#2799321ada6aat5,610 MBpeak /5,550 MBend local VRAM and13,386 MBpeak commit, vs14,018 MBpeak commit onmainb49be183).Paired 60 s RTX 4060 smoke (
b49be183/321ada6avsefcfdc30)Merge-base
origin/main(b49be183):Parent PR #2799 (
321ada6a):PR #2801 head (
efcfdc30):Limits of coverage
sparse windows: lazily placed buffer #k ... gets its video memory at its first uselog line did not trigger live during this 60 s no-input menu/intro smoke (0hits inxcl.log); the lazy first-use backing path was exercised by the release unit testhle::d3d12x::sparse::tests::a_lazy_buffer_gets_its_tiles_at_its_first_use, not by interactive world-load draws.efcfdc30(only the 145 targeted release tests acrosssparse::,bind::,device_x::,list_x::, andreal::plus the 60 s quiet smoke).RTX 4060) on native Windows 11; no AMD, Intel, or Wine/Linux run on this host.AI use
Ran the targeted release unit tests, quiet 60 s smoke run, and
xcl.loglog/memory extraction with assistance from Google Antigravity (Gemini 4 Neon); all test counts, log lines, memory numbers, and smoke blocks were extracted directly fromcargo test,xcl.log, andscripts/smoke.ps1outputs.Imported from ivall/xcl. Originally posted by CharlyRien on 2026-11-28T02:03:13Z.
Test report for
efcfdc3as it is (the PR's head, so with #2798 and #2799 under it; baseb49be18), on an RTX 3090.Tested
cargo test --workspace --no-fail-fast -- --test-threads=4onefcfdc3, run withXCL_REQUIRE_GPU=meshset (this card has mesh shaders but no wave64): 1434 passed, 7 failed, 47 ignored.XCL_REQUIRE_GPU=meshturns into failures, not test failures:skip_testfails undermeshany skip whose reason is not exactlyno wave64. Their messages: 6 tests ofgpu::recomp::lower_dxil::tests(f16_programs_on_the_gpu,f32_programs_on_the_gpu,f64_programs_on_the_gpu,integer_programs_on_the_gpu,const_and_null_mask_operands_agree_with_hlsl_on_the_gpu,mask_ff0_and_flbit_agree_with_hlsl_on_the_gpu) say "<name>, wave64: no wave64, but XCL_REQUIRE_GPU=mesh", andheap_window_out_of_memory_falls_back_to_the_switch_formsays "no heap windows, but XCL_REQUIRE_GPU=mesh". With the command exactly as in CONTRIBUTING (noXCL_REQUIRE_GPU) these 7 areSKIPPEDlines (as in the author's run); I did not rerun it.SKIPPEDon this adapter: 9 lines, 8 "no wave64" and 1 "f16 arithmetic, wave32, per-lane form: refused (unsupported V_MUL_F16 (its #1426 semantics differ from the console's))".scripts/smoke.ps1, 200 s, below. The PR's log has 9 "placed outside the memory windows" lines (buffers #1 to #128, at 45 s) and 6 "lazily placed buffer" lines, the last (#16) at 183 s with 240 of 570 MB placed.Regression run
main6089122and this head, same machine, same title, 200 s, the same scripted A presses (XCL_PRESS_A_AT),XCL_PREPARE=0on both, each run with its own copy of the same shader cache. Both runs usedmain'sscripts/smoke.ps1.main:
this PR's head:
Frames 89.6 % of
main's, peak commit 114.4 % ofmain's, no device removal and no crash on this head. One run each.Not tested
main(it merges without conflicts here; the run is of the head as it is).AI use: Claude Code, model Claude Opus 5.5. It built the commits, ran the suite and the two smoke runs on the machine above, read the logs and wrote this. The person running these tests asked for this post.
Imported from ivall/xcl. Originally posted by Foniass on 2026-12-01T08:59:46Z.
Triage (#1607) – head
efcfdc3Stacked on #2799 (which is stacked on #2798); only the top commit
efcfdc3belongs here, and it adds two rate-limited log lines (real.rs:place_outside_buffer,sparse.rs:use_range) plus theLAZY_BYTEScounters. The shared lines with #2799 / #2798 are those base commits, not a duplicate.No problems found in the top commit. The stack conflicts with main and needs a rebase.
Recommendation: keep open.
AI review: Claude Code (Claude Opus 5.5), diffs read only, not built or run; not checked by a human.
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.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.