gpu: test overlapping placements in one existing heap (Part of #3676) #3725
No reviewers
Labels
No labels
accessibility
awaiting author
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
priority: P0
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/R0Y00--Xbox2Windows!3725
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-3723"
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?
@timbot103 on GitHub · 2026-12-01 10:53 UTC · original
timbot103:tests/existing-heap-shared-buffer-fixture→main· +521 −2 · 4 files · 2 commits · merged 2026-12-02 02:13 UTCRefs #3678 (item (e), standalone D3D12 fixture only — no runtime integration).
Summary
Adds a standalone D3D12 fixture (
tests/existing_heap_shared_buffer_check.cpp,tests/cmake/existing_heap_shared_buffer.cmake,CMakePresets.json,docs/experiments/existing-heap-shared-buffer.md) that verifies overlapping unaligned logical buffer views over one desktop placed buffer in a singleOpenExistingHeapFromAddressheap:MEM_PRIVATEVirtualAllocregion, opens it viaID3D12Device3::OpenExistingHeapFromAddress, and places one cross-adapter UAV-capable buffer over the whole allocation.0x100(A) and0x180(B), overlapping on[0x180, 0x200)(32 dwords) with guard patterns filling the rest of the 128 KiB allocation:VirtualAllocpointer directly at both A's overlap offset and B's base and verifies all guards across the 128 KiB allocation.--offset-control/--corrupt-offsetbinds B's UAV at byte 0 instead of0x180, verifying that the overlap checks fail and that the write landed only in[0x000, 0x080)(direct--corrupt-offsetexits with code3).existing_heap_shared_buffer_{warp,hardware}andexisting_heap_shared_buffer_offset_control_{warp,hardware}in CTest (SKIP_RETURN_CODE 77whenD3D12_FEATURE_EXISTING_HEAPSis unsupported) and includes both WARP cases in theprsmoke preset.Verification
Windows 11 (26200), MSVC 19.44, Ninja, Windows SDK 10.0.26100. D3D12 debug layer unavailable on this host (
D3D12GetDebugInterface=0x887a002d, reported honestly by the fixture; info-queue error checking is wired in when installed).devpreset):ctest --preset dev --no-tests=error -R '^existing_heap_shared_buffer_' -V-> 4/4 passed:Microsoft Basic Render Driver, driver10.0.26100.9818,D3D12_FEATURE_EXISTING_HEAPS=1): positive + offset control passedNVIDIA GeForce RTX 5080,10de:2c02, driver32.0.16.2140,D3D12_FEATURE_EXISTING_HEAPS=1): positive + offset control passedreleasepreset):ctest --preset release --no-tests=error -R '^existing_heap_shared_buffer_' -V-> 4/4 passed on both WARP and RTX 5080.--corrupt-offsetverified exit code3on both WARP and RTX 5080.git diff --check HEAD^ HEADclean.AI-assisted.
@Leyukaka on GitHub · 2026-12-01 14:16 UTC · original · reviewed
In
main,--offset-controlexits successfully for bothoffset_mismatchand0. If a regression sends the control down the positive path, CTest will still report a pass. Could the wrapper requireresult == offset_mismatchin control mode and returnresultdirectly in the other modes?@timbot103 on GitHub · 2026-12-01 22:43 UTC · original
@Leyukaka Good catch — fixed in
4257a909:--offset-controlnow requiresresult == offset_mismatch(returning1with a failure message if it ever falls through with0or another code), while positive and--corrupt-offsetmodes returnresultdirectly. Re-verified 4/4 in Debug and Release on WARP (10.0.26100.9818) and RTX 5080 (32.0.16.2140), plus direct--corrupt-offsetexit code 3 on both.github-bot referenced this pull request2026-12-02 01:36:57 +00:00