Repository navigation
D3D12.X tests: DrawIndexedX test no longer depends on what earlier tests allocated - #222
Merged
Merged
Conversation
…sts allocated draw_indexed_x_routes_through_bind_and_restores_index_buffer bound index buffers at fixed addresses 0x1_0000_1000..0x1_0000_4000. In a full --lib run an earlier test had committed memory there and unified memory was open, so gpu_va mirrored the buffer and the test saw the mirror's address (left 0x32800000, right 0x100002000). Alone it passed. The test now reserves 64 KiB (MEM_RESERVE, PAGE_NOACCESS) and takes its addresses from there: never readable, so never mirrored, whatever ran before. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Contributor
|
Same fix found independently in #224 (closed in favour of this one). One detail it can add: the test that leaves memory at |
This was referenced Nov 23, 2026
Collaborator
|
Merged (main d4f17ca). Checked on an RX 9070 (RDNA4) with 11 PRs merged together on main af20b4b: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
hle::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 Linux (Wine + vkd3d-proton): a retail game reaches whatmainreaches on Windows; the obstacle is replaced vtables — proposal: proxies #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:
mainreaches on Windows; the obstacle is replaced vtables — proposal: proxies #175);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