Repository navigation
test(gpu): probe heaps opened over process memory - #201
Merged
pragyaangaur merged 1 commit intoNov 26, 2026
Merged
Conversation
Ignored-by-default tests that ask the host D3D12 device for OpenExistingHeapFromAddress, OpenExistingHeapFromAddress1 and OpenExistingHeapFromFileMapping on 64 KiB, 4 MiB and 256 MiB of committed memory, place a buffer over each heap that opens, check with copies that the buffer aliases the memory both ways (and not as a snapshot taken at open), try VirtualProtect under the heap, and time the openings. Adapted from the avatarmanz fork's inplace.rs probe (GPL-3.0). D3DMetal 4.0b3 under CrossOver Wine answers E_NOTIMPL for both ID3D12Device3 openings and E_FAIL for OpenExistingHeapFromAddress1, logging "Unsupported" for each, although both interfaces are exposed. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Signed-off-by: Vedant Dadhich <vedantdadhich21@gmail.com>
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.
Summary
Refs #197.
Adds ignored-by-default synthetic probes for the three D3D12 APIs that open a heap over memory the process already owns:
ID3D12Device3::OpenExistingHeapFromAddressID3D12Device13::OpenExistingHeapFromAddress1ID3D12Device3::OpenExistingHeapFromFileMappingThe tests use only their own committed memory and buffer copies. They check interface availability, opening 64 KiB/4 MiB/256 MiB ranges, placed-buffer aliasing in both directions,
VirtualProtectunder an opened heap, and opening cost. They print results and do not fail on a host refusal, so a future D3DMetal or native host can be characterized without changing production code.Credit: adapted by BennettStaley from the avatarmanz fork's GPL-3.0
inplace.rsprobe; the original commit authorship is preserved and this adaptation is DCO signed off.Verification
victory-gpu --lib: 85 passed, 1 ignored.Device3/Device13query successfully, address openings returnE_NOTIMPL,OpenExistingHeapFromAddress1returnsE_FAIL, and file-mapping openings returnE_NOTIMPL, with no crash.cargo xtask policy: 234 files ok.git diff --check: passed.No game files or proprietary assets were used. AI-assisted adaptation and validation.