D3D12.X tests: DrawIndexedX test no longer depends on what earlier tests allocated #222
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!222
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/222/head"
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?
@Kalmarv on GitHub · 2026-11-23 21:15 UTC · original
Kalmarv:fix/draw-indexed-test-order→main· +15 −6 · 1 files · 1 commits · merged 2026-11-23 21:24 UTChle::d3d12x::list_x::tests::draw_indexed_x_routes_through_bind_and_restores_index_bufferpasses alone but fails in a full--librun:The test binds index buffers at the fixed addresses
0x1_0000_1000…0x1_0000_4000.gpu_vacopies an index buffer into unified memory when three things hold: unified memory is open, the address is outside it, and the memory there is readable. In a full run an earlier test has opened unified memory and has committed memory at0x1_0000_0000. The log showsindex buffer at 0x100001000 (64 bytes) is outside unified memory – 0x100000000..0x100010000 mirrored at …. The draw then binds the mirror's address, and the assertion onibs[0].BufferLocationfails. XCL itself does the right thing here; the test's addresses are the problem. With CI now on main (#143), an order-dependent failure like this would show up as a flaky run.Change (test only)
The test reserves 64 KiB of its own (
VirtualAlloc,MEM_RESERVE,PAGE_NOACCESS), takes its four addresses from that range and releases it at the end. Reserved, uncommitted memory is neverreadable, so the buffers are never mirrored, whatever ran before. The assertions are unchanged. +15 / −6 incrates/xcl/src/hle/d3d12x/list_x.rs.Tested
master30b0eb9 (relaxed as in #175), DXVK 3.1.1dxgi.x86_64-pc-windows-gnurelease build. Full--lib,--test-threads=1.main6da33fa09863ba(on6da33fa)The 8 still failing on both builds are unrelated:
Not tested
0x1_0000_0000, which would explain why it hasn't been seen.--test-threads> 1).AI use: Claude Code, Claude Opus 5.5
@BlestTerror on GitHub · 2026-11-23 21:21 UTC · original
Same fix found independently in #224 (closed in favour of this one). One detail it can add: the test that leaves memory at
0x1_0000_0000isgpu_sparse_vram_descriptors_buffers_and_xmem(its sparse VRAM windows), found by bisecting the 319 tests before this one. Running just those two, in that order, fails onmainand passes with the reserved addresses. Wine 11.20, RTX 4060,x86_64-pc-windows-msvc.@ivall on GitHub · 2026-11-23 21:24 UTC · original
Merged (main
d4f17ca). Checked on an RX 9070 (RDNA4) with 11 PRs merged together on mainaf20b4b:cargo build --workspace && cargo test --workspace -- --test-threads=4- 605 unit tests passed, 0 failed (20 ignored), the integration and e2e tests passed; and the retail game still reaches its first menu at 30 fps (720 draws per 2 s).