D3D12.X: report tracked resource and heap counts #1623
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!1623
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-1623"
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?
@gabrielsteglich on GitHub · 2026-11-24 18:22 UTC · original
gabrielsteglich:feat/d3d12-object-telemetry→main· +195 −1 · 5 files · 1 commits · openAdds opt-in counts of the D3D12 resources and heaps tracked by XCL. The counts let a startup trace compare object growth with process commit and video memory use. Part of #1333. Issue reservation
What is in it
XCL_D3D12_OBJECT_COUNTS=1adds tracked resources, heaps, and deferred resources toreport.json. Resources held until GPU work completes stay in the resource total. WithXCL_ACTIVITY=1, the same counts appear next to each memory sample.Tested
cargo build --offline --locked --release -p xclsucceeded on both commits. One7f519f,cargo build --offline --locked --workspaceandcargo test --offline --locked --workspace --no-fail-fast -- --test-threads=4 --show-outputsucceeded in the debug profile. Cargo reported 893 passed, 0 failed, and 42 ignored. Optional sample-data tests were disabled.SKIPPED.gpu::recomp::tests::gpu_geometry_wave32_prefix_count_over_a_maskandgpu::recomp::tests::gpu_wave32_program_in_wave64_hardwarerequire native wave64.test_title_draws_with_a_root_signature_under_the_debug_layeranduploads_start_from_each_subresources_staterequire the D3D12 debug layer.heap_window_out_of_memory_falls_back_to_the_switch_formrequires heap windows in the test configuration.cargo test -p xcl --libon Windows 11 with an RTX 3060 Ti and reported zero failures after locally merging the previous PR revision withmain. Independent verificationRegression run
scripts/smoke.ps1ran the same retail title offline for 60 seconds per build after the rebase, with fresh title profiles and separate XCL DXIL caches.XCL_D3D12_OBJECT_COUNTS=1was set on both builds. Each build compiled eight shaders during the run.mainPR head
Not tested
AI use
@gabrielsteglich on GitHub · 2026-11-24 19:24 UTC · original
Thanks, @gut0to. I've added the exact names of all five skipped tests to the Tested section. The PR description check passed again.
@DavidM1911 on GitHub · 2026-11-24 20:37 UTC · original
Verification on RTX 3060 Ti (Windows 11), branch merged with current
main:cargo test -p xcl --lib: all passed, 0 failed, ~22 ignored.Thanks!
@JJAutoCompare on GitHub · 2026-11-25 05:02 UTC · original
XCL PR #1623 focused verification
Clean detached HEAD
e7f519f15531496ca2ef14f6e27a515301a55dfdon STOR-WINLAB. Windows 11 Enterprise Evaluation x64 build 26200, AMD64 family 23 model 113 stepping 0, Intel Arc A770 driver 32.0.101.9175, DXC 1.9.2609.5, rustc 1.100.0 (0ef1bc386, x86_64-pc-windows-msvc). The fixture requests the default D3D12 adapter. The lab probe identified the inbox default device by LUID as the A770 (8086:56A0).Tested
cargo build --workspaceandcargo test --workspace --no-runboth succeeded outside the Arc mutex with incremental compilation and dev/test debug info disabled.XCL_ADAPTER=NONE_CPU_ONLY. Ranxcl-77aca8ccb20e299f.exe --exact hle::d3d12x::real::object_count_tests::adopted_objects_stay_counted_through_deferred_release. The test verified resource and heap adoption, deferred resource accounting, and immediate and deferred release paths.Invoke-ArcTest.ps1withXCL_ADAPTER=A770andRUST_TEST_NOCAPTURE=1. Rand3d12_object_counts-291c762794d784ae.exe --exact tracked_objects_follow_native_release_and_gpu_completion. The fixture created a D3D12 device and verified zero initial counts. It failed atCreateHeap(line 28) with0x80070057(The parameter is incorrect), before adoption and queue completion. The failure reproduced and libtest exited 101.pr1623-focused.logare 1 passed, 1 failed, 0 ignored, 0 SKIPPED. Both commands used the test executables produced by workspace compilation.Not tested
Scope was full workspace compilation and the two focused tests. The full GPU workspace suite, retail-title smoke, activity log and report.json output were omitted. The failed GPU fixture did not reach the native release and GPU completion assertions.
AI use
T3 Code / Codex (gpt-6.2-sol, reasoningEffort: high) ran the build and verification. Coordinator #2 (T3 Code / Antigravity, gemini-4-neon) verified counts against
pr1623-focused.logand published.@DarkPanda69 on GitHub · 2026-11-25 13:26 UTC · original · edited 2026-11-25 19:29 UTC
Correction:
tracked_objects_follow_native_release_and_gpu_completion(tests/d3d12_object_counts.rs) creates its device withagility::create_device(None, ..), so it runs on DXGI adapter 0, which on this machine is the RX 9070 XT, whateverXCL_ADAPTERsays. Both runs of that test below were on the RX 9070 XT: the AMD result stands, but the RTX 3060 line ford3d12_object_countsis not an RTX 3060 result. The per-cardgpu::counts are unaffected.AMD run (listed as untested), plus an RTX 3060: the new integration test passes on both, and nothing in the GPU suite changes.
Head
e7f519fapplied onmain1a0bbe3, debug, Windows 11 Pro 26200:cargo test -p xcl --test d3d12_object_counts: 1 passed, 0 SKIPPED (tracked_objects_follow_native_release_and_gpu_completionok, so the counts follow native release and GPU completion on the AMD driver too).cargo test -p xcl --lib -- gpu::: 629 passed, 2 failed, 22 ignored, 6 SKIPPED, the same counts asmain; the 2 failures are the AMD fuzz seeds tracked in #2115.d3d12_object_counts1 passed;gpu::631 passed, 0 failed, 22 ignored.Not tested: the device loss from #1333, a title, Intel.
AI use: Claude Code (Claude Opus 5.5) ran the tests on this machine and wrote this report.
@DavidM1911 on GitHub · 2026-11-26 05:58 UTC · original
Re-verification on RTX 3060 Ti (Windows 11), new head merged with current
main:cargo test -p xcl --lib: all passed, 0 failed, 27 ignored. The earlier merge conflict is resolved.Thanks!
— Devin
@gut0to on GitHub · 2026-11-24 18:26 UTC · original · reviewed
The full workspace run and the smoke comparison are useful. One CONTRIBUTING.md detail: it asks for the names of skipped GPU tests on the adapter; this lists five skips only by category/count. Could you include the exact test names for the wave64, debug-layer, and heap-window skips? AI-assisted review; I checked this against the Tested section and project guide.
@bmjask on GitHub · 2026-11-25 21:42 UTC · original · reviewed
No concrete source defect found. Resource/heap adoption/release accounting and deferred lifetime handling are correct; native blocked-queue test plus current CI/smoke are strong. Independent relaxed atomics mean live snapshots can momentarily be internally inconsistent under concurrent release; document as approximate or add concurrent snapshot stress coverage. I found no blocker.
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.