Repository navigation
Conversation
Agility SDK 1.620 keeps an open command list's vtable in heap memory that is freed with the list. class_for cached the extended vtable by the runtime vtable's address and copied the runtime's methods only the first time, so a direct list whose open vtable came where a released compute list's had been called the compute list's methods: its ClearDepthStencilView made Close fail with E_FAIL. That is how vram's D32S8 test failed in parallel runs (2-5 in 10 with hle::d3d12x and one more module on 4 threads, RTX 5080; 0 in 12 with this change). A class of a vtable outside any module now keeps the methods it copied and is taken only while they are still the ones there. Fixes xcl-dev#2588
|
Verification on RTX 3060 Ti (Windows 11), branch merged with current
Thanks! — Devin |
|
AMD run (listed as untested), on Windows 11 too: on an RX 9070 XT the new test skips. The reuse it waits for did not happen in 3 runs, so on this machine it passes without exercising the fix. Head
So in the test's 200 tries, no direct list landed on a released compute list's vtable address here. Your report's SKIPPED list doesn't include this test, so it did run on the RTX 5080. Whether the address reuse is rarer here because of the GPU driver, Windows 11 or the heap was not looked into. This run also says nothing about whether the fix is right on AMD; it only shows the test does not reach it on this machine. Not tested: the machine's RTX 3060 (the test always uses the default adapter), Intel, a title. |
|
I found an additional cache-boundary case in the current implementation.
I prepared a focused follow-up at
Tested
Not tested
Exact-head GPU and smoke runs remain required after this change is folded into #2593. AI use
|
|
Tested: current PR head merged onto current
Not tested: retail titles (no title data on this lane, counts only). AI use: Hermes agent (local Qwen-class) ran both machines and drafted this; I checked it before posting. |
|
@mokkamokacaffe thanks for looking. I read
AI use: Claude Code (Claude Opus 5.5) read both commits and wrote this reply. |
|
NVIDIA test report for
|
|
@SergeAx Thanks for the detailed correction. I re-read
I therefore withdraw the Thanks for checking the proposed follow-up closely. AI use
|
|
Independent Windows/NVIDIA test of head
On exact No retail title, AMD, or Intel test. AI use: Codex (GPT-6.2 Sol) prepared the exact-head builds, ran the tests, and checked the logs. |
|
Independent desktop NVIDIA verification of PR #2593 at head Environment
Targeted release tests & build (
|
| Command | Result |
|---|---|
cargo test --release -p xcl a_direct_list_at_a_released_compute_lists_vtable_records_with_its_own_methods -- --nocapture (5 consecutive runs) |
1 passed; 0 failed; 0 ignored; 1331 filtered out × 5 (0.19s × 5) — self-skipped on all 5 runs via skip_test("no direct list got a released compute list's vtable") because inbox D3D12Core.dll 10.0.26100.8328 places open command-list vtables inside the module image (D3D12Core.dll+0x30bd90, D3D12Core.dll+0x30b830) rather than on the heap |
cargo test --release -p xcl hle::d3d12x::real:: -- --test-threads=1 (3 consecutive runs) |
60 passed; 0 failed; 0 ignored; 1272 filtered out × 3 (2.05s × 3; 59 executed + 1 self-skipped class_tests case above) |
cargo build --release -p xcl |
Clean build (exit 0, 0 new warnings) |
Paired quiet 60 s retail smoke (title: 29640639)
Exact parent & merge-base (08db8020d323bf478964fcc586152cce54959cfc, cached baseline on the same machine):
xcl-smoke v1
commit: 08db8020d323bf478964fcc586152cce54959cfc
gpu: NVIDIA GeForce RTX 4060
title: 29640639
seconds: 60
exit: 0x0
frames shown: 1588 (PresentX 1588)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 14000 MB
PR #2593 (52c0802fb8f13c4efef3b82a14bc34fd338ae7a6):
xcl-smoke v1
commit: 52c0802fb8f13c4efef3b82a14bc34fd338ae7a6
gpu: NVIDIA GeForce RTX 4060
title: 29640639
seconds: 60
exit: 0x0
frames shown: 1586 (PresentX 1586)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 13978 MB
Runtime log observations (xcl.log)
9223log lines,0[ERROR]/ device-removal / panic lines.13D3D12 runtime vtables adopted during the run, all inside inboxD3D12Core.dll(module_of(orig) != 0fast path).- Final draw/memory telemetry in log:
19537 draws with translated pipelines (0 skipped, 0 with PC pipelines), 1024 dispatches (0 skipped); last memory sample13977 MB committed by the process; video memory 6115 MB local, 4652 MB non-local.
Limits of coverage
- Inbox D3D12 non-regression only — Agility SDK 1.620+ heap-vtable reuse path not exercised: this host runs Windows 11 inbox
D3D12Core.dll(10.0.26100.8328) without Agility SDK 1.620+, so open command-list vtables live insideD3D12Core.dll(module_of(orig) != 0) instead of heap memory. As a result,a_direct_list_at_a_released_compute_lists_vtable_records_with_its_own_methodsself-skipped (5/5standalone,3/3insidehle::d3d12x::real::) and did not execute theClearDepthStencilView+Close()assertion on a reused heap vtable address. - This report confirms that the added
Class::copied/same_methods/module_of(orig) == 0guard builds cleanly and causes no regression on inboxD3D12Core.dll(59executedhle::d3d12x::real::tests × 3 and paired 60 s retail smoke ontitle: 29640639); independent hardware verification of the heap-vtable reuse fix itself still requires a host with Agility SDK 1.620+ loaded.
AI disclosure: test execution and report drafting assisted by Google Antigravity (Gemini 4 Neon).
Fixes #2588.
With the Agility SDK 1.620, an open command list's vtable is in heap memory and goes with the list.
real::class_forcached the extended vtable by the runtime vtable's address and copied the runtime's methods only once, so a direct list whose open vtable came where a released compute list's had been called the compute list's methods: itsClearDepthStencilViewmadeClosefail withE_FAIL. That is the parallel-only failure ofvram::tests::d32s8_targets_take_their_own_size_of_video_memory(#42).What is in it
crates/xcl/src/hle/d3d12x/real.rs: aClassof a vtable outside any module keeps the methods it copied (copied), andclass_fortakes it only while they are still the ones at that address. Vtables in a module's image are looked up as before.crates/xcl/src/hle/d3d12x/real.rs(class_tests):a_direct_list_at_a_released_compute_lists_vtable_records_with_its_own_methods.Tested
cargo test --workspace --no-fail-fast -- --test-threads=4at52c0802f: 1426 passed, 4 failed, 47 ignored. The 4 are DXIL GPU fuzz tests reproducibly fail with E_OUTOFMEMORY on RTX 5060 #1905 (fuzz_validate_and_gpu_0.._3, seeds 70, 545, 1019 and 1507), as on main6d12f58(GPU test results: NVIDIA RTX 3080 (wave32) and AMD RDNA2 iGPU (no mesh shaders) #42).V_MUL_F16,V_PK_MUL_F16,V_CVT_F16_F32);heap_window_out_of_memory_falls_back_to_the_switch_form: no heap windowscopied, and passes in 5 out of 5 with this change.--test-threads=4 hle::d3d12x hle::xgameruntime: the D32S8 test failed in 2–5 runs out of 10 on6d12f58, and in 0 out of 12 with this change.Regression run
main:
this PR:
Not tested
D3D12Core.dll, which this change looks up as before)list_x::tests::a_reset_while_the_last_submit_runs_records_on_another_pc_list)AI use